New implementation of backlight based on persistent keepalive timer, rather than oneshot timer

This commit is contained in:
Pim van Pelt
2017-11-28 15:32:27 +01:00
parent c35d959c1a
commit 9fc40fd800
2 changed files with 19 additions and 11 deletions

View File

@ -7,10 +7,9 @@
#include "mgos_timers.h"
#define BACKLIGHT_PWM_HZ 10000
#define BACKLIGHT_STEP_USEC 10000 // 10ms per step.
#define BACKLIGHT_STEP_USEC 20000 // 20ms per step.
void backlight_init(void);
void backlight_set(float new_duty, int fader_msec);
void backlight_keepalive();
bool backlight_active();