|
|
@ -111,8 +111,6 @@ void initialize_display(struct k_work *work) { |
|
|
|
K_WORK_DEFINE(init_work, initialize_display); |
|
|
|
K_WORK_DEFINE(init_work, initialize_display); |
|
|
|
|
|
|
|
|
|
|
|
int zmk_display_init() { |
|
|
|
int zmk_display_init() { |
|
|
|
LOG_DBG(""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if IS_ENABLED(CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED) |
|
|
|
#if IS_ENABLED(CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED) |
|
|
|
k_work_queue_start(&display_work_q, display_work_stack_area, |
|
|
|
k_work_queue_start(&display_work_q, display_work_stack_area, |
|
|
|
K_THREAD_STACK_SIZEOF(display_work_stack_area), |
|
|
|
K_THREAD_STACK_SIZEOF(display_work_stack_area), |
|
|
@ -125,6 +123,7 @@ int zmk_display_init() { |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if IS_ENABLED(CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE) |
|
|
|
int display_event_handler(const zmk_event_t *eh) { |
|
|
|
int display_event_handler(const zmk_event_t *eh) { |
|
|
|
struct zmk_activity_state_changed *ev = as_zmk_activity_state_changed(eh); |
|
|
|
struct zmk_activity_state_changed *ev = as_zmk_activity_state_changed(eh); |
|
|
|
if (ev == NULL) { |
|
|
|
if (ev == NULL) { |
|
|
@ -148,3 +147,5 @@ int display_event_handler(const zmk_event_t *eh) { |
|
|
|
|
|
|
|
|
|
|
|
ZMK_LISTENER(display, display_event_handler); |
|
|
|
ZMK_LISTENER(display, display_event_handler); |
|
|
|
ZMK_SUBSCRIPTION(display, zmk_activity_state_changed); |
|
|
|
ZMK_SUBSCRIPTION(display, zmk_activity_state_changed); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* IS_ENABLED(CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE) */ |