Initialize the driver
Informative
How to bring the UART driver up and down. Binding rules: CHI-UART-MUST-06 and CHI-UART-MUST-07 in Uart — Requirements; signatures in API Reference.
Prerequisites
Before Uart_Init, another module must have configured the channel’s input clock, port pins,
and interrupt controller. The UART driver assumes these are ready (see Overview).
Bring the driver up
Uart_Init(NULL_PTR); /* driver: UNINIT -> INIT; every channel TX/RX -> IDLE */
configPtr must be NULL_PTR — the configuration variant is selected at build time, not
passed at runtime. After Uart_Init returns, the driver is in UART_DRV_STATE_INIT and each
channel’s TX and RX states are IDLE. No reception happens until Uart_StartRxTransaction
is called — the driver does not receive frames straight after init.
Shut down
Uart_DeInit(); /* aborts ongoing TX/RX; driver -> UNINIT */
Uart_DeInit immediately stops any ongoing transmission and reception and de-initialises the
hardware. Query a channel’s current state with Uart_GetChannelTxState / Uart_GetChannelRxState
if you need to observe it.