add flags to var array
This commit is contained in:
@ -40,12 +40,19 @@ extern "C" {
|
||||
// Description: Definition of global constants (visible by all modules).
|
||||
//=================================================================================================
|
||||
|
||||
// Flags
|
||||
// Flags for variable
|
||||
#define VARH_FLAG_VALID (1<<0) // is data valid
|
||||
#define VARH_FLAG_OUTOFRANGE (1<<1) // is data out of range
|
||||
#define VARH_FLAG_MODIFIED (1<<2) // is variable modified (compared to flash)
|
||||
#define VARH_FLAG_FLASHCORRUPT (1<<3) // data from flash is corrupted
|
||||
|
||||
// Flags for variable infos
|
||||
#define VARH_FLAG_NONE 0 // no flag
|
||||
#define VARH_FLAG_FLOAT (1<<0) // variable in floating point format
|
||||
#define VARH_FLAG_SIGNED (1<<1) // variable is signed integer
|
||||
#define VARH_FLAG_BOOL (1<<2) // variable is boolean
|
||||
#define VARH_FLAG_READONLY (1<<3) // variable is readonly, master can not set variable
|
||||
#define VARH_FLAG_FLASH (1<<4) // variable is stored in flash
|
||||
|
||||
//=================================================================================================
|
||||
// Section: MACROS
|
||||
@ -105,11 +112,17 @@ typedef union {
|
||||
typedef struct
|
||||
{
|
||||
U8 u8Flags; // flags
|
||||
VARH_UVariable uInitData; // initial Data (data is always 32 bit, at least internal)
|
||||
VARH_UVariable uInitData; // initial Data (data is always 32 bit)
|
||||
VARH_UVariable uMinData; // min Value for Data
|
||||
VARH_UVariable uMaxData; // max Value for Data
|
||||
} VARH_StVarInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
VARH_UVariable uData; // Data (data is always 32 bit)
|
||||
U8 u8Flags; // flags
|
||||
} VARH_StVar;
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Section: GLOBAL VARIABLES
|
||||
|
Reference in New Issue
Block a user