File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
boards/arm/stm32/b-g431b-esc1/src Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 2929#include <debug.h>
3030
3131#include "stm32_fdcan.h"
32+ #include "b-g431b-esc1.h"
33+
34+ /****************************************************************************
35+ * Pre-processor Definitions
36+ ****************************************************************************/
37+
38+ /* Configuration ************************************************************/
39+
40+ #if !defined(CONFIG_STM32_FDCAN1 )
41+ # error "No CAN is enable. Please eneable at least one CAN device"
42+ #endif
43+
44+ #ifdef CONFIG_BOARD_STM32_BG431BESC1_CANTERM
45+ # define BG431BESC1_CANTERM (true)
46+ #else
47+ # define BG431BESC1_CANTERM (false)
48+ #endif
3249
3350/****************************************************************************
3451 * Public Functions
@@ -55,5 +72,13 @@ int stm32_cansock_setup(void)
5572 return ret ;
5673 }
5774
75+ /* Configure CAN_TERM pin for output */
76+
77+ stm32_configgpio (GPIO_CANTERM );
78+
79+ /* Set CAN_TERM pin high or low */
80+
81+ stm32_gpiowrite (GPIO_CANTERM , BG431BESC1_CANTERM );
82+
5883 return OK ;
5984}
You can’t perform that action at this time.
0 commit comments