From 281e00dd4fecbc72f68f65a3dd05e003d98ba6a5 Mon Sep 17 00:00:00 2001 From: Cem Aksoylar Date: Mon, 19 Aug 2024 23:47:14 -0700 Subject: [PATCH] Move some non-public defines back to .c --- include/zmk_rgbled_widget/widget.h | 20 -------------------- src/widget.c | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/include/zmk_rgbled_widget/widget.h b/include/zmk_rgbled_widget/widget.h index 35cf4ed..0421734 100644 --- a/include/zmk_rgbled_widget/widget.h +++ b/include/zmk_rgbled_widget/widget.h @@ -2,26 +2,6 @@ (IS_ENABLED(CONFIG_RGBLED_WIDGET_SHOW_LAYER_CHANGE)) && \ (!IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)) -// color values as specified by an RGB bitfield -enum led_color_t { - LED_BLACK, // 0b000 - LED_RED, // 0b001 - LED_GREEN, // 0b010 - LED_YELLOW, // 0b011 - LED_BLUE, // 0b100 - LED_MAGENTA, // 0b101 - LED_CYAN, // 0b110 - LED_WHITE // 0b111 -}; - -// a blink work item as specified by the color and duration -struct blink_item { - enum led_color_t color; - uint16_t duration_ms; - bool first_item; - uint16_t sleep_ms; -}; - #if IS_ENABLED(CONFIG_ZMK_BATTERY_REPORTING) void indicate_battery(void); #endif diff --git a/src/widget.c b/src/widget.c index c8c38b7..c62247c 100644 --- a/src/widget.c +++ b/src/widget.c @@ -35,6 +35,26 @@ static const uint8_t rgb_idx[] = {DT_NODE_CHILD_IDX(DT_ALIAS(led_red)), DT_NODE_CHILD_IDX(DT_ALIAS(led_green)), DT_NODE_CHILD_IDX(DT_ALIAS(led_blue))}; +// color values as specified by an RGB bitfield +enum led_color_t { + LED_BLACK, // 0b000 + LED_RED, // 0b001 + LED_GREEN, // 0b010 + LED_YELLOW, // 0b011 + LED_BLUE, // 0b100 + LED_MAGENTA, // 0b101 + LED_CYAN, // 0b110 + LED_WHITE // 0b111 +}; + +// a blink work item as specified by the color and duration +struct blink_item { + enum led_color_t color; + uint16_t duration_ms; + bool first_item; + uint16_t sleep_ms; +}; + // flag to indicate whether the initial boot up sequence is complete static bool initialized = false;