Commit b7e4a09a authored by TMRh20's avatar TMRh20

De-Activate features by default with RPi

Since RPi behaves more like a PC than Arduino, users should be able to
execute various programs without powering down the radio module, where
an Arduino needs to be re-programmed between code changes, so a full
power-down is not such a dramatic step.

Thanks to sej7278 (GitHub) see:
https://github.com/TMRh20/RF24Network/issues/2
parent 01cac5c3
...@@ -474,6 +474,10 @@ bool RF24::begin(void) ...@@ -474,6 +474,10 @@ bool RF24::begin(void)
// Initialize CRC and request 2-byte (16bit) CRC // Initialize CRC and request 2-byte (16bit) CRC
setCRCLength( RF24_CRC_16 ) ; setCRCLength( RF24_CRC_16 ) ;
toggle_features();
write_register(FEATURE,0 );
write_register(DYNPD,0);
// Reset current status // Reset current status
// Notice reset and flush is the last thing we do // Notice reset and flush is the last thing we do
write_register(STATUS,_BV(RX_DR) | _BV(TX_DS) | _BV(MAX_RT) ); write_register(STATUS,_BV(RX_DR) | _BV(TX_DS) | _BV(MAX_RT) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment