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.
|
#define
|
uartFlowControlNone
0
|
|
#define
|
uartFlowControlSoftware
0xFFFF
|
|
#define
|
UARTXON
0x11
|
|
#define
|
UARTXOFF
0x13
|
|
◆
sl_iostream_uart_deinit()
UART Stream De-init.
-
Parameters
-
[in]
|
iostream_uart
|
UART stream object.
|
-
Returns
-
Status result
◆
sl_iostream_uart_set_auto_cr_lf()
Configure Automatic line conversion.
-
Parameters
-
[in]
|
iostream_uart
|
UART stream object.
|
[in]
|
on
|
If true, automatic LF to CRLF conversion will be enabled.
|
◆
sl_iostream_uart_get_auto_cr_lf()
Get Automatic line conversion.
-
Parameters
-
[in]
|
iostream_uart
|
UART stream object.
|
-
Returns
-
Auto-conversion mode.
◆
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
|
|
)
|
|
|
|
inline
|
Add or remove energy mode restriction to enable/disable reception when the system goes to sleep.
-
Parameters
-
[in]
|
iostream_uart
|
UART context.
|
[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
|
)
|
|
|
inline
|
Get reception energy mode restriction configuration.
-
Parameters
-
[in]
|
iostream_uart
|
UART context.
|
-
Returns
-
Sleep configuration.
◆
sl_iostream_uart_set_read_block()
Configure Read blocking mode.
-
Parameters
-
[in]
|
iostream_uart
|
UART context.
|
[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()
Get read API block configuration.
-
Parameters
-
[in]
|
iostream_uart
|
UART context.
|
-
Returns
-
Block mode.