Loading...
Searching...
No Matches

Software UART port descriptor definition. More...

Detailed Description

Software UART port descriptor definition.

Author
Benjamin Valentin benja.nosp@m.min..nosp@m.valen.nosp@m.tin@.nosp@m.ml-pa.nosp@m..com

Definition in file soft_uart.h.

#include "periph/gpio.h"
#include "periph/uart.h"
#include "periph/timer.h"
+ Include dependency graph for soft_uart.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  soft_uart_conf_t
 Software UART port descriptor. More...
 

Macros

#define SOFT_UART_FLAG_INVERT_TX   0x1
 invert the level of the TX signal
 
#define SOFT_UART_FLAG_INVERT_RX   0x2
 invert the level of the RX signal
 

Typedefs

typedef unsigned soft_uart_t
 Software UART type definition.
 

Functions

int soft_uart_init (soft_uart_t uart, uint32_t baudrate, uart_rx_cb_t rx_cb, void *arg)
 Initialize a given UART device.
 
int soft_uart_mode (soft_uart_t uart, uart_data_bits_t data_bits, uart_parity_t parity, uart_stop_bits_t stop_bits)
 Setup parity, data and stop bits for a given UART device.
 
void soft_uart_write (soft_uart_t uart, const uint8_t *data, size_t len)
 Write data from the given buffer to the specified UART device.
 
void soft_uart_poweron (soft_uart_t uart)
 Power on the given UART device.
 
void soft_uart_poweroff (soft_uart_t uart)
 Power off the given UART device.