restructured Folder-Structure
This commit is contained in:
65
Software/include/globals.h
Normal file
65
Software/include/globals.h
Normal file
@@ -0,0 +1,65 @@
|
||||
#ifndef _GLOBALS_H_
|
||||
#define _GLOBALS_H_
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
typedef enum eSystem_Status
|
||||
{
|
||||
sysStat_Startup,
|
||||
sysStat_Normal,
|
||||
sysStat_Rain,
|
||||
sysStat_Purge,
|
||||
sysStat_Error,
|
||||
sysStat_Shutdown
|
||||
} tSystem_Status;
|
||||
|
||||
typedef enum eEERequest
|
||||
{
|
||||
EE_IDLE,
|
||||
EE_CFG_SAVE,
|
||||
EE_CFG_LOAD,
|
||||
EE_CFG_FORMAT,
|
||||
EE_PDS_SAVE,
|
||||
EE_PDS_LOAD,
|
||||
EE_PDS_FORMAT,
|
||||
EE_FORMAT_ALL,
|
||||
EE_ALL_SAVE
|
||||
|
||||
} tEERequest;
|
||||
|
||||
typedef struct Globals_s
|
||||
{
|
||||
tSystem_Status systemStatus = sysStat_Startup;
|
||||
tSystem_Status resumeStatus = sysStat_Startup;
|
||||
char systemStatustxt[16] = "";
|
||||
uint16_t purgePulses = 0;
|
||||
eEERequest requestEEAction = EE_IDLE;
|
||||
char DeviceName[33];
|
||||
char FlashVersion[10];
|
||||
uint16_t eePersistanceAdress;
|
||||
uint8_t TankPercentage;
|
||||
bool hasDTC;
|
||||
bool measurementActive;
|
||||
uint32_t measuredPulses;
|
||||
} Globals_t;
|
||||
|
||||
extern Globals_t globals;
|
||||
|
||||
typedef struct Constants_s
|
||||
{
|
||||
uint8_t FW_Version_major;
|
||||
uint8_t FW_Version_minor;
|
||||
uint8_t Required_Flash_Version_major;
|
||||
uint8_t Required_Flash_Version_minor;
|
||||
char GitHash[11];
|
||||
} Constants_t;
|
||||
|
||||
const Constants_t constants PROGMEM = {
|
||||
1,4, // Firmware_Version
|
||||
1,4, // Required Flash Version
|
||||
GIT_REV // Git-Hash-String
|
||||
};
|
||||
|
||||
void initGlobals();
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user