same
Fork of RF24 by
Revision 10:0a3f44454ee7, committed 2016-11-30
- Comitter:
- mrcrsch
- Date:
- Wed Nov 30 11:58:38 2016 +0000
- Parent:
- 9:ef74df512fed
- Commit message:
- without poll
Changed in this revision
RF24.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r ef74df512fed -r 0a3f44454ee7 RF24.cpp --- a/RF24.cpp Tue Aug 23 09:28:00 2016 +0000 +++ b/RF24.cpp Wed Nov 30 11:58:38 2016 +0000 @@ -25,42 +25,6 @@ { csn_pin = mode; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } @@ -75,9 +39,8 @@ /****************************************************************************/ inline void RF24::beginTransaction() { - - csn(LOW); + } /****************************************************************************/ @@ -85,8 +48,6 @@ inline void RF24::endTransaction() { csn(HIGH); - - } /****************************************************************************/ @@ -95,26 +56,6 @@ { uint8_t status; - - - - - - - - - - - - - - - - - - - - beginTransaction(); status = spi.write( R_REGISTER | ( REGISTER_MASK & reg ) ); @@ -132,22 +73,7 @@ uint8_t RF24::read_register(uint8_t reg) { - uint8_t result; - - - - - - - - - - - - - - - + uint8_t result; beginTransaction(); spi.write( R_REGISTER | ( REGISTER_MASK & reg ) ); @@ -163,22 +89,7 @@ uint8_t RF24::write_register(uint8_t reg, const uint8_t* buf, uint8_t len) { - uint8_t status; - - - - - - - - - - - - - - - + uint8_t status; beginTransaction(); status = spi.write( W_REGISTER | ( REGISTER_MASK & reg ) ); @@ -201,16 +112,6 @@ - - - - - - - - - - beginTransaction(); status = spi.write( W_REGISTER | ( REGISTER_MASK & reg ) ); spi.write(value); @@ -235,24 +136,6 @@ IF_SERIAL_DEBUG( printf("[Writing %u bytes %u blanks]\n",data_len,blank_len); ); - - - - - - - - - - - - - - - - - - beginTransaction(); status = spi.write( writeType ); while ( data_len-- ) { @@ -282,32 +165,6 @@ IF_SERIAL_DEBUG( printf("[Reading %u bytes %u blanks]\n",data_len,blank_len); ); - - - - - - - - - - - - - - - - - - - - - - - - - - beginTransaction(); status = spi.write( R_RX_PAYLOAD ); while ( data_len-- ) { @@ -510,51 +367,8 @@ - - - - - - - - - - void RF24::printDetails(void) { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - print_status(get_status()); print_address_register(PSTR("RX_ADDR_P0-1"),RX_ADDR_P0,2); @@ -592,44 +406,6 @@ wait_ms(100); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Must allow the radio time to settle else configuration bits will not necessarily stick. // This is actually only required following power up but some settling time also appears to // be required after resets too. For full coverage, we'll always assume the worst.