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
xbee900hp.h
- Committer:
- ottaviano3
- Date:
- 2015-04-23
- Revision:
- 2:7f4ddf710a44
- Parent:
- 1:b97d46c5d7ce
- Child:
- 3:3c3707b0f5cd
File content as of revision 2:7f4ddf710a44:
#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); /** * 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); /** * Write a setting value to the module */ void writeSetting(char command[2], unsigned int value); /** * Wait for and read incoming data packet */ int readPacket(char* data); /** * Check ATTN signal */ int attn(); private: // Setup pin input types. // Reset DigitalOut _pin_rst; // Asert Pin Use Interrupts for Super Speed DigitalIn _pin_attn; void readDataISR(); // SPI SPI _xbeespi; }; #endif