led-controller/firmware/settings.h

29 lines
848 B
C
Raw Permalink Normal View History

/* mode settings */
#define MODES 3 /* the number of modes */
2013-10-19 14:36:03 +02:00
extern uint8_t power; /* power state */
extern uint8_t mode; /* the current mode */
extern uint8_t brightness[MODES][CHANNELS_1+CHANNELS_2]; /* the mode brightness settings for the channels */
2013-10-26 17:31:04 +02:00
/* IR settings actions from the infrared remote control */
enum IR_ACTIONS {
POWER = 0,
MODE,
BRIGHTNESS_UP,
BRIGHTNESS_DOWN,
2013-10-19 13:27:21 +02:00
CHANNEL_NEXT,
CHANNEL_PREVIOUS,
IR_ACTION_END
};
2013-10-26 17:31:04 +02:00
extern uint8_t ir_keys[IR_ACTION_END][2]; /* the IR NEC values (address+command) for the actions */
2013-10-26 17:31:04 +02:00
/* verify integrity of the settings */
bool verify_settings(void);
2013-10-26 17:31:04 +02:00
/* create settings */
void initialize_settings(void);
2013-10-26 17:31:04 +02:00
/* save current settings into EEPROM */
void save_settings(void);
2013-10-26 17:31:04 +02:00
/* load settings from EEPROM */
void load_settings(void);
2013-10-26 17:31:04 +02:00
/* invalidate settings in EEPROM */
2013-10-19 19:51:18 +02:00
void reset_settings(void);