serial debug Monitor

Committer:
duchonic
Date:
Thu Aug 23 17:53:34 2018 +0000
Revision:
1:a2fab59c3b98
Parent:
0:de1f07a7cd82
serial communication tx/rx works

Who changed what in which revision?

UserRevisionLine numberNew contents of line
duchonic 0:de1f07a7cd82 1 #include "mbed.h"
duchonic 1:a2fab59c3b98 2 #include <string>
duchonic 0:de1f07a7cd82 3
duchonic 0:de1f07a7cd82 4 class debugMonitor
duchonic 0:de1f07a7cd82 5 {
duchonic 0:de1f07a7cd82 6 public:
duchonic 0:de1f07a7cd82 7 /**
duchonic 0:de1f07a7cd82 8 * constructor of debugMonitor
duchonic 0:de1f07a7cd82 9 *
duchonic 0:de1f07a7cd82 10 * @param sda SDA pin
duchonic 0:de1f07a7cd82 11 * @param sdl SCL pin
duchonic 0:de1f07a7cd82 12 */
duchonic 0:de1f07a7cd82 13 debugMonitor(PinName tx, PinName rx);
duchonic 0:de1f07a7cd82 14
duchonic 0:de1f07a7cd82 15 /** deconstructor */
duchonic 0:de1f07a7cd82 16 ~debugMonitor();
duchonic 0:de1f07a7cd82 17
duchonic 0:de1f07a7cd82 18 /**
duchonic 0:de1f07a7cd82 19 * LP55231 Init
duchonic 0:de1f07a7cd82 20 * @returns 0 if ok
duchonic 0:de1f07a7cd82 21 * @returns -1 on error
duchonic 0:de1f07a7cd82 22 */
duchonic 0:de1f07a7cd82 23 uint8_t debugMonitor_Init(void);
duchonic 1:a2fab59c3b98 24
duchonic 0:de1f07a7cd82 25 private:
duchonic 0:de1f07a7cd82 26 /** i2c handler */
duchonic 0:de1f07a7cd82 27 Serial serial;
duchonic 1:a2fab59c3b98 28 string commando;
duchonic 1:a2fab59c3b98 29 void printLine(char *string_p);
duchonic 1:a2fab59c3b98 30 void readLineCallback();
duchonic 1:a2fab59c3b98 31 };
duchonic 1:a2fab59c3b98 32
duchonic 1:a2fab59c3b98 33