dRonin
adbada4
dRonin firmware
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
pios_usart_priv.h
Go to the documentation of this file.
1
15
/*
16
* This program is free software; you can redistribute it and/or modify
17
* it under the terms of the GNU General Public License as published by
18
* the Free Software Foundation; either version 3 of the License, or
19
* (at your option) any later version.
20
*
21
* This program is distributed in the hope that it will be useful, but
22
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24
* for more details.
25
*
26
* You should have received a copy of the GNU General Public License along
27
* with this program; if not, see <http://www.gnu.org/licenses/>
28
*/
29
30
#ifndef PIOS_USART_PRIV_H
31
#define PIOS_USART_PRIV_H
32
33
#include <
pios.h
>
34
#include <
pios_stm32.h
>
35
#include "
pios_usart.h
"
36
37
extern
const
struct
pios_com_driver
pios_usart_com_driver
;
38
39
struct
pios_usart_cfg
{
40
USART_TypeDef *
regs
;
41
uint32_t
remap
;
/* GPIO_Remap_* */
42
struct
stm32_gpio
rx
;
43
struct
stm32_gpio
tx
;
44
struct
stm32_irq
irq
;
45
};
46
47
struct
pios_usart_params
{
48
USART_InitTypeDef
init
;
49
bool
rx_invert
;
50
bool
tx_invert
;
51
bool
rxtx_swap
;
52
bool
single_wire
;
53
};
54
55
extern
int32_t
PIOS_USART_Init
(uintptr_t * usart_id,
const
struct
pios_usart_cfg
*
cfg
,
struct
pios_usart_params
* params);
56
extern
const
struct
pios_usart_cfg
*
PIOS_USART_GetConfig
(uintptr_t usart_id);
57
58
#endif
/* PIOS_USART_PRIV_H */
59
pios_stm32.h
Types that are specific to the STM32 peripherals.
pios_usart.h
USART functions header.
pios.h
Main PiOS header to include all the compiled in PiOS options.
pios_usart_cfg
Definition:
pios_usart_priv.h:39
pios_usart_params::tx_invert
bool tx_invert
Definition:
pios_usart_priv.h:50
stm32_gpio
Definition:
pios_stm32.h:59
pios_usart_cfg::tx
struct stm32_gpio tx
Definition:
pios_usart_priv.h:43
pios_usart_params::rx_invert
bool rx_invert
Definition:
pios_usart_priv.h:49
pios_usart_cfg::remap
uint32_t remap
Definition:
pios_usart_priv.h:41
stm32_irq
Definition:
pios_stm32.h:33
pios_com_driver
Definition:
pios_com.h:43
pios_usart_params::init
USART_InitTypeDef init
Definition:
pios_usart_priv.h:48
pios_usart_params::single_wire
bool single_wire
Definition:
pios_usart_priv.h:52
cfg
static struct flyingpicmd_cfg_fa cfg
Definition:
main.c:49
pios_usart_com_driver
const struct pios_com_driver pios_usart_com_driver
pios_usart_params
Definition:
pios_usart_priv.h:47
pios_usart_cfg::irq
struct stm32_irq irq
Definition:
pios_usart_priv.h:44
pios_usart_params::rxtx_swap
bool rxtx_swap
Definition:
pios_usart_priv.h:51
pios_usart_cfg::regs
USART_TypeDef * regs
Definition:
pios_usart_priv.h:40
PIOS_USART_GetConfig
const struct pios_usart_cfg * PIOS_USART_GetConfig(uintptr_t usart_id)
PIOS_USART_Init
int32_t PIOS_USART_Init(uintptr_t *usart_id, const struct pios_usart_cfg *cfg, struct pios_usart_params *params)
pios_usart_cfg::rx
struct stm32_gpio rx
Definition:
pios_usart_priv.h:42
flight
PiOS
STM32
inc
pios_usart_priv.h
Generated by
1.8.6