Permalink
Browse files

Add isValid

  • Loading branch information...
maniacbug committed Oct 3, 2013
1 parent 8eaad77 commit ebcd0d1d0b3061fcb57444e1dbe5829ef25705cd
Showing with 9 additions and 0 deletions.
  1. +9 −0 RF24.h
View
9 RF24.h
@@ -637,6 +637,15 @@ class RF24
*/
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; }
/**@}*/
};

7 comments on commit ebcd0d1

@borodaxel

This comment has been minimized.

Show comment
Hide comment
@borodaxel

borodaxel Oct 24, 2013

Where should it be used?

borodaxel replied Oct 24, 2013

Where should it be used?

@anthony19

This comment has been minimized.

Show comment
Hide comment
@anthony19

anthony19 Oct 24, 2013

anthony19 replied Oct 24, 2013

@borodaxel

This comment has been minimized.

Show comment
Hide comment
@borodaxel

borodaxel Oct 25, 2013

Sorry for bothering, but there should be a point of this achievement. For example, how this method could be used in projects based on this library. So, what is the practical use? It would be great if you show it with examples.

borodaxel replied Oct 25, 2013

Sorry for bothering, but there should be a point of this achievement. For example, how this method could be used in projects based on this library. So, what is the practical use? It would be great if you show it with examples.

@anthony19

This comment has been minimized.

Show comment
Hide comment
@anthony19

anthony19 Oct 25, 2013

anthony19 replied Oct 25, 2013

@borodaxel

This comment has been minimized.

Show comment
Hide comment
@borodaxel

borodaxel Oct 25, 2013

Sorry, guys. I'm using this library over the year.

I don't speak English quite well, so my questions could be not exact as they should... I asked about isValid() because RF24.h is the only occurrence of this method. It is not used either in examples or in library itself.

borodaxel replied Oct 25, 2013

Sorry, guys. I'm using this library over the year.

I don't speak English quite well, so my questions could be not exact as they should... I asked about isValid() because RF24.h is the only occurrence of this method. It is not used either in examples or in library itself.

@anthony19

This comment has been minimized.

Show comment
Hide comment
@anthony19

anthony19 Oct 25, 2013

anthony19 replied Oct 25, 2013

@mekaci89

This comment has been minimized.

Show comment
Hide comment
@mekaci89

mekaci89 Nov 21, 2017

maniacbug or anyone who knows would help me please ?
I use arduino mega and I use your nrf24 library maniacbug. While using maniacbug nrf24 library, on my arduino mega for CE and CSN pins, where do I need to connect that pins on arduino mega ? I really need your help, thank you.

mekaci89 replied Nov 21, 2017

maniacbug or anyone who knows would help me please ?
I use arduino mega and I use your nrf24 library maniacbug. While using maniacbug nrf24 library, on my arduino mega for CE and CSN pins, where do I need to connect that pins on arduino mega ? I really need your help, thank you.

Please sign in to comment.