Some improvement on mrcrsch's RF24 library

Dependents:   BabaTalp-NRF

Fork of RF24_fork by Marcell Rausch

Files at this revision

API Documentation at this revision

Comitter:
gume
Date:
Wed Sep 19 22:50:11 2018 +0000
Parent:
12:9a4127130006
Commit message:
adapted radio presence test

Changed in this revision

RF24.cpp Show annotated file Show diff for this revision Revisions of this file
RF24.h Show annotated file Show diff for this revision Revisions of this file
--- a/RF24.cpp	Sat Apr 22 10:52:01 2017 +0000
+++ b/RF24.cpp	Wed Sep 19 22:50:11 2018 +0000
@@ -1315,3 +1315,11 @@
  write_register(SETUP_RETR,(delay&0xf)<<ARD | (count&0xf)<<ARC);
 }
 
+/****************************************************************************/
+bool RF24::isChipConnected()
+{
+  uint8_t setup = read_register(SETUP_AW);
+  if(setup >= 1 && setup <= 3) return true;
+
+  return false;
+}
\ No newline at end of file
--- a/RF24.h	Sat Apr 22 10:52:01 2017 +0000
+++ b/RF24.h	Wed Sep 19 22:50:11 2018 +0000
@@ -943,6 +943,11 @@
    */
   void openWritingPipe(uint64_t address);
 
+  /**
+   * Checks if the chip is connected to the SPI bus
+   */
+  bool isChipConnected();
+
 private:
 
   /**