ARMEBS4  revision-26.06.2015
stm32_usart.h
Go to the documentation of this file.
1 /**
2  * \file heivs/stm32_usart.h
3  * \brief usart bus
4  * \author marc dot pignat at hevs dot ch
5  *
6  * \defgroup usart_bus USART bus
7  * @{
8  * \brief USART (Universal Synchronous Asynchronous Receiver Transmitter) bus.
9  * \ingroup bus
10  *
11  * USART or UART implements the RS232 specification.
12  *
13  ***************************************************************************/
14 #ifndef HEIVS_STM32_USART_H
15 #define HEIVS_STM32_USART_H
16 
17 #include "heivs/bus.h"
18 #include "heivs/stm32_gpio.h"
19 #include "heivs/bsp.h"
20 
21 /**
22  * \brief USART specific data
23  */
25 {
26  USART_TypeDef *ctrl; ///< Controller
27  const struct gpio_t gpios[2]; ///< Gpios
28  uint32_t speed; ///< Baudrate
29 };
30 
31 #ifdef __cplusplus
32  extern "C" {
33 #endif
34 
35 /**
36  * \brief All USART busses
37  */
38 extern const struct heivs_bus_t bus_usart[BSP_USART_BUS_COUNT];
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 /**
45  * @}
46  */
47 #endif /* HEIVS_STM32_USART_H */
bus abstraction
Bus handler.
Definition: bus.h:92
uint32_t speed
Baudrate.
Definition: stm32_usart.h:28
BSP - Board Support Package.
Universal Synchronous Asynchronous Receiver Transmitter.
Definition: stm32f4xx.h:906
USART_TypeDef * ctrl
Controller.
Definition: stm32_usart.h:26
board specific defines
GPIO control structure.
Definition: stm32_gpio.h:96
USART specific data.
Definition: stm32_usart.h:24
const struct gpio_t gpios[2]
Gpios.
Definition: stm32_usart.h:27