#define TESTING_FW 1
-#define N_LEDS 7
-#define N_PWMLEDS 2
#define N_PWMLED_MODES 4
#define N_BUTTONS 2
/* pwmled.c */
void init_pwmled();
void pwmled_adc(uint16_t adcval);
-void pwmled_set_mode(unsigned char mode);
+void pwmled_set_target(unsigned char mode);
+void pwmled_on_off(unsigned char on);
/* gpio.c */
void init_gpio();
state = ST_OFF;
}
-void pwmled_set_mode(unsigned char mode)
+void pwmled_set_target(unsigned char mode)
+{
+ target = targets[mode];
+ mode_changed = 1;
+}
+
+void pwmled_on_off(unsigned char mode)
{
if (!ST_CAN_SET_MODE(state))
return;
if (mode) {
- target = targets[mode - 1];
state = ST_ON;
mode_changed = 1;
pwm_set(pwm_val);