Skip to content

Commit 586e9c7

Browse files
committed
Added isValid() method to RF24.h as requested by andreij in http://forum.mysensors.org/topic/6/update-rf24-library-to-latest-version#12
1 parent c5661ca commit 586e9c7

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)