Colin Stearns
/
qcControl
QC Control software
Fork of dgps by
adapt/xbee.cpp@12:e42985e3ea64, 2014-04-05 (annotated)
- Committer:
- dylanembed123
- Date:
- Sat Apr 05 22:27:18 2014 +0000
- Revision:
- 12:e42985e3ea64
- Child:
- 14:6be57da62283
Update packet.h (interface to other c++ code).
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dylanembed123 | 12:e42985e3ea64 | 1 | #include "xbee.h" |
dylanembed123 | 12:e42985e3ea64 | 2 | |
dylanembed123 | 12:e42985e3ea64 | 3 | Serial* XBEE::xbee=NULL; |
dylanembed123 | 12:e42985e3ea64 | 4 | |
dylanembed123 | 12:e42985e3ea64 | 5 | Serial& XBEE::getSerial(){ |
dylanembed123 | 12:e42985e3ea64 | 6 | if(xbee==NULL){ |
dylanembed123 | 12:e42985e3ea64 | 7 | // Init Serial USB |
dylanembed123 | 12:e42985e3ea64 | 8 | xbee=new Serial(XBEEPINTX,XBEEPINRX); |
dylanembed123 | 12:e42985e3ea64 | 9 | xbee->baud(XBEEBAUD); |
dylanembed123 | 12:e42985e3ea64 | 10 | } |
dylanembed123 | 12:e42985e3ea64 | 11 | return *xbee; |
dylanembed123 | 12:e42985e3ea64 | 12 | } |