My fork during debugging.
Fork of NRF2401P by
Diff: NRF2401P.h
- Revision:
- 9:c21b80aaf250
- Parent:
- 8:3e027705ce23
- Child:
- 10:8a217441c38e
--- a/NRF2401P.h Sun Jul 05 23:33:37 2015 +0000 +++ b/NRF2401P.h Sat Jul 11 09:38:59 2015 +0000 @@ -23,6 +23,9 @@ * THE SOFTWARE. * @file "NRF2401P.h" */ + +#ifndef MBED_NRF2401P_H +#define MBED_NRF2401P_H /** \brief A library to drive the nRF24l01+ * @@ -79,6 +82,7 @@ *} *@endcode */ + class NRF2401P { public: @@ -93,6 +97,14 @@ bool dynamic,debug; Serial *pc; + /** Create a radio device for communicating with the RF24L01P via SPI. + * + * @param mosi The SPI slave data input pin. + * @param miso The SPI Slave Data Output (with tri-state option). + * @param sclk The SPI clock pin. + * @param _csn The SPI chip select pin. + * @param _ce Chip Enable pin (Activates RX or TX mode). + */ NRF2401P (PinName mosi, PinName miso, PinName sclk, PinName _csn, PinName _ce); char acknowledgeData(char *data, char width, char pipe); @@ -161,10 +173,18 @@ void start(); char* statusString(); + + /** Print details about the radio setup and configuration + * + * (Need to add ability to print address configurations + */ + void printDetails(); + void writeReg(char address, char *data, char width); void writeReg(char address, char data); void scratch(); -}; \ No newline at end of file +}; +#endif \ No newline at end of file