Interface layer for the mbed boards ready for the JAVA library
Dependencies: C12832 LM75B MMA7660 mbed FXOS8700Q
Fork of frdm_serial by
comms.h@5:d9f8c2f63323, 2015-12-04 (annotated)
- Committer:
- Condo2k4
- Date:
- Fri Dec 04 14:42:01 2015 +0000
- Revision:
- 5:d9f8c2f63323
- Parent:
- 4:39e949908fc5
- Child:
- 6:adf2837c1e7f
Final changes to MBed library.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Condo2k4 | 4:39e949908fc5 | 1 | #ifndef DATASERIAL |
Condo2k4 | 4:39e949908fc5 | 2 | #define DATASERIAL |
Condo2k4 | 4:39e949908fc5 | 3 | |
Condo2k4 | 4:39e949908fc5 | 4 | #include "mbed.h" |
Condo2k4 | 4:39e949908fc5 | 5 | |
Condo2k4 | 4:39e949908fc5 | 6 | class DataSerial : public Serial |
Condo2k4 | 4:39e949908fc5 | 7 | { |
Condo2k4 | 4:39e949908fc5 | 8 | public: |
Condo2k4 | 4:39e949908fc5 | 9 | DataSerial(PinName tx, PinName rx); |
Condo2k4 | 4:39e949908fc5 | 10 | ~DataSerial(); |
Condo2k4 | 4:39e949908fc5 | 11 | |
Condo2k4 | 4:39e949908fc5 | 12 | void sendFloat(float &f); |
Condo2k4 | 4:39e949908fc5 | 13 | void sendInt16(uint16_t &i); |
Condo2k4 | 4:39e949908fc5 | 14 | void sendChar(char c); |
Condo2k4 | 5:d9f8c2f63323 | 15 | void sendData(void* data, uint8_t len); |
Condo2k4 | 4:39e949908fc5 | 16 | |
Condo2k4 | 4:39e949908fc5 | 17 | float readFloat(); |
Condo2k4 | 4:39e949908fc5 | 18 | uint16_t readInt16(); |
Condo2k4 | 4:39e949908fc5 | 19 | char readChar(); |
Condo2k4 | 5:d9f8c2f63323 | 20 | uint8_t readString(char * s); |
Condo2k4 | 5:d9f8c2f63323 | 21 | void readData(void* data, uint8_t len); |
Condo2k4 | 4:39e949908fc5 | 22 | |
Condo2k4 | 4:39e949908fc5 | 23 | void sendSpecialCommand(char char1, char char2); |
Condo2k4 | 4:39e949908fc5 | 24 | |
Condo2k4 | 4:39e949908fc5 | 25 | protected: |
Condo2k4 | 5:d9f8c2f63323 | 26 | void readFailureMode(); |
Condo2k4 | 4:39e949908fc5 | 27 | }; |
Condo2k4 | 4:39e949908fc5 | 28 | |
Condo2k4 | 4:39e949908fc5 | 29 | #endif |