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.
Diff: Xbee.cpp
- Revision:
- 25:78fdcbf803c9
- Parent:
- 24:cdeaeae3bc1b
- Child:
- 26:282047f761ea
diff -r cdeaeae3bc1b -r 78fdcbf803c9 Xbee.cpp
--- a/Xbee.cpp Sat Nov 28 05:43:13 2015 +0000
+++ b/Xbee.cpp Sat Nov 28 05:52:02 2015 +0000
@@ -19,19 +19,17 @@
void Xbee::Send(const char& buffer)
{
- if(_xbee.readable())
+ while(1)
{
- while(1)
+ if(_xbee.writeable())
{
- if(_xbee.writeable())
- {
- _xbee.putc(buffer);
- }
-
- if(_xbee.readable())
- {
- break;
- }
+ _xbee.putc(buffer);
+ //pc.printf("%s","here");
+ }
+
+ if(_xbee.readable())
+ {
+ break;
}
}
}