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-21
- Revision:
- 19:dc9d18037565
- Parent:
- 17:acef0fb07510
- Child:
- 21:117e01fc0373
File content as of revision 19:dc9d18037565:
#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