Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
uart.c File Reference
+ Include dependency graph for uart.c:

Go to the source code of this file.

Functions

static void send_uart_err (struct transport_tx *trans, struct link_device *dev)
 
void uart_periph_init (struct uart_periph *p)
 
bool WEAK uart_check_free_space (struct uart_periph *p, long *fd, uint16_t len)
 
void WEAK uart_put_buffer (struct uart_periph *p, long fd, const uint8_t *data, uint16_t len)
 Uart transmit buffer implementation. More...
 
void WEAK uart_send_message (struct uart_periph *p, long fd)
 
uint8_t WEAK uart_getch (struct uart_periph *p)
 
uint16_t WEAK uart_char_available (struct uart_periph *p)
 Check UART for available chars in receive buffer. More...
 
void WEAK uart_arch_init (void)
 
void WEAK uart_periph_invert_data_logic (struct uart_periph *p, bool invert_rx, bool invert_tx)
 

Function Documentation

static void send_uart_err ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 181 of file uart.c.

References dev.

Referenced by uart_periph_init().

+ Here is the caller graph for this function:

void WEAK uart_arch_init ( void  )

Definition at line 295 of file uart.c.

References uart_thread().

+ Here is the call graph for this function:

uint16_t WEAK uart_char_available ( struct uart_periph p)

Check UART for available chars in receive buffer.

Returns
number of chars in the buffer

Definition at line 286 of file uart.c.

References uart_periph::rx_extract_idx, uart_periph::rx_insert_idx, and UART_RX_BUFFER_SIZE.

Referenced by uart_periph_init().

+ Here is the caller graph for this function:

bool WEAK uart_check_free_space ( struct uart_periph p,
long *  fd,
uint16_t  len 
)

Definition at line 256 of file uart.c.

References uart_periph::init_struct, uart_periph::tx_extract_idx, uart_periph::tx_insert_idx, SerialInit::tx_mtx, and UART_TX_BUFFER_SIZE.

Referenced by uart_periph_init().

+ Here is the caller graph for this function:

uint8_t WEAK uart_getch ( struct uart_periph p)

Definition at line 279 of file uart.c.

References uart_periph::init_struct, uart_periph::rx_buf, uart_periph::rx_extract_idx, SerialInit::rx_mtx, and UART_RX_BUFFER_SIZE.

Referenced by uart_periph_init().

+ Here is the caller graph for this function:

void WEAK uart_periph_invert_data_logic ( struct uart_periph p,
bool  invert_rx,
bool  invert_tx 
)

Definition at line 299 of file uart.c.

Referenced by sbus_common_init().

+ Here is the caller graph for this function:

void WEAK uart_put_buffer ( struct uart_periph p,
long  fd,
const uint8_t data,
uint16_t  len 
)

Uart transmit buffer implementation.

Definition at line 266 of file uart.c.

References uart_periph::init_struct, uart_periph::tx_buf, uart_periph::tx_extract_idx, uart_periph::tx_insert_idx, SerialInit::tx_mtx, SerialInit::tx_sem, uart_put_byte(), and UART_TX_BUFFER_SIZE.

Referenced by uart_periph_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void WEAK uart_send_message ( struct uart_periph p,
long  fd 
)

Definition at line 275 of file uart.c.

References uart_periph::init_struct, SerialInit::tx_mtx, and SerialInit::tx_sem.

Referenced by uart_periph_init().

+ Here is the caller graph for this function: