Merge pull request 'Implement CAN bus reading with CMSIS-RTOS-V2' (#14) from j1939 into main #14

Manually merged
eeeck merged 71 commits from j1939 into main 2026-06-15 10:30:45 +02:00
Showing only changes of commit 714ca43d45 - Show all commits
+10 -3
View File
@@ -29,6 +29,11 @@
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
typedef struct {
GPIO_TypeDef* port;
uint16_t pin;
} LED_Config;
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
@@ -51,6 +56,9 @@ DMA_HandleTypeDef hdma_sdio_tx;
/* USER CODE BEGIN PV */
LED_Config led_can1 = {GPIOB, GPIO_PIN_2};
LED_Config led_can2 = {GPIOB, GPIO_PIN_5};
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
@@ -135,9 +143,8 @@ int main(void)
/* Create the thread(s) */
vCAN1_rx = osThreadNew(vCAN_log, (void*)&hcan1, &vCAN1_rx_attributes);
vCAN2_rx = osThreadNew(vCAN_log, (void*)&hcan2, &vCAN2_rx_attributes);
vLED_CAN1_Heartbeat = osThreadNew(vLED_HeartbeatOnCanRx, NULL, &vLED_CAN1_Heartbeat_attributes);
vLED_CAN2_Heartbeat = osThreadNew(vLED_HeartbeatOnCanRx, NULL, &vLED_CAN2_Heartbeat_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 BEGIN RTOS_THREADS */
/* add threads, ... */
/* USER CODE END RTOS_THREADS */