This is an experimental driver for the XBee 900 HP pro module's SPI connection. This driver is unfinished and stability is not guaranteed. Use with caution.
Dependents: Sentinel_BASE Sentinel_NODE
Diff: xbee900hp.h
- Revision:
- 0:8c8a8244e590
- Child:
- 1:b97d46c5d7ce
diff -r 000000000000 -r 8c8a8244e590 xbee900hp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xbee900hp.h Mon Apr 20 21:04:26 2015 +0000 @@ -0,0 +1,48 @@ +#ifndef XBEE900HP_H +#define XBEE900HP_H + +#include "mbed.h" + +/** + * Wrapper for the xBee 900 HP Module + */ +class xbee900hp +{ +public: + + /** + * Initialize the xBee Module + */ + xbee900hp(PinName pin_mosi,PinName pin_miso,PinName pin_sck,PinName pin_attn, PinName pin_rst, PinName pin_dout); + + /** + * Destructor + */ + ~xbee900hp(); + + /** + * Subroutine to reset the xBee Module + */ + void reset(); + + /** + * Send packet over spi to xBee for TX + */ + void sendPacket(char* data, unsigned int length); + +private: + // Setup pin input types. + + // Reset + DigitalOut _pin_rst; + // Asert Pin + DigitalIn _pin_attn; + // DOUT + DigitalOut _pin_dout; + + // SPI + SPI _xbeespi; + +}; + +#endif \ No newline at end of file