![](/media/cache/group/download_IjbieK2.png.50x50_q85.png)
demo new haven display
Dependencies: LCD Menu ButtonCtrl TimeManagement EventLog AddressMap emic2
ESCM 2000 Control and Display application provides interface for the LPC1768 processor boards with the ECSM 2000 system.
This application implements SW interface : - RX 485 Receive from physical system - RX 485 Interface to send toECOM / ESCM board - CAN Interface to send to ECOM / ESCM board - 4x40 LCD with menu controls - RTC configuration -EMIC2 Sound Card - GPIO Extender to push buttons etc
ESCMControlApp.h@3:ecaf9963341b, 2019-07-25 (annotated)
- Committer:
- foxbrianr
- Date:
- Thu Jul 25 00:45:01 2019 +0000
- Revision:
- 3:ecaf9963341b
- Child:
- 5:65f21c0b6b79
Baseline for testing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
foxbrianr | 3:ecaf9963341b | 1 | #ifndef _ESCM_CONTROL_APP_ |
foxbrianr | 3:ecaf9963341b | 2 | #define _ESCM_CONTROL_APP_ |
foxbrianr | 3:ecaf9963341b | 3 | |
foxbrianr | 3:ecaf9963341b | 4 | |
foxbrianr | 3:ecaf9963341b | 5 | #include "mbed.h" |
foxbrianr | 3:ecaf9963341b | 6 | #include "Menu.h" |
foxbrianr | 3:ecaf9963341b | 7 | #include "Navigator.h" |
foxbrianr | 3:ecaf9963341b | 8 | #include "Selection.h" |
foxbrianr | 3:ecaf9963341b | 9 | #include "LCD.h" |
foxbrianr | 3:ecaf9963341b | 10 | #include "AddressMap.h" |
foxbrianr | 3:ecaf9963341b | 11 | #include "EventLog.h" |
foxbrianr | 3:ecaf9963341b | 12 | #include "TimeUtilities.h" |
foxbrianr | 3:ecaf9963341b | 13 | |
foxbrianr | 3:ecaf9963341b | 14 | #include "emic2.h" |
foxbrianr | 3:ecaf9963341b | 15 | |
foxbrianr | 3:ecaf9963341b | 16 | |
foxbrianr | 3:ecaf9963341b | 17 | extern LCD lcd; |
foxbrianr | 3:ecaf9963341b | 18 | |
foxbrianr | 3:ecaf9963341b | 19 | extern ESCM_EventLog escmEventLog; |
foxbrianr | 3:ecaf9963341b | 20 | |
foxbrianr | 3:ecaf9963341b | 21 | extern RealTimeClock rtc; |
foxbrianr | 3:ecaf9963341b | 22 | |
foxbrianr | 3:ecaf9963341b | 23 | extern Serial rs485port1; |
foxbrianr | 3:ecaf9963341b | 24 | extern DigitalOut rs485port1mode; |
foxbrianr | 3:ecaf9963341b | 25 | |
foxbrianr | 3:ecaf9963341b | 26 | extern Serial rs485port2; |
foxbrianr | 3:ecaf9963341b | 27 | extern DigitalOut rs485port2mode; |
foxbrianr | 3:ecaf9963341b | 28 | |
foxbrianr | 3:ecaf9963341b | 29 | extern CAN canport; |
foxbrianr | 3:ecaf9963341b | 30 | extern DigitalOut canportmode; |
foxbrianr | 3:ecaf9963341b | 31 | |
foxbrianr | 3:ecaf9963341b | 32 | extern emic2 speaker; |
foxbrianr | 3:ecaf9963341b | 33 | |
foxbrianr | 3:ecaf9963341b | 34 | |
foxbrianr | 3:ecaf9963341b | 35 | class ESCMControlApp |
foxbrianr | 3:ecaf9963341b | 36 | { |
foxbrianr | 3:ecaf9963341b | 37 | |
foxbrianr | 3:ecaf9963341b | 38 | public: |
foxbrianr | 3:ecaf9963341b | 39 | Menu getAddressMenu(); |
foxbrianr | 3:ecaf9963341b | 40 | |
foxbrianr | 3:ecaf9963341b | 41 | void init(void); |
foxbrianr | 3:ecaf9963341b | 42 | void update(void); |
foxbrianr | 3:ecaf9963341b | 43 | |
foxbrianr | 3:ecaf9963341b | 44 | //void rx485Message(); |
foxbrianr | 3:ecaf9963341b | 45 | void tx485Message(int address); |
foxbrianr | 3:ecaf9963341b | 46 | void txCanMessage501 (int address); |
foxbrianr | 3:ecaf9963341b | 47 | void txCanMessage502 (int address); |
foxbrianr | 3:ecaf9963341b | 48 | |
foxbrianr | 3:ecaf9963341b | 49 | static void say (char *format, ...); |
foxbrianr | 3:ecaf9963341b | 50 | |
foxbrianr | 3:ecaf9963341b | 51 | int dataRxCnt; |
foxbrianr | 3:ecaf9963341b | 52 | int cur_address; |
foxbrianr | 3:ecaf9963341b | 53 | |
foxbrianr | 3:ecaf9963341b | 54 | |
foxbrianr | 3:ecaf9963341b | 55 | char fault[4]; |
foxbrianr | 3:ecaf9963341b | 56 | }; |
foxbrianr | 3:ecaf9963341b | 57 | |
foxbrianr | 3:ecaf9963341b | 58 | #endif |