Paparazzi UAS  v4.0.4_stable-3-gf39211a
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...


#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)


void uart_periph_init (struct uart_periph *p)
void uart_periph_set_baudrate (struct uart_periph *p, uint32_t baud)
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)
({ \
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
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 

Definition at line 59 of file uart_arch.c.

References pprz_usart_set_baudrate, uart_periph::reg_addr, uart_disable_interrupts(), uart_enable_interrupts(), and uart_set_baudrate().

+ Here is the call graph for this function:

void uart_transmit ( struct uart_periph p,
uint8_t  data