libosmocore 1.9.0.67-be3c3.202312012026
Osmocom core library
osmo_soft_uart_cfg Struct Reference

#include <soft_uart.h>

Data Fields

uint8_t num_data_bits
 number of data bits (typically 5, 6, 7 or 8) More...
 
uint8_t num_stop_bits
 number of stop bits (typically 1 or 2) More...
 
enum osmo_soft_uart_parity_mode parity_mode
 parity mode (none, even, odd) More...
 
unsigned int rx_buf_size
 size of receive buffer; UART will buffer up to that number of characters before calling the receive call-back More...
 
unsigned int rx_timeout_ms
 receive timeout; UART will flush receive buffer via the receive call-back after indicated number of milliseconds even if it is not full yet More...
 
void * priv
 opaque application-private data; passed to call-backs More...
 
void(* rx_cb )(void *priv, struct msgb *rx_data, unsigned int flags)
 receive call-back. More...
 
void(* tx_cb )(void *priv, struct msgb *tx_data)
 transmit call-back. More...
 
void(* status_change_cb )(void *priv, unsigned int status)
 modem status line change call-back. More...
 

Field Documentation

◆ num_data_bits

uint8_t osmo_soft_uart_cfg::num_data_bits

number of data bits (typically 5, 6, 7 or 8)

Referenced by osmo_soft_uart_configure(), osmo_soft_uart_tx_ubits(), osmo_uart_rx_bit(), and osmo_uart_tx_bit().

◆ num_stop_bits

uint8_t osmo_soft_uart_cfg::num_stop_bits

number of stop bits (typically 1 or 2)

Referenced by osmo_soft_uart_configure(), osmo_soft_uart_tx_ubits(), osmo_uart_rx_bit(), and osmo_uart_tx_bit().

◆ parity_mode

enum osmo_soft_uart_parity_mode osmo_soft_uart_cfg::parity_mode

◆ priv

void* osmo_soft_uart_cfg::priv

opaque application-private data; passed to call-backs

Referenced by osmo_soft_uart_flush_rx(), and osmo_soft_uart_tx_ubits().

◆ rx_buf_size

unsigned int osmo_soft_uart_cfg::rx_buf_size

size of receive buffer; UART will buffer up to that number of characters before calling the receive call-back

Referenced by osmo_soft_uart_configure(), osmo_soft_uart_flush_rx(), osmo_soft_uart_set_rx(), and suart_rx_ch().

◆ rx_cb

void(* osmo_soft_uart_cfg::rx_cb) (void *priv, struct msgb *rx_data, unsigned int flags)

receive call-back.

Either rx_buf_size characters were received or rx_timeout_ms expired, or an error flag was detected (related to last byte received). 'flags' is a bit-mask of osmo_soft_uart_flags,

Referenced by osmo_soft_uart_flush_rx().

◆ rx_timeout_ms

unsigned int osmo_soft_uart_cfg::rx_timeout_ms

receive timeout; UART will flush receive buffer via the receive call-back after indicated number of milliseconds even if it is not full yet

Referenced by osmo_soft_uart_configure(), and suart_rx_ch().

◆ status_change_cb

void(* osmo_soft_uart_cfg::status_change_cb) (void *priv, unsigned int status)

modem status line change call-back.

gets bitmask of osmo_soft_uart_status

◆ tx_cb

void(* osmo_soft_uart_cfg::tx_cb) (void *priv, struct msgb *tx_data)

transmit call-back.

The implementation is expected to provide at most tx_data->data_len characters (the actual amount is determined by the number of requested bits and the effective UART configuration).

Referenced by osmo_soft_uart_tx_ubits().


The documentation for this struct was generated from the following file: