diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-07-16 14:52:32 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-07-16 14:52:32 +0200 |
commit | b47295e3b04413cc5d278df2ea8fe2c168beefd2 (patch) | |
tree | ebf340f74ad5fcbd1db4d0e3bee091356c9bc3de /include | |
parent | a426c8d552d4b477758f90d6bb08619fb1ff3edd (diff) |
more radio tests
Diffstat (limited to 'include')
-rw-r--r-- | include/driver/nrf24l01.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/include/driver/nrf24l01.h b/include/driver/nrf24l01.h index e753604..ecf4bc2 100644 --- a/include/driver/nrf24l01.h +++ b/include/driver/nrf24l01.h @@ -60,7 +60,7 @@ private: */ uint8_t writePayload(const void *buf, uint8_t data_len, const uint8_t writeType); - /** + /** * Read the receive payload * * The size of data read is the fixed payload size, see getPayloadSize() @@ -69,7 +69,7 @@ private: * @param len Maximum number of bytes to read * @return Current value of status register */ - uint8_t readPayload(void* buf, uint8_t len); + uint8_t readPayload(void *buf, uint8_t len); inline void csnHigh() { @@ -81,6 +81,16 @@ private: gpio.write(NRF24L01_CS_PIN, 0); arch.delay_us(5); } + inline void ceHigh() + { + gpio.write(NRF24L01_EN_PIN, 1); + arch.delay_us(5); + } + inline void ceLow() + { + gpio.write(NRF24L01_EN_PIN, 0); + arch.delay_us(5); + } inline void beginTransaction() { csnLow(); @@ -515,7 +525,7 @@ s * void openWritingPipe(const uint8_t *address); - /** + /** * Test whether there was a carrier on the line for the * previous listening period. * @@ -523,9 +533,9 @@ s * * * @return true if was carrier, false if not */ - bool testCarrier(void); + bool testCarrier(void); - /** + /** * Test whether a signal (carrier or otherwise) greater than * or equal to -64dBm is present on the channel. Valid only * on nRF24L01P (+) hardware. On nRF24L01, use testCarrier(). @@ -542,7 +552,7 @@ s * * @endcode * @return true if signal => -64dBm, false if not */ - bool testRPD(void); + bool testRPD(void); uint8_t getStatus(); }; |