xbee communication for UWB quadcopter project Originally by Greg Abdo Forking to reduce impact of interrupt by moving packetbuilder out of the interrupt and letting be handled in the main loop
Fork of com by
com.h
- Committer:
- oprospero
- Date:
- 2014-10-23
- Revision:
- 21:117e01fc0373
- Parent:
- 19:dc9d18037565
File content as of revision 21:117e01fc0373:
#ifndef COM_H #define COM_H #include "mbed.h" #include "queue.h" #include "queueChar.h" int const BAUDRATE = 38400; class com { public: com(PinName, PinName); ~com(); short * read(); bool isData(); bool rdy2ack(); void sendACK(); void write(short,short); void print(char*); private: Serial xbee; // Serial xbtx; queue cmdBuffer; queue txBuffer; queueChar rxBuffer; void callback(); }; #endif