Fix: Standby after regular write cmd
Realized that the normal write command should always drop to standby-I mode immediately since the FIFO cannot be filled using this method, and TX will be complete.
This commit is contained in:
@@ -455,6 +455,8 @@ bool RF24::write( const void* buf, uint8_t len )
|
|||||||
//If autoAck is ON, a payload has to be written prior to reading a payload, else write after reading a payload
|
//If autoAck is ON, a payload has to be written prior to reading a payload, else write after reading a payload
|
||||||
while( ! ( get_status() & ( _BV(TX_DS) | _BV(MAX_RT) ))) { }
|
while( ! ( get_status() & ( _BV(TX_DS) | _BV(MAX_RT) ))) { }
|
||||||
|
|
||||||
|
ce(LOW); //Set the radio back to STANDBY-I mode since we can only fill one buffer at a time using this method, and tx is complete
|
||||||
|
|
||||||
uint8_t status = write_register(STATUS,_BV(RX_DR) | _BV(TX_DS) | _BV(MAX_RT) );
|
uint8_t status = write_register(STATUS,_BV(RX_DR) | _BV(TX_DS) | _BV(MAX_RT) );
|
||||||
|
|
||||||
//Max retries exceeded
|
//Max retries exceeded
|
||||||
|
|||||||
@@ -354,7 +354,9 @@ public:
|
|||||||
* the manufacturer to drop the radio out of TX or STANDBY-II mode if there is
|
* the manufacturer to drop the radio out of TX or STANDBY-II mode if there is
|
||||||
* time enough between sends for the FIFOs to empty.
|
* time enough between sends for the FIFOs to empty.
|
||||||
*
|
*
|
||||||
* @note This does NOT need to be called when using per-payload noACK commands.
|
* @note This does NOT need to be called when using per-payload noACK commands,
|
||||||
|
* or when using the regular write command since it is only capable of single
|
||||||
|
* payload transmission..
|
||||||
* Per the datasheet, the radio will automatically engage STANDBY-I mode when
|
* Per the datasheet, the radio will automatically engage STANDBY-I mode when
|
||||||
* using the W_TX_PAYLOAD_NOACK command.
|
* using the W_TX_PAYLOAD_NOACK command.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user