Unified UART (Universal Asynchronous Receiver Transmitter) Interface. More...

+ Collaboration diagram for UART:



Detailed Description

A typical use of this API would start with initializing the UART instance. This will initializes the UART with default settings.

retcode = MCU_UART_Initialize(uart, callback);

Now, the UART is configured and active such that the communication can start. The application should use the function MCU_UART_Receive() to receive a certain number bytes. If receiving is non-blocking, the call triggers the receiving process and returns. The callback is invoked with an RxComplete event when the expected number of bytes has been received.

For sending, the application uses the function MCU_UART_Send(). In a non-blocking scenario a callback will happen to notify the application about the success or failure of the sending operation.

The callback may be also called for other events such as errors.

The callback function is usually invoked in the ISR context. The implementation of the callback function must take this into account.
It is possible to disable the entire UART feature in the HAL-BSP configuration file. I.e. the UART code will only be compiled and linked if the feature BCDS_FEATURE_UART is set to 1 in the configuration file.
The driver may work in an interrupt- or DMA-based mode. This depends on the implementation of the driver as well as on the way how the UART hardware is initialized and configured in the BSP.

This documentation file has been automatically generated on Wed May 6 2020 20:45:23 by doxygen 1.8.8