Terry Tam
/
DataLoggerRS232trial
Sample RS232 class lib inherits Serial Class
DataLoggerRS232/DataLoggerRS232.h@0:87fb6735eb09, 2014-06-16 (annotated)
- Committer:
- terrytamyh
- Date:
- Mon Jun 16 23:05:40 2014 +0000
- Revision:
- 0:87fb6735eb09
Sample RS232 class lib inherits Serial Class
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
terrytamyh | 0:87fb6735eb09 | 1 | #include "mbed.h" |
terrytamyh | 0:87fb6735eb09 | 2 | |
terrytamyh | 0:87fb6735eb09 | 3 | #ifndef DataLogger_RS232_H_ |
terrytamyh | 0:87fb6735eb09 | 4 | #define DataLogger_RS232_H_ |
terrytamyh | 0:87fb6735eb09 | 5 | |
terrytamyh | 0:87fb6735eb09 | 6 | class DataLoggerRS232 : public Serial |
terrytamyh | 0:87fb6735eb09 | 7 | { |
terrytamyh | 0:87fb6735eb09 | 8 | public: |
terrytamyh | 0:87fb6735eb09 | 9 | |
terrytamyh | 0:87fb6735eb09 | 10 | DataLoggerRS232(PinName tx,PinName rx, const char* name=NULL); |
terrytamyh | 0:87fb6735eb09 | 11 | |
terrytamyh | 0:87fb6735eb09 | 12 | virtual ~DataLoggerRS232(); |
terrytamyh | 0:87fb6735eb09 | 13 | |
terrytamyh | 0:87fb6735eb09 | 14 | int count; |
terrytamyh | 0:87fb6735eb09 | 15 | void get_ECU_databyte(); |
terrytamyh | 0:87fb6735eb09 | 16 | void display_ECU_databyte(); |
terrytamyh | 0:87fb6735eb09 | 17 | |
terrytamyh | 0:87fb6735eb09 | 18 | private: |
terrytamyh | 0:87fb6735eb09 | 19 | |
terrytamyh | 0:87fb6735eb09 | 20 | // Serial serial; |
terrytamyh | 0:87fb6735eb09 | 21 | |
terrytamyh | 0:87fb6735eb09 | 22 | char c; |
terrytamyh | 0:87fb6735eb09 | 23 | char MSserial; |
terrytamyh | 0:87fb6735eb09 | 24 | |
terrytamyh | 0:87fb6735eb09 | 25 | char* ringBuffer; |
terrytamyh | 0:87fb6735eb09 | 26 | char* rHead; |
terrytamyh | 0:87fb6735eb09 | 27 | char* rPos; |
terrytamyh | 0:87fb6735eb09 | 28 | char* rDisplay; |
terrytamyh | 0:87fb6735eb09 | 29 | |
terrytamyh | 0:87fb6735eb09 | 30 | |
terrytamyh | 0:87fb6735eb09 | 31 | }; |
terrytamyh | 0:87fb6735eb09 | 32 | |
terrytamyh | 0:87fb6735eb09 | 33 | #endif // DataLogger_RS232_H_ |