SERIAL_vFlush()

Explanation

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

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.

Waiting for output to complete may cause instability. In this case, remove this waiting process and check the operation.

If the waiting process is omitted and the output is interrupted, an extra FIFO memory is allocated for the output.

Argument

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);
		...
	}
}

最終更新