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:
- 0:633baa9653b0
- Child:
- 1:e44c66cd2de6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Xbee.cpp Sun Nov 22 01:04:30 2015 +0000 @@ -0,0 +1,21 @@ +#pragma once +#include "Xbee.h" + +void Xbee::Send(const char* buffer) +{ + while(!_xbee.readable()); + _xbee.puts(buffer); +} + +void Xbee::Recv(char* buffer, const size_t& sz) +{ + while(1) + { + if(_xbee.readable()) + { + _xbee.gets(buffer,sz); + break; + } + } + _xbee.putc(' '); +} \ No newline at end of file