Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of nRF24L01P_Maniacbug by
Diff: nRF24L01P_Maniacbug.cpp
- Revision:
- 4:491267614a10
- Parent:
- 2:a483f426d380
- Child:
- 5:7463cf21b7fb
- Child:
- 7:5ddd7a2fcb70
--- a/nRF24L01P_Maniacbug.cpp Thu Apr 25 14:45:45 2013 +0000
+++ b/nRF24L01P_Maniacbug.cpp Thu May 23 13:44:14 2013 +0000
@@ -393,6 +393,9 @@
// Flush buffers
flush_rx();
flush_tx();
+
+ // set EN_RXADDRR to 0 to fix pipe 0 from receiving
+ write_register(EN_RXADDR, 0);
}
/****************************************************************************/
@@ -500,10 +503,10 @@
// Yay, we are done.
// Power down
- powerDown();
+// powerDown();
// Flush buffers (Is this a relic of past experimentation, and not needed anymore?
- flush_tx();
+// flush_tx();
return result;
}
@@ -514,7 +517,7 @@
// Transmitter power-up
write_register(CONFIG, ( read_register(CONFIG) | _BV(PWR_UP) ) & ~_BV(PRIM_RX) );
// wait_msMicroseconds(150);
- wait_us(150);
+ wait_us(130);
// Send the payload
write_payload( buf, len );
@@ -522,7 +525,7 @@
// Allons!
ce(HIGH);
// wait_msMicroseconds(15);
- wait_us(15);
+ wait_us(15);
ce(LOW);
}
@@ -618,6 +621,8 @@
const uint8_t max_payload_size = 32;
write_register(RX_PW_P0,min(payload_size,max_payload_size));
+
+ flush_tx();
}
/****************************************************************************/
@@ -994,5 +999,3 @@
else
return b;
}
-
-// vim:ai:cin:sts=2 sw=2 ft=cpp
