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... | |
Detailed Description
Typedef Documentation
◆ serial_uart_rx_cb_t
| 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.
- Parameters
-
[in] byte The received byte on the UART interface.
Definition at line 56 of file serial_uart.h.
◆ serial_uart_tx_cb_t
| 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.
Function Documentation
◆ serial_uart_init()
| uint32_t serial_uart_init | ( | serial_uart_rx_cb_t | rx_cb, |
| serial_uart_tx_cb_t | tx_cb | ||
| ) |
Initializes the serial interface.
- Parameters
-
[in] rx_cb The receive callback. [in] tx_cb The transmit callback.
- Return values
-
NRF_SUCCESS The UART is successfully initialized. NRF_ERROR_NULL None of the parameters can be an invalid pointer.
◆ serial_uart_receive_set()
| void serial_uart_receive_set | ( | bool | enable_rx | ) |
Enable/disable reception of data from the peer device.
- Parameters
-
[in] enable_rx Set to truein order to enable the reception of data form peer.
◆ serial_uart_tx_start()
|
inlinestatic |
Starts a transfer.
Definition at line 88 of file serial_uart.h.
◆ serial_uart_tx_stop()
|
inlinestatic |
Stops a transfer.
Definition at line 95 of file serial_uart.h.
◆ serial_uart_byte_send()
|
inlinestatic |
Sets the next byte to send.
Definition at line 101 of file serial_uart.h.