Skip to content
Snippets Groups Projects
Commit a73f21f7 authored by Daniel Friesel's avatar Daniel Friesel
Browse files

implement powerDown function

parent e5058734
No related branches found
No related tags found
No related merge requests found
...@@ -95,6 +95,12 @@ void Nrf24l01::powerUp(void) ...@@ -95,6 +95,12 @@ void Nrf24l01::powerUp(void)
} }
} }
void Nrf24l01::powerDown(void)
{
gpio.write(NRF24L01_EN_PIN, 0);
writeRegister(NRF_CONFIG, readRegister(NRF_CONFIG) & ~(1 << PWR_UP));
}
void Nrf24l01::setRetries(uint8_t delay, uint8_t count) void Nrf24l01::setRetries(uint8_t delay, uint8_t count)
{ {
writeRegister(SETUP_RETR, (delay & 0xf) << ARD | (count & 0xf) << ARC); writeRegister(SETUP_RETR, (delay & 0xf) << ARD | (count & 0xf) << ARC);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment