Skip to content

Commit 9583356

Browse files
committed
Merge branch 'master' of https://github.com/mysensors/RF24 into development
2 parents 18848a2 + 8759712 commit 9583356

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

libraries/RF24/RF24.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,14 @@ void RF24::openReadingPipe(uint8_t child, uint64_t address)
860860
}
861861
}
862862

863+
/****************************************************************************/
864+
865+
void RF24::closeReadingPipe( uint8_t pipe )
866+
{
867+
write_register(EN_RXADDR,read_register(EN_RXADDR) & ~_BV(pgm_read_byte(&child_pipe_enable[pipe])));
868+
}
869+
870+
863871
/****************************************************************************/
864872

865873
void RF24::toggle_features(void)

libraries/RF24/RF24.h

+9
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,15 @@ class RF24
208208
*/
209209
void openReadingPipe(uint8_t number, uint64_t address);
210210

211+
212+
213+
/**
214+
* Close a pipe after it has been previously opened.
215+
* Can be safely called without having previously opened a pipe.
216+
* @param pipe Which pipe # to close, 0-5.
217+
*/
218+
void closeReadingPipe( uint8_t pipe ) ;
219+
211220
/**@}*/
212221
/**
213222
* @name Advanced Operation

0 commit comments

Comments
 (0)