SERIAL_vInit()

Explanation

Initialise the UART (serial port).

This function initializes one UART port and makes it accessible by the SERIAL library.

It is necessary to statically allocate a memory area for the FIFO buffer used internally by the SERIAL library during initialization.

At the same time, we initialize the tsFILE structure for output vfPrintf(), vPutChar().

Argument

Type Name Remark
tsSerialPortSetup* psSetup Structure for configuring the UART.

Returns

None

Sample code

refer to tsSerialPortSetup.