Olli Vanhoja
/
xBee
xBee
Revision 0:265bb7b57633, committed 2011-03-01
- Comitter:
- HBP
- Date:
- Tue Mar 01 13:41:37 2011 +0000
- Commit message:
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 265bb7b57633 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Mar 01 13:41:37 2011 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" + +Serial xbee1(p9, p10); +Serial pc(USBTX, USBRX); + +uint32_t i=0; + +void readxBee() +{ + char c; + + i++; + //if(xbee1.readable()) + //{ + xbee1.scanf("%c", &c); + pc.printf("%c", c); + //} + if(c == '?') + { + xbee1.printf("i=%u\n\r", i); + } +} +int main() { + xbee1.attach(&readxBee, Serial::RxIrq); +}
diff -r 000000000000 -r 265bb7b57633 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Mar 01 13:41:37 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912