Interface layer for the mbed boards ready for the JAVA library
Dependencies: C12832 LM75B MMA7660 mbed FXOS8700Q
Fork of frdm_serial by
comms.h@8:d70e3e3690fd, 2017-01-06 (annotated)
- Committer:
- Condo2k4
- Date:
- Fri Jan 06 11:08:56 2017 +0000
- Revision:
- 8:d70e3e3690fd
- Parent:
- 6:adf2837c1e7f
Extended LCD functionality.; Temporarily disable LEDs
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 | 6:adf2837c1e7f | 15 | void sendBool(bool b); |
Condo2k4 | 5:d9f8c2f63323 | 16 | void sendData(void* data, uint8_t len); |
Condo2k4 | 4:39e949908fc5 | 17 | |
Condo2k4 | 4:39e949908fc5 | 18 | float readFloat(); |
Condo2k4 | 4:39e949908fc5 | 19 | uint16_t readInt16(); |
Condo2k4 | 4:39e949908fc5 | 20 | char readChar(); |
Condo2k4 | 5:d9f8c2f63323 | 21 | uint8_t readString(char * s); |
Condo2k4 | 5:d9f8c2f63323 | 22 | void readData(void* data, uint8_t len); |
Condo2k4 | 4:39e949908fc5 | 23 | |
Condo2k4 | 4:39e949908fc5 | 24 | void sendSpecialCommand(char char1, char char2); |
Condo2k4 | 4:39e949908fc5 | 25 | |
Condo2k4 | 4:39e949908fc5 | 26 | protected: |
Condo2k4 | 5:d9f8c2f63323 | 27 | void readFailureMode(); |
Condo2k4 | 4:39e949908fc5 | 28 | }; |
Condo2k4 | 4:39e949908fc5 | 29 | |
Condo2k4 | 4:39e949908fc5 | 30 | #endif |