Fork to see if I can get working

Dependencies:   BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated

Fork of xDotBridge_update_test20180823 by Matt Briggs

Committer:
Matt Briggs
Date:
Wed May 10 13:54:25 2017 -0600
Revision:
75:600cb3a9f126
Child:
76:d1b20a259d8f
Skeleton version of terminal.  Compiled version of prototype code

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Matt Briggs 75:600cb3a9f126 1 /*
Matt Briggs 75:600cb3a9f126 2 * SerialTermMgr.h
Matt Briggs 75:600cb3a9f126 3 *
Matt Briggs 75:600cb3a9f126 4 * Created on: May 8, 2017
Matt Briggs 75:600cb3a9f126 5 * Author: mbriggs
Matt Briggs 75:600cb3a9f126 6 */
Matt Briggs 75:600cb3a9f126 7
Matt Briggs 75:600cb3a9f126 8 #ifndef XDOTBRIDGE_INC_SERIALTERMMGR_H_
Matt Briggs 75:600cb3a9f126 9 #define XDOTBRIDGE_INC_SERIALTERMMGR_H_
Matt Briggs 75:600cb3a9f126 10
Matt Briggs 75:600cb3a9f126 11 #include "mbed.h"
Matt Briggs 75:600cb3a9f126 12 #include "BaseboardIO.h"
Matt Briggs 75:600cb3a9f126 13
Matt Briggs 75:600cb3a9f126 14 const uint8_t TERM_TIMEOUT = 30; // In seconds
Matt Briggs 75:600cb3a9f126 15
Matt Briggs 75:600cb3a9f126 16 enum ScreenId {
Matt Briggs 75:600cb3a9f126 17 mainScreenId,
Matt Briggs 75:600cb3a9f126 18 genInfoScreenId,
Matt Briggs 75:600cb3a9f126 19 settingsScreenId,
Matt Briggs 75:600cb3a9f126 20 statsScreenId,
Matt Briggs 75:600cb3a9f126 21 errorLogScreenId,
Matt Briggs 75:600cb3a9f126 22 liveLogScreenId,
Matt Briggs 75:600cb3a9f126 23 enterSerialBridgeScreenId,
Matt Briggs 75:600cb3a9f126 24 enterProgModeScreenId
Matt Briggs 75:600cb3a9f126 25 };
Matt Briggs 75:600cb3a9f126 26
Matt Briggs 75:600cb3a9f126 27
Matt Briggs 75:600cb3a9f126 28 class SerialTermMgr
Matt Briggs 75:600cb3a9f126 29 {
Matt Briggs 75:600cb3a9f126 30 private:
Matt Briggs 75:600cb3a9f126 31 ScreenId mCurrScreen; // Current selection
Matt Briggs 75:600cb3a9f126 32 float mFwVersion;
Matt Briggs 75:600cb3a9f126 33 BaseboardIO *mBbio; // Handle for reading states
Matt Briggs 75:600cb3a9f126 34 Serial *mPc;
Matt Briggs 75:600cb3a9f126 35
Matt Briggs 75:600cb3a9f126 36 bool inputMainPage(char in);
Matt Briggs 75:600cb3a9f126 37 void printMainScreen();
Matt Briggs 75:600cb3a9f126 38 void inputGenInfo (char in);
Matt Briggs 75:600cb3a9f126 39 void printGenInfo();
Matt Briggs 75:600cb3a9f126 40 public:
Matt Briggs 75:600cb3a9f126 41 SerialTermMgr(BaseboardIO *bbio, float fwVersion);
Matt Briggs 75:600cb3a9f126 42 void regSerial (Serial *pc) {
Matt Briggs 75:600cb3a9f126 43 mPc = pc;
Matt Briggs 75:600cb3a9f126 44 }
Matt Briggs 75:600cb3a9f126 45 ScreenId getCurrentScreenId() {
Matt Briggs 75:600cb3a9f126 46 return mCurrScreen;
Matt Briggs 75:600cb3a9f126 47 }
Matt Briggs 75:600cb3a9f126 48 void printScreen();
Matt Briggs 75:600cb3a9f126 49 bool input();
Matt Briggs 75:600cb3a9f126 50 };
Matt Briggs 75:600cb3a9f126 51
Matt Briggs 75:600cb3a9f126 52 #endif /* XDOTBRIDGE_INC_SERIALTERMMGR_H_ */