mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-08-18 20:48:41 +08:00
[STM32 BSP]CAN driver for stm32f4xx HAL.
Change-Id: I60868dea91e0a632de469e4841410d4f1ae21516
This commit is contained in:
@@ -308,7 +308,17 @@ config RT_USING_UART2
|
||||
config RT_USING_UART6
|
||||
bool "Using UART6"
|
||||
default n
|
||||
|
||||
|
||||
if RT_USING_CAN
|
||||
config USING_BXCAN1
|
||||
bool "Enable CAN1 RX:PD0 TX:PD1. Do not select HDR."
|
||||
default n
|
||||
|
||||
config USING_BXCAN2
|
||||
bool "Enable CAN2 RX:PB12 TX:PB6. Do not select HDR."
|
||||
default n
|
||||
endif
|
||||
|
||||
if RT_USING_SPI
|
||||
|
||||
config RT_USING_SPI1
|
||||
|
||||
@@ -35,7 +35,10 @@ if GetDepend(['RT_USING_USB_HOST']):
|
||||
src += ['drv_usbh.c']
|
||||
|
||||
if GetDepend(['RT_USING_I2C']):
|
||||
src += ['drv_i2c.c']
|
||||
src += ['drv_i2c.c']
|
||||
|
||||
if GetDepend(['RT_USING_CAN']):
|
||||
src += ['drv_can.c']
|
||||
|
||||
if GetDepend(['RT_USING_PWM']):
|
||||
src += ['drv_pwm.c']
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* File : drv_can.h
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2018, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2018-08-05 Xeon Xu the first version
|
||||
*/
|
||||
#ifndef __CAN_H__
|
||||
#define __CAN_H__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int hw_can_init(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /*__CAN_H__ */
|
||||
@@ -52,7 +52,9 @@ extern "C" {
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
/* #define HAL_ADC_MODULE_ENABLED */
|
||||
/* #define HAL_CAN_MODULE_ENABLED */
|
||||
#ifdef RT_USING_CAN
|
||||
#define HAL_CAN_MODULE_ENABLED
|
||||
#endif
|
||||
/* #define HAL_CRC_MODULE_ENABLED */
|
||||
/* #define HAL_CRYP_MODULE_ENABLED */
|
||||
/* #define HAL_DAC_MODULE_ENABLED */
|
||||
|
||||
Reference in New Issue
Block a user