read write test for UART/RS232, debug via USB
Dependencies: mbed
Fork of DataLoggerRS232trial by
DataLoggerRS232/DataLoggerRS232.h@2:6ebf09171de9, 2016-09-18 (annotated)
- Committer:
- Dengjj
- Date:
- Sun Sep 18 05:45:40 2016 +0000
- Revision:
- 2:6ebf09171de9
- Parent:
- 0:87fb6735eb09
read biao power summary
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_ |