Skip to content

Commit 01d06cd

Browse files
committed
Merge pull request arduino#7 from bblacey/RF24-isValid-patch
Added isValid() method to RF24.h as requested by andreij in http://forum...
2 parents c5661ca + 586e9c7 commit 01d06cd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libraries/RF24/RF24.h

+8
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,14 @@ class RF24
673673
*/
674674
bool testRPD(void) ;
675675

676+
/**
677+
* Test whether this is a real radio, or a mock shim for
678+
* debugging. Setting either pin to 0xff is the way to
679+
* indicate that this is not a real radio.
680+
*
681+
* @return true if this is a legitimate radio
682+
*/
683+
bool isValid() { return ce_pin != 0xff && csn_pin != 0xff; }
676684

677685
/**
678686
* Calculate the maximum timeout in us based on current hardware

0 commit comments

Comments
 (0)