diff --git a/Core/Inc/canlog.h b/Core/Inc/canlog.h index 58737f5..1a822f7 100644 --- a/Core/Inc/canlog.h +++ b/Core/Inc/canlog.h @@ -20,7 +20,7 @@ extern const osThreadAttr_t vLED_CAN2_Heartbeat_attributes; * @param hcan2 Pointer to the CAN2 handle */ void CAN_Logger_Init(CAN_HandleTypeDef *hcan1, CAN_HandleTypeDef *hcan2); -void vCAN_log(void *argument); +void vCAN_Get(void *argument); void vLED_HeartbeatOnCanRx(void *argument); #endif /* CANLOG_H */ diff --git a/Core/Src/canlog.c b/Core/Src/canlog.c index 7eac64d..8595036 100644 --- a/Core/Src/canlog.c +++ b/Core/Src/canlog.c @@ -44,13 +44,13 @@ const osThreadAttr_t vLED_CAN2_Heartbeat_attributes = { void CAN_Logger_Init(CAN_HandleTypeDef *hcan1, CAN_HandleTypeDef *hcan2){} static void CAN_Listen(void *argument){} -/* BEGIN vCAN_log */ +/* BEGIN vCAN_Get */ /** - * @brief Log incoming CAN bus traffic. + * @brief Log incoming CAN bus traffic in FIFO buffer * @param argument: Not used * @retval None */ -void vCAN_log(void *argument) +void vCAN_Get(void *argument) { /* CODE BEGIN */ /* Infinite loop */ @@ -60,12 +60,12 @@ void vCAN_log(void *argument) } /* CODE END */ } -/* END vCAN_log */ +/* END vCAN_Get */ /* BEGIN vLED_HeartbeatOnCanRx */ /** - * @brief Blink a LED in heartbeat mode when there is CAN traffic detected. + * @brief Blink a LED in heartbeat mode when there is CAN traffic detected * @param argument: LED GPIO (port and pin) * @retval None */ diff --git a/Core/Src/main.c b/Core/Src/main.c index dd51678..14f0adf 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -66,7 +66,7 @@ static void MX_CAN2_Init(void); static void MX_SDIO_SD_Init(void); /* USER CODE BEGIN PFP */ -void vCAN_log(void *argument); +void vCAN_Get(void *argument); void vLED_HeartbeatOnCanRx(void *argument); /* USER CODE END PFP */ @@ -135,8 +135,8 @@ int main(void) /* USER CODE END RTOS_QUEUES */ /* USER CODE BEGIN RTOS_THREADS */ - vCAN1_rx = osThreadNew(vCAN_log, &hcan1, &vCAN1_rx_attributes); - vCAN2_rx = osThreadNew(vCAN_log, &hcan2, &vCAN2_rx_attributes); + vCAN1_rx = osThreadNew(vCAN_Get, &hcan1, &vCAN1_rx_attributes); + vCAN2_rx = osThreadNew(vCAN_Get, &hcan2, &vCAN2_rx_attributes); vLED_CAN1_Heartbeat = osThreadNew(vLED_HeartbeatOnCanRx, &led_can1, &vLED_CAN1_Heartbeat_attributes); vLED_CAN2_Heartbeat = osThreadNew(vLED_HeartbeatOnCanRx, &led_can2, &vLED_CAN2_Heartbeat_attributes); /* USER CODE END RTOS_THREADS */