diff --git a/RF24.cpp b/RF24.cpp index 0ce3e6579..5ef039dfb 100644 --- a/RF24.cpp +++ b/RF24.cpp @@ -545,8 +545,13 @@ void RF24::startWrite( const void* buf, uint8_t len ){ //TMRh20 } -void RF24::txStandBy(){ - ce(LOW); +bool RF24::txStandBy(){ + + if ( (read_register(FIFO_STATUS) & _BV(TX_EMPTY))){ + ce(LOW); + return 1; + } + return 0; } /****************************************************************************/ diff --git a/RF24.h b/RF24.h index 3190ecd28..b666a7622 100644 --- a/RF24.h +++ b/RF24.h @@ -222,7 +222,7 @@ class RF24 public: //TMRh20 - void txStandBy(); + bool txStandBy(); bool writeBlocking( const void* buf, uint8_t len ); void reUseTX(); bool writeFast( const void* buf, uint8_t len ); //Fills FIFO buffer, uses packet re-use function of the chip and returns 0 if packet failed and re-sent