3 #ifndef _SYSTEMCONFIGDATA_H_
4 #define _SYSTEMCONFIGDATA_H_
14 CONFIG_BACK_BUTTON_EXIT_DELAY,
15 CONFIG_BL_FULL_BRIGHT,
17 CONFIG_BL_DIM_TIMEOUT,
29 static const size_t NUM_CONFIGS = 5;
35 m_names[CONFIG_BACK_BUTTON_EXIT_DELAY] =
"Exit delay";
36 m_delta[CONFIG_BACK_BUTTON_EXIT_DELAY] = 50;
38 m_names[CONFIG_BL_FULL_BRIGHT] =
"BL full";
39 m_delta[CONFIG_BL_FULL_BRIGHT] = 32;
41 m_names[CONFIG_BL_DIM_BRIGHT] =
"BL dimmed";
42 m_delta[CONFIG_BL_DIM_BRIGHT] = 32;
44 m_names[CONFIG_BL_DIM_TIMEOUT] =
"BL dim delay";
45 m_delta[CONFIG_BL_DIM_TIMEOUT] = 1000;
47 m_names[CONFIG_BL_OFF_TIMEOUT] =
"BL off delay";
48 m_delta[CONFIG_BL_OFF_TIMEOUT] = 5000;
59 m_values[CONFIG_BACK_BUTTON_EXIT_DELAY] = 500;
60 m_values[CONFIG_BL_FULL_BRIGHT] = PWMRANGE;
61 m_values[CONFIG_BL_DIM_BRIGHT] = 256;
62 m_values[CONFIG_BL_DIM_TIMEOUT] = 10000;
63 m_values[CONFIG_BL_OFF_TIMEOUT] = 60000;
73 return m_values[config];
83 if ((
size_t)config >= NUM_CONFIGS)
86 return m_delta[config];
96 if ((
size_t)config >= NUM_CONFIGS)
99 return m_names[config];
103 uint16_t m_values[NUM_CONFIGS];
104 uint16_t m_delta[NUM_CONFIGS];
105 char *m_names[NUM_CONFIGS];
Used to store system configuration data.
Definition: SystemConfigData.h:26
char * name(Config config)
Gets the name of a configuration option.
Definition: SystemConfigData.h:94
void setDefaultValues()
Sets default values of configuration options.
Definition: SystemConfigData.h:57
uint16_t & value(Config config)
Gets the value of a configuration option.
Definition: SystemConfigData.h:71
Config
Enumeration of config IDs.
Definition: SystemConfigData.h:12
uint16_t delta(Config config) const
Gets a suitable "step" in value for a given configuration option.
Definition: SystemConfigData.h:81