2 Commits

Author SHA1 Message Date
eeeck d2d9d21f3d Add timeout to LED heartbeat thread flags 2026-07-30 00:14:33 +02:00
eeeck f53f49a94e Revert to previous blinking logic 2026-07-30 00:06:34 +02:00
+3 -7
View File
@@ -140,14 +140,10 @@ void vLEDHeartbeat(void *argument)
for (;;) for (;;)
{ {
uint32_t notification = osThreadFlagsWait(0x01, osFlagsWaitAny, osWaitForever); uint32_t notification = osThreadFlagsWait(0x01, osFlagsWaitAny, LED_BLINK_MS);
if (notification & 0x01) if (notification & 0x01) HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_SET);
{ else HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_SET);
osDelay(LED_BLINK_MS);
HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_RESET);
}
} }
} }
/* END vLEDHeartbeat */ /* END vLEDHeartbeat */