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
2 changed files with 45 additions and 1 deletions
Showing only changes of commit 7bb401762a - Show all commits
+21
View File
@@ -1,3 +1,24 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : canlog.h
* @brief : Header for canlog.c file.
* This file contains the defines related to SAE J1939 CAN.
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef CANLOG_H
#define CANLOG_H
+24 -1
View File
@@ -1,7 +1,28 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : canlog.c
* @brief : SAE J1939 CAN Real Time listening and decoding
******************************************************************************
* @attention
*
* Copyright (c) 2026 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "canlog.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "cmsis_os.h"
#include <string.h>
/* USER CODE END Includes */
extern CAN_HandleTypeDef hcan1;
extern CAN_HandleTypeDef hcan2;
@@ -42,6 +63,7 @@ const osThreadAttr_t vLED_CAN2_Heartbeat_attributes = {
/* Private function prototypes -----------------------------------------------*/
/* USER CODE BEGIN FunctionPrototypes */
/* BEGIN CAN_Logger_Init */
/**
* @brief Initialize CAN
@@ -117,3 +139,4 @@ void vLED_HeartbeatOnCanRx(void *argument)
/* CODE END */
}
/* END vLED_HeartbeatOnCanRx */
/* USER CODE END FunctionPrototypes */