From 75efc4840d33a9cc2a37c53140f10ad2001ed18d Mon Sep 17 00:00:00 2001 From: Erick Ahmed Date: Sun, 14 Jun 2026 15:17:03 +0200 Subject: [PATCH] Use new context structure instead of direct pass --- Core/Src/canlog.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Core/Src/canlog.c b/Core/Src/canlog.c index 5164a5a..0017e6b 100644 --- a/Core/Src/canlog.c +++ b/Core/Src/canlog.c @@ -130,16 +130,16 @@ void vCANLoggerListen(void *argument) void vLEDHeartbeat(void *argument) { /* CODE BEGIN */ - LED_Config *led = (LED_Config*)argument; + LEDContext *ctx = (LEDContext*)argument; - if (osSemaphoreAcquire(xCanActivitySemaphore, 0U) == osOK) + if (osSemaphoreAcquire(ctx->sem, 0U) == osOK) { - HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_SET); - osTimerStart(xHeartbeatTimerCAN1, 25U); + HAL_GPIO_WritePin(ctx->led->port, ctx->led->pin, GPIO_PIN_SET); + osTimerStart(ctx->timer, 25U); } else { - HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_RESET); + HAL_GPIO_WritePin(ctx->led->port, ctx->led->pin, GPIO_PIN_RESET); } /* CODE END */ }