µTasker Forum

µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: syakovlev on July 29, 2008, 05:58:42 PM

Title: Can one use fnFlush(..., FLUSH_TX) on ontput buffers?
Post by: syakovlev on July 29, 2008, 05:58:42 PM
At first glance it looks OK, but has anyone positive experience of doing so?
Thx.
Title: Re: Can one use fnFlush(..., FLUSH_TX) on ontput buffers?
Post by: mark on July 31, 2008, 05:56:36 PM
Hi

Ensure that the following define is set in config.h - this will activate the flush support
    #define SUPPORT_FLUSH                                                // support rx flush

Usage is:
    fnFlush(SerialPortID, FLUSH_TX); // flush output buffer of serial interface
    fnFlush(SerialPortID, FLUSH_RX); // flush input buffer of serial interface


Note that
    fnFlush(SerialPortID, (FLUSH_RX | FLUSH_TX));
is not valid - it will only flush the Tx buffer (i.e. one call for each buffer necessary).

Regards

Mark