Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions RF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1110,19 +1110,19 @@ bool RF24::_init_radio()
flush_tx();

// Clear CONFIG register:
// Reflect all IRQ events on IRQ pin
// Reflect NO IRQ events on IRQ pin
// Enable PTX
// Power Up
// 16-bit CRC (CRC required by auto-ack)
// Do not write CE high so radio will remain in standby I mode
// PTX should use only 22uA of power
write_register(NRF_CONFIG, (_BV(EN_CRC) | _BV(CRCO)));
write_register(NRF_CONFIG, (_BV(EN_CRC) | _BV(CRCO) | _BV(MASK_RX_DR) | _BV(MASK_TX_DS) | _BV(MASK_MAX_RT)));
config_reg = read_register(NRF_CONFIG);

powerUp();

// if config is not set correctly then there was a bad response from module
return config_reg == (_BV(EN_CRC) | _BV(CRCO) | _BV(PWR_UP)) ? true : false;
return config_reg == (_BV(EN_CRC) | _BV(CRCO) | _BV(PWR_UP) | _BV(MASK_RX_DR) | _BV(MASK_TX_DS) | _BV(MASK_MAX_RT)) ? true : false;
}

/****************************************************************************/
Expand Down
Loading