forked from DCC-EX/CommandStation-EX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLaboxModes.h
41 lines (34 loc) · 1.09 KB
/
LaboxModes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//-------------------------------------------------------------------
#ifndef __LaboxModes_hpp__
#define __LaboxModes_hpp__
//-------------------------------------------------------------------
#include <Arduino.h>
#include "defines.h"
enum ProgType {
MAIN = 'M',
CV1ADDR = 'P',
CVREAD = 'Q',
CVWRITE = 'R',
SILENTRETURNTOMAIN = 'B',
IDENTIFY = 'I'
};
/** This is a class to handle external communications.
An instance of this class receive message from external world and call DCCEX API functions.
*/
class LaboxModes {
public:
static bool DIAGLABOXMODES;
// True if the ESP is in programmation mode.
static bool progMode;
// Type of programmation mode.
static ProgType progModeType;
// Ture if the boot should not show logos and startup messages on the screen.
static bool silentBootMode;
// Position of the byte 'M' or 'P' for Main or Prog track mode.
static int EEPROMModeProgAddress;
static void GetCurrentMode();
static void SetProgMode();
static void SetNextMode(ProgType inType = MAIN);
static void Restart(ProgType inType = SILENTRETURNTOMAIN);
};
#endif