From c891681b9466b7a714fb52dbd699c34c051441e5 Mon Sep 17 00:00:00 2001 From: Erick Ahmed Date: Tue, 9 Jun 2026 09:50:21 +0200 Subject: [PATCH] Minor comment clarifications --- Core/Src/canlog.c | 11 +++++------ Core/Src/main.c | 5 ++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Core/Src/canlog.c b/Core/Src/canlog.c index 8595036..c79a880 100644 --- a/Core/Src/canlog.c +++ b/Core/Src/canlog.c @@ -6,8 +6,7 @@ extern CAN_HandleTypeDef hcan1; extern CAN_HandleTypeDef hcan2; -/* FreeRTOS task definitions */ - +/* USER CODE BEGIN RTOS_TASKS */ /* Definitions for CAN1rx incoming */ osThreadId_t vCAN1_rx; const osThreadAttr_t vCAN1_rx_attributes = { @@ -39,6 +38,8 @@ const osThreadAttr_t vLED_CAN2_Heartbeat_attributes = { .stack_size = 128 * 4, .priority = (osPriority_t) osPriorityLow, }; +/* USER END RTOS_TASKS */ + /* Private function prototypes -----------------------------------------------*/ void CAN_Logger_Init(CAN_HandleTypeDef *hcan1, CAN_HandleTypeDef *hcan2){} @@ -76,10 +77,8 @@ void vLED_HeartbeatOnCanRx(void *argument) for(;;) { - //TODO: add condition -> led High only when CANrx - // else led Low - // Depends on can log functions - // Use semaphore or message queue + //HAL_GPIO_WritePin(led->port, led->pin, GPIO_PIN_RESET); + // if semaphore for canrx, do the rest HAL_GPIO_TogglePin(led->port, led->pin); vTaskDelay(pdMS_TO_TICKS(100)); diff --git a/Core/Src/main.c b/Core/Src/main.c index 57f0909..3161baf 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -107,11 +107,10 @@ int main(void) MX_CAN1_Init(); MX_CAN2_Init(); MX_SDIO_SD_Init(); + /* USER CODE BEGIN 2 */ - - // Initialize CAN1 and CAN2 + /* Initialize CAN1 and CAN2 */ CAN_Logger_Init(&hcan1, &hcan2); - /* USER CODE END 2 */ /* Init scheduler */