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 Prosper Van

Committer:
oprospero
Date:
Mon Oct 06 04:59:20 2014 +0000
Revision:
17:acef0fb07510
Parent:
16:89695823d407
Child:
19:dc9d18037565
Working ; 255

Who changed what in which revision?

UserRevisionLine numberNew contents of line
oprospero 0:26a151d2c6db 1 #ifndef COM_H
oprospero 0:26a151d2c6db 2 #define COM_H
oprospero 17:acef0fb07510 3
oprospero 0:26a151d2c6db 4
oprospero 0:26a151d2c6db 5 #include "mbed.h"
oprospero 0:26a151d2c6db 6 #include "queue.h"
oprospero 17:acef0fb07510 7 #include "queueChar.h"
oprospero 13:2fb7b19dcd70 8
oprospero 17:acef0fb07510 9 int const BAUDRATE = 38400;
oprospero 0:26a151d2c6db 10
oprospero 0:26a151d2c6db 11 class com
oprospero 17:acef0fb07510 12 {
oprospero 17:acef0fb07510 13 public:
oprospero 17:acef0fb07510 14 com(PinName, PinName);
oprospero 17:acef0fb07510 15 ~com();
oprospero 17:acef0fb07510 16 short * read();
oprospero 17:acef0fb07510 17 bool isData();
oprospero 17:acef0fb07510 18 bool rdy2ack();
oprospero 17:acef0fb07510 19 void sendACK();
oprospero 17:acef0fb07510 20 void write(short,short);
oprospero 17:acef0fb07510 21
oprospero 17:acef0fb07510 22
oprospero 17:acef0fb07510 23 private:
oprospero 17:acef0fb07510 24 Serial xbee;
oprospero 17:acef0fb07510 25 queue cmdBuffer;
oprospero 17:acef0fb07510 26 queue txBuffer;
oprospero 17:acef0fb07510 27 queueChar rxBuffer;
oprospero 17:acef0fb07510 28 void callback();
oprospero 1:4f53de75bc96 29
oprospero 0:26a151d2c6db 30 };
oprospero 0:26a151d2c6db 31
oprospero 0:26a151d2c6db 32 #endif