ResetReceive

Availability All terminals
Description This function resets the serial receiver electronics and associated software of the communications port last opened with ComOpen(). It also clears the receive buffers.
Syntax void ResetReceive( void );
Arguments None
Returns None
Remarks Like ResetKey(), this routine can be used to delete old data. In this case data still in the receive buffer is cleared.
Example
#include <stdio.h>
#include "lib.h"

void main( void )
{
    int ch;

    ComOpen( COM9 );    // Open the USB-VCP port

    for(;;)
    {
        ResetReceive();    // Clear receive buffer

        while(GetCom( 0 ) != CR)   // Wait for enter
        {
            Idle();    // Very important to lower the power consumption
        }
        PutCom( '!' );
        
        Delay(2 * 50);    // Ignore all data for 2 seconds
    }
}