From: Nathael Pajani Date: Thu, 21 Sep 2023 22:24:38 +0000 (+0200) Subject: Only call sleep function if we want to sleep X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=6c40071eff98518f3fe2b51ae490d06f6cdd8f2c;p=soft%2Flpc122x%2Fcore Only call sleep function if we want to sleep --- diff --git a/extdrv/status_led.c b/extdrv/status_led.c index 2823b8e..f3a919a 100644 --- a/extdrv/status_led.c +++ b/extdrv/status_led.c @@ -132,5 +132,7 @@ void chenillard(uint32_t ms) { static int n; status_led(steps[n++ % (sizeof steps / sizeof *steps)]); - msleep(ms); + if (ms > 0) { + msleep(ms); + } }