I/O Stream UART#
I/O Stream UART.
Overview#
UART layer provides a set of standard APIs that can be used with all type of UART interface.
Initialization#
Each UART stream type provides its initalization with parameters specific to them. Note
Each UART stream requires a dedicated (L)DMA channel through DMADRV.
Modules#
Functions#
UART Stream De-init.
Configure Automatic line conversion.
Get Automatic line conversion.
UART Set next byte detect IRQ.
Add or remove energy mode restriction to enable/disable reception when the system goes to sleep.
Get reception energy mode restriction configuration.
Configure Read blocking mode.
Get read API block configuration.
Macros#
uart flow control none
uart flow control software
uartx on
uartx off
Function Documentation#
sl_iostream_uart_deinit#
sl_status_t sl_iostream_uart_deinit (sl_iostream_uart_t * iostream_uart)
UART Stream De-init.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_iostream_uart_t * | [in] | iostream_uart | UART stream object. |
Returns
Status result
sl_iostream_uart_set_auto_cr_lf#
void sl_iostream_uart_set_auto_cr_lf (sl_iostream_uart_t * iostream_uart, bool on)
Configure Automatic line conversion.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_iostream_uart_t * | [in] | iostream_uart | UART stream object. |
bool | [in] | on | If true, automatic LF to CRLF conversion will be enabled. |
sl_iostream_uart_get_auto_cr_lf#
bool sl_iostream_uart_get_auto_cr_lf (sl_iostream_uart_t * iostream_uart)
Get Automatic line conversion.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_iostream_uart_t * | [in] | iostream_uart | UART stream object. |
Returns
Auto-conversion mode.
sl_iostream_uart_prepare_for_sleep#
void sl_iostream_uart_prepare_for_sleep (sl_iostream_uart_t * iostream_uart)
UART Set next byte detect IRQ.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_iostream_uart_t * | [in] | iostream_uart | UART stream object. |
sl_iostream_uart_set_rx_energy_mode_restriction#
void sl_iostream_uart_set_rx_energy_mode_restriction (sl_iostream_uart_t * iostream_uart, bool on)
Add or remove energy mode restriction to enable/disable reception when the system goes to sleep.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_iostream_uart_t * | [in] | iostream_uart | UART context. |
bool | [in] | on | If true, will be able to receive data when sleeping. i.e it affects the lowest power level that the system can go. Otherwise, it might not be possible to receive data when sleeping. |
sl_iostream_uart_get_rx_energy_mode_restriction#
bool sl_iostream_uart_get_rx_energy_mode_restriction (sl_iostream_uart_t * iostream_uart)
Get reception energy mode restriction configuration.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_iostream_uart_t * | [in] | iostream_uart | UART context. |
Returns
Sleep configuration.
sl_iostream_uart_set_read_block#
void sl_iostream_uart_set_read_block (sl_iostream_uart_t * iostream_uart, bool on)
Configure Read blocking mode.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_iostream_uart_t * | [in] | iostream_uart | UART context. |
bool | [in] | on | If false, the read API will be non-blocking. Otherwise the read API will block until data is received. |
sl_iostream_uart_get_read_block#
bool sl_iostream_uart_get_read_block (sl_iostream_uart_t * iostream_uart)
Get read API block configuration.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_iostream_uart_t * | [in] | iostream_uart | UART context. |
Returns
Block mode.