Commit 9c5d8003 authored by Rahix's avatar Rahix Committed by schneider

fix(leds): Add a missing I2C bus-lock

leds_update_power() internally accesses the I2C bus so calls to this
function need to be inside an I2C lock section.
Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent 0702114c
......@@ -17,10 +17,12 @@
static void do_update(void)
{
hwlock_acquire(HWLOCK_LED);
hwlock_acquire(HWLOCK_I2C);
leds_update_power();
leds_update();
hwlock_release(HWLOCK_I2C);
hwlock_release(HWLOCK_LED);
}
......
......@@ -125,9 +125,13 @@ void vLedTask(void *pvParameters)
(float)(1000 /
led_animation_rate))));
}
hwlock_acquire(HWLOCK_I2C);
leds_update_power();
leds_update();
hwlock_release(HWLOCK_I2C);
hwlock_release(HWLOCK_LED);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment