SERIAL_vFlush()

Explanation

Wait until the output request has been completed by the SERIAL library.

circle-info

Use this if you want to output all messages before going to sleep. Normally, it is recommended to keep a sufficient FIFO buffer for output and to avoid calling the process as much as possible.

circle-exclamation

Argument

Type

Name

Remark

uint8

u8SerialPort

Serial port (E_AHI_UART_0 or E_AHI_UART_1 should be specified)

Returns

None

Sample code

void cbToCoNet_vMain(void) {
	while (!SERIAL_bRxQueueEmpty(sSerPort.u8SerialPort)) {
		int16 i16Char;
​		i16Char = SERIAL_i16RxChar(sSerPort.u8SerialPort);
vfPrintf(&sSerStream, "\n\r# [%c] --> ", i16Char);
	    SERIAL_vFlush(sSerStream.u8Device);
		...
	}
}

最終更新