summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/led_pwm.c2
-rw-r--r--include/hooks.h1
-rw-r--r--zephyr/projects/skyrim/led.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/common/led_pwm.c b/common/led_pwm.c
index 0150e73382..05fe21e82b 100644
--- a/common/led_pwm.c
+++ b/common/led_pwm.c
@@ -122,7 +122,7 @@ static void init_leds_off(void)
set_pwm_led_enable(PWM_LED1, 1);
#endif /* CONFIG_LED_PWM_COUNT >= 2 */
}
-DECLARE_HOOK(HOOK_INIT, init_leds_off, HOOK_PRIO_INIT_PWM + 1);
+DECLARE_HOOK(HOOK_INIT, init_leds_off, HOOK_PRIO_POST_PWM);
#ifndef CONFIG_LED_PWM_TASK_DISABLED
static uint8_t pulse_period;
diff --git a/include/hooks.h b/include/hooks.h
index 5ab2cdbba0..429b09c3d3 100644
--- a/include/hooks.h
+++ b/include/hooks.h
@@ -42,6 +42,7 @@ enum hook_priority {
HOOK_PRIO_INIT_FAN = HOOK_PRIO_FIRST + 7,
/* PWM inits before modules which might use it (LEDs) */
HOOK_PRIO_INIT_PWM = HOOK_PRIO_FIRST + 8,
+ HOOK_PRIO_POST_PWM = HOOK_PRIO_INIT_PWM + 1,
/* SPI inits before modules which might use it (sensors) */
HOOK_PRIO_INIT_SPI = HOOK_PRIO_FIRST + 9,
/* Extpower inits before modules which might use it (battery, LEDs) */
diff --git a/zephyr/projects/skyrim/led.c b/zephyr/projects/skyrim/led.c
index c8a6fefb7c..c3841366b5 100644
--- a/zephyr/projects/skyrim/led.c
+++ b/zephyr/projects/skyrim/led.c
@@ -99,4 +99,4 @@ static void pwm_led_duty_init(void)
pwm_set_duty(PWM_CH_LED_CHRG, 100);
pwm_set_duty(PWM_CH_LED_FULL, 100);
}
-DECLARE_HOOK(HOOK_INIT, pwm_led_duty_init, HOOK_PRIO_INIT_PWM + 1);
+DECLARE_HOOK(HOOK_INIT, pwm_led_duty_init, HOOK_PRIO_POST_PWM);