Interface layer for the mbed boards ready for the JAVA library
Dependencies: C12832 LM75B MMA7660 mbed FXOS8700Q
Fork of frdm_serial by
Diff: comms.cpp
- Revision:
- 6:adf2837c1e7f
- Parent:
- 5:d9f8c2f63323
diff -r d9f8c2f63323 -r adf2837c1e7f comms.cpp --- a/comms.cpp Fri Dec 04 14:42:01 2015 +0000 +++ b/comms.cpp Mon Dec 21 11:36:29 2015 +0000 @@ -16,6 +16,10 @@ putc(1); putc(c); } +void DataSerial::sendBool(bool b) { + putc(1); putc(b ? 't' : 'f'); +} + float DataSerial::readFloat() { float f; readData(&f,sizeof(float));