Use define instead of hardcoded value

This commit is contained in:
2026-06-16 18:11:12 +02:00
parent 12ef44d3d8
commit f260dfe972
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -18,9 +18,13 @@
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef CANLOG_H
#define CANLOG_H
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "cmsis_os.h"
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
#define LED_BLINK_MS 25U
/* USER CODE END PD */
extern osMessageQueueId_t xCAN1RxQueue;
extern osMessageQueueId_t xCAN2RxQueue;
+1 -1
View File
@@ -134,7 +134,7 @@ void vLEDHeartbeat(void *argument)
for (;;)
{
uint32_t notification = osThreadFlagsWait(0x01, osFlagsWaitAny, 25U);
uint32_t notification = osThreadFlagsWait(0x01, osFlagsWaitAny, LED_BLINK_MS);
if (notification & 0x01) HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_SET);
else HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_RESET);