Typedefs | |
typedef void(* | serial_uart_rx_cb_t) (uint8_t byte) |
Serial UART RX callback type. More... | |
typedef void(* | serial_uart_tx_cb_t) (void) |
Serial UART TX callback type. More... | |
Functions | |
uint32_t | serial_uart_init (serial_uart_rx_cb_t rx_cb, serial_uart_tx_cb_t tx_cb) |
Initializes the serial interface. More... | |
void | serial_uart_process (void) |
Sends and receives any pending data on the UART line if possible. | |
void | serial_uart_receive_set (bool enable_rx) |
Enable/disable reception of data from the peer device. More... | |
static void | serial_uart_tx_start (void) |
Starts a transfer. More... | |
static void | serial_uart_tx_stop (void) |
Stops a transfer. More... | |
static void | serial_uart_byte_send (uint8_t value) |
Sets the next byte to send. More... | |
typedef void(* serial_uart_rx_cb_t) (uint8_t byte) |
Serial UART RX callback type.
Called upon reception of a byte on the UART interface.
[in] | byte | The received byte on the UART interface. |
Definition at line 56 of file serial_uart.h.
typedef void(* serial_uart_tx_cb_t) (void) |
Serial UART TX callback type.
Called after each successful transfer.
Definition at line 62 of file serial_uart.h.
uint32_t serial_uart_init | ( | serial_uart_rx_cb_t | rx_cb, |
serial_uart_tx_cb_t | tx_cb | ||
) |
Initializes the serial interface.
[in] | rx_cb | The receive callback. |
[in] | tx_cb | The transmit callback. |
NRF_SUCCESS | The UART is successfully initialized. |
NRF_ERROR_NULL | None of the parameters can be an invalid pointer. |
void serial_uart_receive_set | ( | bool | enable_rx | ) |
Enable/disable reception of data from the peer device.
[in] | enable_rx | Set to true in order to enable the reception of data form peer. |
|
inlinestatic |
Starts a transfer.
Definition at line 88 of file serial_uart.h.
|
inlinestatic |
Stops a transfer.
Definition at line 95 of file serial_uart.h.
|
inlinestatic |
Sets the next byte to send.
Definition at line 101 of file serial_uart.h.