Input/Output Stream#

The input/output (I/O) stream service provides data streams for performing read and write operations on a physical communication interface.


Introduction#

The IO Stream module serves as a platform module software, primarily focusing on providing Input/Output functionalities by establishing streams. These streams, acting as abstractions, ensure a uniform approach to read and write data, independent of the specific physical communication interface. Specifically designed for compatibility with UART within the Silicon Labs SDK, the IO Stream module offers a seamless integration.

In practical implementation, the typical setup involves installing the IO Stream: USART component and incorporating the default "vcom" instance to facilitate logging, where the I/O stream service plays a pivotal role. The IO Stream component is equipped with a set of APIs tailored for the efficient reading and writing of serial data. Furthermore, the versatility of this setup is further accentuated by the accessibility of the VCOM serial port over USB, showcasing a comprehensive and effective illustration of serial communication in operation.

Configuration#

The default configuration for this IO stream includes the following settings:

  • Both Transmit (Tx) and Receive (Rx) functionalities are enabled.

  • Operates in Asynchronous mode.

  • Utilizes 8-bit data transfer.

  • Specifies 1 stop bit

  • Implements no parity check.

  • Auto Flow control is disabled.

  • Baud Rate set at 115200.

Usage#

Upon installing the IO Stream: USART component and incorporating the default "vcom" instance for logging purposes, the UART Driver undergoes initialization to facilitate data reading and writing. The IO Stream component offers a suite of APIs expressly designed for efficient handling of serial data. Leveraging these APIs provided by the IO Stream component proves highly convenient for implementing and optimizing serial communication.

For reconfiguration and initialization of IO Stream, the application should make use of the sl_iostream_init_instances function.

Refer to the I/O Stream Documentation for more Information.