Added isValid() method to RF24.h as requested by andreij in http://forum.mysensors.org/topic/6/update-rf24-library-to-latest-version#12

This commit is contained in:
Bruce Lacey
2014-03-23 21:24:00 -07:00
parent c5661caf17
commit 586e9c7740
+8
View File
@@ -673,6 +673,14 @@ public:
*/
bool testRPD(void) ;
/**
* Test whether this is a real radio, or a mock shim for
* debugging. Setting either pin to 0xff is the way to
* indicate that this is not a real radio.
*
* @return true if this is a legitimate radio
*/
bool isValid() { return ce_pin != 0xff && csn_pin != 0xff; }
/**
* Calculate the maximum timeout in us based on current hardware