diff options
author | lokher <lokher@gmail.com> | 2023-01-12 15:50:37 +0800 |
---|---|---|
committer | lokher <lokher@gmail.com> | 2023-01-12 15:50:37 +0800 |
commit | a0d162e03ae1301c64a04b04264b53d0787c1358 (patch) | |
tree | adb31f18f533845f83011de41423b1c01a511c1c /keyboards/keychron/bluetooth/indicator.h | |
parent | bbe437487d4da158376a9f55c589acebc3396ff0 (diff) |
change battery voltage meause and battery low indication; update from latest chibios hal
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); |