Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make RF24_POWERUP_DELAY configurable in RF24_config.h #690

Merged
merged 10 commits into from
Nov 29, 2020
2 changes: 1 addition & 1 deletion RF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ void RF24::powerUp(void)
// For nRF24L01+ to go from power down mode to TX or RX mode it must first pass through stand-by mode.
// There must be a delay of Tpd2stby (see Table 16.) after the nRF24L01+ leaves power down mode before
// the CEis set high. - Tpd2stby can be up to 5ms per the 1.0 datasheet
delay(5);
delayMicroseconds(RF24_POWERUP_DELAY);
}
}

Expand Down
13 changes: 11 additions & 2 deletions RF24_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@
#ifndef __RF24_CONFIG_H__
#define __RF24_CONFIG_H__

/*** USER DEFINES: ***/
/*** USER DEFINES: ***/
#define FAILURE_HANDLING
//#define SERIAL_DEBUG
//#define MINIMAL
//#define SPI_UART // Requires library from https://github.com/TMRh20/Sketches/tree/master/SPI_UART
//#define SOFTSPI // Requires library from https://github.com/greiman/DigitalIO


/**
* User access to internally used delay time (in microseconds) during RF24::powerUp()
* @warning This default value compensates for all supported hardware. Only adjust this if you
* know your radio's hardware is, in fact, genuine and reliable.
*/
#if !defined(RF24_POWERUP_DELAY)
#define RF24_POWERUP_DELAY 5000
#endif

/**********************/
#define rf24_max(a,b) (a>b?a:b)
#define rf24_min(a,b) (a<b?a:b)
Expand Down