Flush all buffers on start and stop listening

This commit is contained in:
maniacbug 2011-10-12 20:36:00 -07:00
parent c419532cbe
commit 066d79f21e
1 changed files with 3 additions and 0 deletions

View File

@ -388,6 +388,7 @@ void RF24::startListening(void)
// Flush buffers // Flush buffers
flush_rx(); flush_rx();
flush_tx();
// Go! // Go!
ce(HIGH); ce(HIGH);
@ -401,6 +402,8 @@ void RF24::startListening(void)
void RF24::stopListening(void) void RF24::stopListening(void)
{ {
ce(LOW); ce(LOW);
flush_tx();
flush_rx();
} }
/****************************************************************************/ /****************************************************************************/