From 17bfa5273f773bffc3fd7129baf07aad5f1ac0a1 Mon Sep 17 00:00:00 2001 From: Eric Wild Date: Wed, 20 Oct 2021 19:35:30 +0200 Subject: [PATCH] fix bootloader led config crash This led to occasional crashes for targets with leds since it was introduced 3 years ago The interesting thing is that most of the time it didn't crash... Change-Id: Ia6a1b1fc0e44a301b4fb1d9c9fdbc27d61dcab97 --- firmware/apps/dfu/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/apps/dfu/main.c b/firmware/apps/dfu/main.c index f8c0c536..d5a6fa65 100644 --- a/firmware/apps/dfu/main.c +++ b/firmware/apps/dfu/main.c @@ -271,7 +271,7 @@ extern int main(void) #ifdef PINS_LEDS /* Configure LED */ - PIO_Configure(pinsLeds, sizeof(pinsLeds)); + PIO_Configure(pinsLeds, PIO_LISTSIZE(pinsLeds)); PIO_Set(&pinsLeds[LED_NUM_RED]); PIO_Clear(&pinsLeds[LED_NUM_GREEN]); #endif