Skip to content

Commit

Permalink
fw: add activity blink timeout support
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiobaltieri committed Oct 9, 2024
1 parent 7e966cc commit 99ee085
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions firmware/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ config APP_USB_REMOTE_WAKEUP
bool "USB Remote Wakeup"
depends on USB_DEVICE_STACK_NEXT

config APP_EVT_BLINK_TIMEOUT
bool "Disable the activity blink after 1 minute"

if USB_DEVICE_STACK_NEXT

config APP_USB_VID
Expand Down
1 change: 1 addition & 0 deletions firmware/boards/negcon_retro.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CONFIG_INPUT_THREAD_PRIORITY_OVERRIDE=y
CONFIG_INPUT_THREAD_PRIORITY=10

CONFIG_APP_DEVICE_NAME="neGcon"
CONFIG_APP_EVT_BLINK_TIMEOUT=y

CONFIG_CBPRINTF_FP_SUPPORT=y

Expand Down
1 change: 1 addition & 0 deletions firmware/boards/paw_g3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CONFIG_SHELL_VT100_COMMANDS=n
CONFIG_BQ274XX_PM=n

CONFIG_APP_DEVICE_NAME="PAW G3"
CONFIG_APP_EVT_BLINK_TIMEOUT=y

CONFIG_BT=y
CONFIG_USB_DEVICE_STACK=n
Expand Down
6 changes: 6 additions & 0 deletions firmware/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ EVENT_CALLBACK_DEFINE(blinker_cb);

static void blink_input_cb(struct input_event *evt, void *user_data)
{
#if CONFIG_APP_EVT_BLINK_TIMEOUT
if (k_uptime_get() > 60 * 1000) {
return;
}
#endif

if (!evt->sync) {
return;
}
Expand Down

0 comments on commit 99ee085

Please sign in to comment.