3 Commits

Author SHA1 Message Date
eeeck 0587cf9756 Add CMSIS include 2026-06-14 16:16:14 +02:00
eeeck 8777f742ac Move typedef to header 2026-06-14 16:15:33 +02:00
eeeck 4aafa81009 Change CODE BEGIN N value 2026-06-14 16:14:20 +02:00
2 changed files with 11 additions and 10 deletions
+7
View File
@@ -23,12 +23,19 @@
#define CANLOG_H
#include "main.h"
#include "cmsis_os.h"
extern osMessageQueueId_t xCAN1RxQueue;
extern osMessageQueueId_t xCAN2RxQueue;
extern osSemaphoreId_t xLEDSemaphoreCAN1;
extern osSemaphoreId_t xLEDSemaphoreCAN2;
typedef struct {
LED_Config *led;
osSemaphoreId_t semaphore;
osTimerId_t timer;
} LEDContext;
/**
* @brief Initializes the CAN logger modules, OS threads, queues, and hardware.
* @param hcan1 Pointer to the CAN1 handle
+4 -10
View File
@@ -41,12 +41,6 @@ typedef struct {
//uint32_t timestamp; //Enable TIM2: 42 MHz / (41+1) = 1 MHz → 1 µs tick; 32bit autoreload freerunning
// this is for getting timestamps on can messages
} CanMessage_t;
typedef struct {
LED_Config *led;
osSemaphoreId_t semaphore;
osTimerId_t timer;
} LEDContext;
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
@@ -215,9 +209,9 @@ int main(void)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
/* USER CODE BEGIN 4 */
}
/* USER CODE END 3 */
/* USER CODE END 4 */
}
/**
@@ -467,9 +461,9 @@ static void MX_GPIO_Init(void)
/* USER CODE END MX_GPIO_Init_2 */
}
/* USER CODE BEGIN 4 */
/* USER CODE BEGIN 5 */
/* USER CODE END 4 */
/* USER CODE END 5 */
/**
* @brief Period elapsed callback in non blocking mode