Compare commits
2 Commits
dce176cc1e
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d2d9d21f3d | |||
| f53f49a94e |
+3
-7
@@ -140,14 +140,10 @@ void vLEDHeartbeat(void *argument)
|
||||
|
||||
for (;;)
|
||||
{
|
||||
uint32_t notification = osThreadFlagsWait(0x01, osFlagsWaitAny, osWaitForever);
|
||||
uint32_t notification = osThreadFlagsWait(0x01, osFlagsWaitAny, LED_BLINK_MS);
|
||||
|
||||
if (notification & 0x01)
|
||||
{
|
||||
HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_SET);
|
||||
osDelay(LED_BLINK_MS);
|
||||
HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_RESET);
|
||||
}
|
||||
if (notification & 0x01) HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_SET);
|
||||
else HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_RESET);
|
||||
}
|
||||
}
|
||||
/* END vLEDHeartbeat */
|
||||
|
||||
Reference in New Issue
Block a user