[bsp/stm32h7]: Add STM32H7 fdcan driver. #10767
ToolsCI / Tools (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled

This commit is contained in:
PandaFeng
2025-10-29 22:59:33 +08:00
committed by GitHub
parent 9e3127982d
commit 6d4e2aa2fe
3 changed files with 753 additions and 1 deletions
@@ -50,7 +50,10 @@ if GetDepend(['RT_USING_DAC']):
src += ['drv_dac.c']
if GetDepend(['RT_USING_CAN']):
src += ['drv_can.c']
if GetDepend(['SOC_SERIES_STM32H7']):
src += ['drv_fdcan.c']
else:
src += ['drv_can.c']
if GetDepend(['RT_USING_PM']):
src += ['drv_pm.c']
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,46 @@
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-02-24 heyuan the first version
* 2020-08-17 malongwei Fix something
*/
#ifndef __DRV_FDCAN_H__
#define __DRV_FDCAN_H__
#include <board.h>
#include <rtdevice.h>
#if defined(RT_USING_CAN) && defined(RT_CAN_USING_CANFD)
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
const char *name;
FDCAN_HandleTypeDef fdcanHandle;
FDCAN_RxHeaderTypeDef RxHeader;
FDCAN_TxHeaderTypeDef TxHeader;
uint8_t u8RxDataBuffer[8];
uint8_t u8TxDataBuffer[8];
FDCAN_FilterTypeDef FilterConfig; /*FDCAN filter*/
struct rt_can_device device; /* inherit from can device */
} stm32_fdcan_t;
typedef struct {
uint32_t u32Baudrate;
struct rt_can_bit_timing cam_bit_timing;
}stm32_fdcan_timing_t;
#ifdef __cplusplus
}
#endif
#endif /* RT_USING_CAN */
#endif /* __DRV_FDCAN_H__ */