28 lines
886 B
C
28 lines
886 B
C
#include <avr/io.h> /* AVR device-specific IO definitions */
|
|
|
|
/* channel definitions */
|
|
#define CHANNELS_1 5 /* the number of outputs for channel 1 */
|
|
#define CHANNELS_2 5 /* the number of outputs for channel 2 */
|
|
extern volatile uint8_t* PORTS[CHANNELS_1+CHANNELS_2]; /* channel ports */
|
|
extern const uint8_t BITS[CHANNELS_1+CHANNELS_2]; /* channel bits */
|
|
|
|
/* mode settings */
|
|
#define MODES 3 /* the number of modes */
|
|
extern uint8_t mode; /* the current mode */ //TODO load the mode
|
|
extern uint8_t brightness[MODES][CHANNELS_1+CHANNELS_2]; /* the mode brightness settings for the channels */
|
|
|
|
/* IR settings */
|
|
enum IR_ACTIONS { /* the actions for the infrared remote control */
|
|
POWER = 0,
|
|
MODE,
|
|
BRIGHTNESS_UP,
|
|
BRIGHTNESS_DOWN,
|
|
CHANNEL_UP,
|
|
CHANNEL_DOWN,
|
|
IR_ACTION_END
|
|
};
|
|
uint8_t ir_keys[IR_ACTION_END][2];
|
|
|
|
/* function to load/save the settings */
|
|
void verify_settings(void);
|