Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
Diff: Libs/XbeeManager/XbeeManager.h
- Revision:
- 38:8efacce315ae
- Parent:
- 34:18bcf276d3bf
--- a/Libs/XbeeManager/XbeeManager.h Thu Jan 22 07:59:48 2015 +0000 +++ b/Libs/XbeeManager/XbeeManager.h Sat Feb 07 08:54:51 2015 +0000 @@ -7,12 +7,25 @@ class XbeeManager { public: XbeeManager(PinName tx1, PinName rx1, PinName tx2, PinName rx2, int baud, int txSize, int rxSize); + void baud(int baudrate) { + x1.baud(baudrate); + x2.baud(baudrate); + } + bool txSize(unsigned int size) { + return (x1.txSize(size) && x2.txSize(size)); + } + bool rxSize(unsigned int size) { + return (x1.rxSize(size) && x2.rxSize(size)); + } + bool send(CANMessage &msg); bool receive(CANMessage &msg); unsigned int counterX1in; unsigned int counterX2in; unsigned int counterX1out; unsigned int counterX2out; + unsigned int bytesX1out; + unsigned int bytesX2out; private: bool alternate;