TMRh20 ported to MBED
Fork of TMRh20 by
Diff: RF24.cpp
- Revision:
- 2:3332510eebba
- Parent:
- 1:8f889354678f
- Child:
- 3:13e43d3101a5
diff -r 8f889354678f -r 3332510eebba RF24.cpp --- a/RF24.cpp Wed Mar 16 11:51:59 2016 +0000 +++ b/RF24.cpp Wed Mar 16 15:53:01 2016 +0000 @@ -33,14 +33,14 @@ //_SPI.beginTransaction(SPISettings(RF24_SPI_SPEED, MSBFIRST, SPI_MODE0)); //#endif csn(LOW); - wait_us(5); + //wait_us(1); } /****************************************************************************/ inline void RF24::endTransaction() { - wait_us(10); + wait_us(2+5); // This is STRANGE here!!! csn(HIGH); //#if defined (RF24_SPI_TRANSACTIONS) //_SPI.endTransaction(); @@ -57,7 +57,7 @@ status = spi.write( R_REGISTER | ( REGISTER_MASK & reg ) ); while ( len-- ) - *buf++ = spi.write(0xff); + *buf++ = spi.write(0x55); // 0xff endTransaction(); //unlocks mutex and setting csn high @@ -274,7 +274,7 @@ pipe0_reading_address[0]=0; //_SPI.begin(csn_pin); - spi.frequency(10000000/5); // 2Mbit, 1/5th the maximum transfer rate for the spi bus + spi.frequency(RF24_SPI_SPEED); spi.format(8,0); mainTimer.start();