From ccf32891f02f07564e7a4114cd5468572cd76103 Mon Sep 17 00:00:00 2001 From: maniacbug Date: Sun, 10 Jul 2011 08:18:41 -0700 Subject: [PATCH] comments --- RF24.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/RF24.cpp b/RF24.cpp index 1f2858b08..958877b1e 100644 --- a/RF24.cpp +++ b/RF24.cpp @@ -111,9 +111,14 @@ uint8_t RF24::write_payload(const void* buf, uint8_t len) csn(LOW); status = SPI.transfer( W_TX_PAYLOAD ); uint8_t data_len = min(len,payload_size); - //uint8_t blank_len = payload_size - data_len; while ( data_len-- ) SPI.transfer(*current++); + + // This does not seem to be needed. Keeping it here in case + // removing it does cause problems for static payloads + // + // Send blanks out to the chip to finish off the payload + //uint8_t blank_len = payload_size - data_len; //while ( blank_len-- ) // SPI.transfer(0); @@ -132,11 +137,18 @@ uint8_t RF24::read_payload(void* buf, uint8_t len) csn(LOW); status = SPI.transfer( R_RX_PAYLOAD ); uint8_t data_len = min(len,payload_size); - //uint8_t blank_len = payload_size - data_len; while ( data_len-- ) *current++ = SPI.transfer(0xff); + + // This does not seem to be needed. Keeping it here in case + // removing it does cause problems for static payloads + // + // Read the remaining payload off the chip, even though we will + // throw it away. + //uint8_t blank_len = payload_size - data_len; //while ( blank_len-- ) // SPI.transfer(0xff); + csn(HIGH); return status;