From b697fd4e79453c2450b88a441e2e1a36e78442fc Mon Sep 17 00:00:00 2001 From: maniacbug Date: Tue, 10 May 2011 15:16:06 -0700 Subject: [PATCH] Added powerDown(). --- RF24.cpp | 7 +++++++ RF24.h | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/RF24.cpp b/RF24.cpp index 215ade7..24c074a 100644 --- a/RF24.cpp +++ b/RF24.cpp @@ -333,6 +333,13 @@ void RF24::stopListening(void) /******************************************************************/ +void RF24::powerDown(void) +{ + write_register(CONFIG,0); +} + +/******************************************************************/ + boolean RF24::write( const void* buf, uint8_t len ) { boolean result = false; diff --git a/RF24.h b/RF24.h index e920b3f..593e80c 100644 --- a/RF24.h +++ b/RF24.h @@ -223,6 +223,14 @@ public: */ void stopListening(void); + /** + * Enter low-power mode + * + * To return to normal power mode, either write() some data or + * startListening(). + */ + void powerDown(void); + /** * Write to the open writing pipe *