Flush all buffers on start and stop listening
This commit is contained in:
3
RF24.cpp
3
RF24.cpp
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user