µTasker Forum

µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: neil on September 08, 2008, 01:39:13 PM

Title: flushing serial buffer
Post by: neil on September 08, 2008, 01:39:13 PM
Hi mark,
  What is the best way to flush the serial buffer?

Neil
Title: Re: flushing serial buffer
Post by: mark on September 08, 2008, 01:54:13 PM
Hi Neil

Ensure that the following define is active:
#define SUPPORT_FLUSH

Then you can use:
    fnFlush( InterfaceHandle, FLUSH_RX);
and/or
    fnFlush( InterfaceHandle, FLUSH_TX);

Note that fnFlush( InterfaceHandle, (FLUSH_TX | FLUSH_RX)); is however not allowed:

Regards

Mark