Skip to content

Commit

Permalink
- reset config register to default
Browse files Browse the repository at this point in the history
- remove additional toggle_features as already enabled in radio start
  • Loading branch information
dsbaha committed Jan 27, 2015
1 parent 4b435c9 commit 8d5e869
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions RF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,8 @@ void RF24::begin(void)
// WARNING: Delay is based on P-variant whereby non-P *may* require different timing.
delay( 5 ) ;

write_register( CONFIG, 0b00001000 ) ;

// Set 1500uS (minimum for 32B payload in ESB@250KBPS) timeouts, to make testing a little easier
// WARNING: If this is ever lowered, either 250KBS mode with AA is broken or maximum packet
// sizes must never be used. See documentation for a more complete explanation.
Expand Down Expand Up @@ -1280,7 +1282,7 @@ void RF24::enableDynamicPayloads(void)
{
// Enable dynamic payload throughout the system

toggle_features();
//toggle_features();
write_register(FEATURE,read_register(FEATURE) | _BV(EN_DPL) );


Expand All @@ -1303,7 +1305,7 @@ void RF24::enableAckPayload(void)
// enable ack payload and dynamic payload features
//

toggle_features();
//toggle_features();
write_register(FEATURE,read_register(FEATURE) | _BV(EN_ACK_PAY) | _BV(EN_DPL) );

IF_SERIAL_DEBUG(printf("FEATURE=%i\r\n",read_register(FEATURE)));
Expand All @@ -1322,7 +1324,7 @@ void RF24::enableDynamicAck(void){
//
// enable dynamic ack features
//
toggle_features();
//toggle_features();
write_register(FEATURE,read_register(FEATURE) | _BV(EN_DYN_ACK) );

IF_SERIAL_DEBUG(printf("FEATURE=%i\r\n",read_register(FEATURE)));
Expand Down

0 comments on commit 8d5e869

Please sign in to comment.