diff options
Diffstat (limited to 'keyboards/keychron/bluetooth/indicator.h')
-rw-r--r-- | keyboards/keychron/bluetooth/indicator.h | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/keyboards/keychron/bluetooth/indicator.h b/keyboards/keychron/bluetooth/indicator.h index 17bda1e65a..bf408a0c1c 100644 --- a/keyboards/keychron/bluetooth/indicator.h +++ b/keyboards/keychron/bluetooth/indicator.h @@ -49,8 +49,30 @@ # define CONNECTED_BACKLIGHT_OFF_DELAY_TIME 600 #endif -#ifndef LOW_BAT_ON_OFF_DURATION -# define LOW_BAT_ON_OFF_DURATION 1000 +#ifdef BAT_LOW_LED_PIN +/* Uint: ms */ +# ifndef LOW_BAT_LED_BLINK_PERIOD +# define LOW_BAT_LED_BLINK_PERIOD 1000 +# endif + +# ifndef LOW_BAT_LED_BLINK_DURATION +# define LOW_BAT_LED_BLINK_DURATION 10000 +# endif +#endif + +#ifdef LOW_BAT_IND_INDEX +/* Uint: ms */ +# ifndef LOW_BAT_LED_BLINK_PERIOD +# define LOW_BAT_LED_BLINK_PERIOD 500 +# endif + +# ifndef LOW_BAT_LED_BLINK_TIMES +# define LOW_BAT_LED_BLINK_TIMES 3 +# endif + +# ifndef LOW_BAT_LED_TRIG_INTERVAL +# define LOW_BAT_LED_TRIG_INTERVAL 30000 +# endif #endif #if BT_HOST_MAX_COUNT > 6 @@ -82,8 +104,14 @@ void indicator_enable(void); void indicator_disable(void); void indicator_stop(void); void indicator_eeconfig_reload(void); +bool indicator_is_enabled(void); bool indicator_is_running(void); +#ifdef BAT_LOW_LED_PIN void indicator_battery_low_enable(bool enable); +#endif +#if defined(LOW_BAT_IND_INDEX) +void indicator_battery_low_backlit_enable(bool enable); +#endif void indicator_task(void); |