Rewrite statusled implementation.

- Read it now from app.config JSON file.
- Allow for inverted status leds (Sonoff et al)
- Clean up unit tests.
This commit is contained in:
Pim van Pelt
2018-01-24 13:33:13 +01:00
parent f0fa04dc26
commit 118eb14447
11 changed files with 56 additions and 43 deletions

View File

@ -6,7 +6,6 @@
#define CHANNEL_CHANGE_COOLDOWN_SECONDS 0.250
#define CHANNEL_MAX 16
#define GREEN_LED_GPIO 0
#define GPIO_INVALID 255
#define GPIO_MIN 0
#define GPIO_MAX 16
@ -19,7 +18,8 @@ struct channel_t {
double button_last_change;
};
void led_status_blink();
void statusled_blink();
void statusled_init(uint8_t gpio, bool state_off);
bool channel_init(const char *fn);
uint8_t channel_gpio_by_idx(int idx);