From ebcd0d1d0b3061fcb57444e1dbe5829ef25705cd Mon Sep 17 00:00:00 2001 From: maniacbug Date: Thu, 3 Oct 2013 06:53:28 -0700 Subject: [PATCH] Add isValid --- RF24.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/RF24.h b/RF24.h index 141bdab..18914f0 100644 --- a/RF24.h +++ b/RF24.h @@ -637,6 +637,15 @@ 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; } + /**@}*/ };