Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
uart.h File Reference

arch independent UART (Universal Asynchronous Receiver/Transmitter) API More...

#include "mcu_periph/uart_arch.h"
#include "std.h"
+ Include dependency graph for uart.h:

Go to the source code of this file.

Data Structures

struct  uart_periph
 UART peripheral. More...
 

Macros

#define UART_RX_BUFFER_SIZE   128
 
#define UART_TX_BUFFER_SIZE   128
 
#define UART_DEV_NAME_SIZE   16
 
#define UartChAvailable(_p)   (_p.rx_insert_idx != _p.rx_extract_idx)
 
#define UartGetch(_p)
 

Functions

void uart_periph_init (struct uart_periph *p)
 
void uart_periph_set_baudrate (struct uart_periph *p, uint32_t baud, bool_t hw_flow_control)
 
void uart_transmit (struct uart_periph *p, uint8_t data)
 
bool_t uart_check_free_space (struct uart_periph *p, uint8_t len)
 

Detailed Description

arch independent UART (Universal Asynchronous Receiver/Transmitter) API

Definition in file uart.h.

Macro Definition Documentation

#define UART_DEV_NAME_SIZE   16

Definition at line 38 of file uart.h.

#define UART_RX_BUFFER_SIZE   128

Definition at line 36 of file uart.h.

Referenced by uart_handler(), uart_ISR(), and usart_irq_handler().

#define UART_TX_BUFFER_SIZE   128
#define UartChAvailable (   _p)    (_p.rx_insert_idx != _p.rx_extract_idx)

Definition at line 65 of file uart.h.

#define UartGetch (   _p)
Value:
({ \
uint8_t ret = _p.rx_buf[_p.rx_extract_idx]; \
_p.rx_extract_idx = (_p.rx_extract_idx + 1)%UART_RX_BUFFER_SIZE; \
ret; \
})
unsigned char uint8_t
Definition: types.h:14
#define UART_RX_BUFFER_SIZE
Definition: uart.h:36

Definition at line 67 of file uart.h.

Function Documentation

bool_t uart_check_free_space ( struct uart_periph p,
uint8_t  len 
)
void uart_periph_set_baudrate ( struct uart_periph p,
uint32_t  baud,
bool_t  hw_flow_control 
)

Definition at line 33 of file uart_arch.c.

References pprz_usart_set_baudrate, and uart_periph::reg_addr.

void uart_transmit ( struct uart_periph p,
uint8_t  data 
)