You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by da...@apache.org on 2022/01/05 14:17:15 UTC

[incubator-nuttx] 02/02: boards/stm32: register CAN character device if configured

This is an automated email from the ASF dual-hosted git repository.

davids5 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit a983cd23777fb4596a140a15375012874e81c9a0
Author: raiden00pl <ra...@railab.me>
AuthorDate: Wed Jan 5 10:47:05 2022 +0100

    boards/stm32: register CAN character device if configured
---
 boards/arm/stm32/clicker2-stm32/src/Make.defs                | 2 +-
 boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h         | 2 +-
 boards/arm/stm32/clicker2-stm32/src/stm32_bringup.c          | 2 +-
 boards/arm/stm32/nucleo-f303re/src/Make.defs                 | 2 +-
 boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h           | 2 +-
 boards/arm/stm32/nucleo-f303re/src/stm32_appinitialize.c     | 2 +-
 boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h           | 2 +-
 boards/arm/stm32/nucleo-f446re/src/Make.defs                 | 2 +-
 boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h           | 2 +-
 boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c           | 2 +-
 boards/arm/stm32/olimex-stm32-h405/src/Make.defs             | 2 +-
 boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h   | 2 +-
 boards/arm/stm32/olimex-stm32-h405/src/stm32_appinit.c       | 2 +-
 boards/arm/stm32/olimex-stm32-h407/src/Make.defs             | 2 +-
 boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h   | 2 +-
 boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c       | 2 +-
 boards/arm/stm32/olimex-stm32-p107/src/Make.defs             | 2 +-
 boards/arm/stm32/olimex-stm32-p107/src/olimex-stm32-p107.h   | 2 +-
 boards/arm/stm32/olimex-stm32-p107/src/stm32_appinit.c       | 2 +-
 boards/arm/stm32/olimex-stm32-p207/src/Make.defs             | 2 +-
 boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h   | 2 +-
 boards/arm/stm32/olimex-stm32-p207/src/stm32_appinit.c       | 2 +-
 boards/arm/stm32/olimex-stm32-p407/src/Make.defs             | 2 +-
 boards/arm/stm32/olimex-stm32-p407/src/olimex-stm32-p407.h   | 2 +-
 boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c       | 2 +-
 boards/arm/stm32/olimexino-stm32/src/Make.defs               | 2 +-
 boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h       | 2 +-
 boards/arm/stm32/olimexino-stm32/src/stm32_appinit.c         | 2 +-
 boards/arm/stm32/omnibusf4/src/omnibusf4.h                   | 2 +-
 boards/arm/stm32/omnibusf4/src/stm32_bringup.c               | 2 +-
 boards/arm/stm32/shenzhou/src/Make.defs                      | 2 +-
 boards/arm/stm32/shenzhou/src/shenzhou.h                     | 2 +-
 boards/arm/stm32/shenzhou/src/stm32_appinit.c                | 2 +-
 boards/arm/stm32/stm3210e-eval/src/Make.defs                 | 2 +-
 boards/arm/stm32/stm3210e-eval/src/stm3210e-eval.h           | 2 +-
 boards/arm/stm32/stm3210e-eval/src/stm32_bringup.c           | 2 +-
 boards/arm/stm32/stm3220g-eval/src/Make.defs                 | 2 +-
 boards/arm/stm32/stm3220g-eval/src/stm3220g-eval.h           | 2 +-
 boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c           | 2 +-
 boards/arm/stm32/stm3240g-eval/src/Make.defs                 | 2 +-
 boards/arm/stm32/stm3240g-eval/src/stm3240g-eval.h           | 2 +-
 boards/arm/stm32/stm3240g-eval/src/stm32_bringup.c           | 2 +-
 boards/arm/stm32/stm32f334-disco/src/Make.defs               | 2 +-
 boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h       | 2 +-
 boards/arm/stm32/stm32f4discovery/src/Make.defs              | 2 +-
 boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c        | 2 +-
 boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h     | 2 +-
 boards/arm/stm32/viewtool-stm32f107/src/Make.defs            | 2 +-
 boards/arm/stm32/viewtool-stm32f107/src/stm32_bringup.c      | 2 +-
 boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h | 2 +-
 50 files changed, 50 insertions(+), 50 deletions(-)

diff --git a/boards/arm/stm32/clicker2-stm32/src/Make.defs b/boards/arm/stm32/clicker2-stm32/src/Make.defs
index bab3b6e..03aeaa2 100644
--- a/boards/arm/stm32/clicker2-stm32/src/Make.defs
+++ b/boards/arm/stm32/clicker2-stm32/src/Make.defs
@@ -60,7 +60,7 @@ ifeq ($(CONFIG_ADC),y)
 CSRCS +=  stm32_adc.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h b/boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h
index 2c894a0..c567d3d 100644
--- a/boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h
+++ b/boards/arm/stm32/clicker2-stm32/src/clicker2-stm32.h
@@ -312,7 +312,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_bringup.c b/boards/arm/stm32/clicker2-stm32/src/stm32_bringup.c
index 6a9e42a..f0fd294 100644
--- a/boards/arm/stm32/clicker2-stm32/src/stm32_bringup.c
+++ b/boards/arm/stm32/clicker2-stm32/src/stm32_bringup.c
@@ -87,7 +87,7 @@ int stm32_bringup(void)
     }
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/nucleo-f303re/src/Make.defs b/boards/arm/stm32/nucleo-f303re/src/Make.defs
index fc5f15b..0df3e24 100644
--- a/boards/arm/stm32/nucleo-f303re/src/Make.defs
+++ b/boards/arm/stm32/nucleo-f303re/src/Make.defs
@@ -40,7 +40,7 @@ ifeq ($(CONFIG_ADC),y)
 CSRCS += stm32_adc.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h b/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h
index 447c7b5..91e8558 100644
--- a/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h
+++ b/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h
@@ -186,7 +186,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_appinitialize.c b/boards/arm/stm32/nucleo-f303re/src/stm32_appinitialize.c
index a729566..7aa6f22 100644
--- a/boards/arm/stm32/nucleo-f303re/src/stm32_appinitialize.c
+++ b/boards/arm/stm32/nucleo-f303re/src/stm32_appinitialize.c
@@ -124,7 +124,7 @@ int board_app_initialize(uintptr_t arg)
     }
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h b/boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h
index 9abb52d..024b529 100644
--- a/boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h
+++ b/boards/arm/stm32/nucleo-f334r8/src/nucleo-f334r8.h
@@ -175,7 +175,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/nucleo-f446re/src/Make.defs b/boards/arm/stm32/nucleo-f446re/src/Make.defs
index 2b19ab7..c632239 100644
--- a/boards/arm/stm32/nucleo-f446re/src/Make.defs
+++ b/boards/arm/stm32/nucleo-f446re/src/Make.defs
@@ -45,7 +45,7 @@ endif
 endif
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h b/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h
index c24b2a4..dee75df 100644
--- a/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h
+++ b/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h
@@ -320,7 +320,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c b/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c
index b262e74..2a12df5 100644
--- a/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c
+++ b/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c
@@ -151,7 +151,7 @@ int stm32_bringup(void)
     }
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/olimex-stm32-h405/src/Make.defs b/boards/arm/stm32/olimex-stm32-h405/src/Make.defs
index ad17b5d..5743e8f 100644
--- a/boards/arm/stm32/olimex-stm32-h405/src/Make.defs
+++ b/boards/arm/stm32/olimex-stm32-h405/src/Make.defs
@@ -44,7 +44,7 @@ ifeq ($(CONFIG_ADC),y)
 CSRCS +=  stm32_adc.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h b/boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h
index 68fd5e1..5de70f2 100644
--- a/boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h
+++ b/boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h
@@ -94,7 +94,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/olimex-stm32-h405/src/stm32_appinit.c b/boards/arm/stm32/olimex-stm32-h405/src/stm32_appinit.c
index 5ca1120..a103f9d 100644
--- a/boards/arm/stm32/olimex-stm32-h405/src/stm32_appinit.c
+++ b/boards/arm/stm32/olimex-stm32-h405/src/stm32_appinit.c
@@ -100,7 +100,7 @@ int board_app_initialize(uintptr_t arg)
     }
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/olimex-stm32-h407/src/Make.defs b/boards/arm/stm32/olimex-stm32-h407/src/Make.defs
index 309cde3..941b2ad 100644
--- a/boards/arm/stm32/olimex-stm32-h407/src/Make.defs
+++ b/boards/arm/stm32/olimex-stm32-h407/src/Make.defs
@@ -56,7 +56,7 @@ ifeq ($(CONFIG_ADC),y)
 CSRCS +=  stm32_adc.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h b/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h
index 9df8f5a..bf20037 100644
--- a/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h
+++ b/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h
@@ -254,7 +254,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c b/boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c
index b205c70..f112680 100644
--- a/boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c
+++ b/boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c
@@ -82,7 +82,7 @@ int stm32_bringup(void)
 #endif
   int ret;
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/olimex-stm32-p107/src/Make.defs b/boards/arm/stm32/olimex-stm32-p107/src/Make.defs
index d9fab81..a5a5db6 100644
--- a/boards/arm/stm32/olimex-stm32-p107/src/Make.defs
+++ b/boards/arm/stm32/olimex-stm32-p107/src/Make.defs
@@ -26,7 +26,7 @@ ifeq ($(CONFIG_BOARDCTL),y)
 CSRCS += stm32_appinit.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/olimex-stm32-p107/src/olimex-stm32-p107.h b/boards/arm/stm32/olimex-stm32-p107/src/olimex-stm32-p107.h
index d6a8350..91dae79 100644
--- a/boards/arm/stm32/olimex-stm32-p107/src/olimex-stm32-p107.h
+++ b/boards/arm/stm32/olimex-stm32-p107/src/olimex-stm32-p107.h
@@ -77,7 +77,7 @@ void weak_function stm32_spidev_initialize(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/olimex-stm32-p107/src/stm32_appinit.c b/boards/arm/stm32/olimex-stm32-p107/src/stm32_appinit.c
index c2f8f22..4926f1c 100644
--- a/boards/arm/stm32/olimex-stm32-p107/src/stm32_appinit.c
+++ b/boards/arm/stm32/olimex-stm32-p107/src/stm32_appinit.c
@@ -73,7 +73,7 @@ int board_app_initialize(uintptr_t arg)
 {
   int ret;
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/olimex-stm32-p207/src/Make.defs b/boards/arm/stm32/olimex-stm32-p207/src/Make.defs
index f39b6aa..9db929b 100644
--- a/boards/arm/stm32/olimex-stm32-p207/src/Make.defs
+++ b/boards/arm/stm32/olimex-stm32-p207/src/Make.defs
@@ -44,7 +44,7 @@ ifeq ($(CONFIG_ADC),y)
 CSRCS +=  stm32_adc.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h b/boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h
index 605a69f..c18c868 100644
--- a/boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h
+++ b/boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h
@@ -131,7 +131,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/olimex-stm32-p207/src/stm32_appinit.c b/boards/arm/stm32/olimex-stm32-p207/src/stm32_appinit.c
index 52d0b93..9efa1ee 100644
--- a/boards/arm/stm32/olimex-stm32-p207/src/stm32_appinit.c
+++ b/boards/arm/stm32/olimex-stm32-p207/src/stm32_appinit.c
@@ -130,7 +130,7 @@ int board_app_initialize(uintptr_t arg)
 {
   int ret;
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/olimex-stm32-p407/src/Make.defs b/boards/arm/stm32/olimex-stm32-p407/src/Make.defs
index b2fee25..e70761e 100644
--- a/boards/arm/stm32/olimex-stm32-p407/src/Make.defs
+++ b/boards/arm/stm32/olimex-stm32-p407/src/Make.defs
@@ -48,7 +48,7 @@ ifeq ($(CONFIG_ADC),y)
   CSRCS +=  stm32_adc.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
   CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/olimex-stm32-p407/src/olimex-stm32-p407.h b/boards/arm/stm32/olimex-stm32-p407/src/olimex-stm32-p407.h
index 8dd84b0..299a226 100644
--- a/boards/arm/stm32/olimex-stm32-p407/src/olimex-stm32-p407.h
+++ b/boards/arm/stm32/olimex-stm32-p407/src/olimex-stm32-p407.h
@@ -316,7 +316,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c b/boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c
index 3c2aee2..208208f 100644
--- a/boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c
+++ b/boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c
@@ -137,7 +137,7 @@ int stm32_bringup(void)
   sdio_mediachange(sdio, true);
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/olimexino-stm32/src/Make.defs b/boards/arm/stm32/olimexino-stm32/src/Make.defs
index 634e052..9d6eb37 100644
--- a/boards/arm/stm32/olimexino-stm32/src/Make.defs
+++ b/boards/arm/stm32/olimexino-stm32/src/Make.defs
@@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = stm32_boot.c stm32_spi.c stm32_leds.c
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h b/boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h
index a52c939..8d8700b 100644
--- a/boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h
+++ b/boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h
@@ -208,7 +208,7 @@ int board_usbmsc_initialize(int port);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/olimexino-stm32/src/stm32_appinit.c b/boards/arm/stm32/olimexino-stm32/src/stm32_appinit.c
index 8dfa03e..9c34de3 100644
--- a/boards/arm/stm32/olimexino-stm32/src/stm32_appinit.c
+++ b/boards/arm/stm32/olimexino-stm32/src/stm32_appinit.c
@@ -87,7 +87,7 @@ int board_app_initialize(uintptr_t arg)
   ret = board_composite_initialize(0);
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/omnibusf4/src/omnibusf4.h b/boards/arm/stm32/omnibusf4/src/omnibusf4.h
index 0528d9d..ab79318 100644
--- a/boards/arm/stm32/omnibusf4/src/omnibusf4.h
+++ b/boards/arm/stm32/omnibusf4/src/omnibusf4.h
@@ -167,7 +167,7 @@ int weak_function stm32_pwm_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/omnibusf4/src/stm32_bringup.c b/boards/arm/stm32/omnibusf4/src/stm32_bringup.c
index d2d7a79..5b130a2 100644
--- a/boards/arm/stm32/omnibusf4/src/stm32_bringup.c
+++ b/boards/arm/stm32/omnibusf4/src/stm32_bringup.c
@@ -187,7 +187,7 @@ int stm32_bringup(void)
     }
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/shenzhou/src/Make.defs b/boards/arm/stm32/shenzhou/src/Make.defs
index d3a175d..e22f3bb 100644
--- a/boards/arm/stm32/shenzhou/src/Make.defs
+++ b/boards/arm/stm32/shenzhou/src/Make.defs
@@ -52,7 +52,7 @@ ifeq ($(CONFIG_USBMSC),y)
 CSRCS += stm32_usbmsc.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/shenzhou/src/shenzhou.h b/boards/arm/stm32/shenzhou/src/shenzhou.h
index ed23fc9..cc2593a 100644
--- a/boards/arm/stm32/shenzhou/src/shenzhou.h
+++ b/boards/arm/stm32/shenzhou/src/shenzhou.h
@@ -486,7 +486,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/shenzhou/src/stm32_appinit.c b/boards/arm/stm32/shenzhou/src/stm32_appinit.c
index 13d49d5..cb29d93 100644
--- a/boards/arm/stm32/shenzhou/src/stm32_appinit.c
+++ b/boards/arm/stm32/shenzhou/src/stm32_appinit.c
@@ -212,7 +212,7 @@ int board_app_initialize(uintptr_t arg)
     }
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/stm3210e-eval/src/Make.defs b/boards/arm/stm32/stm3210e-eval/src/Make.defs
index 74a533e..721a877 100644
--- a/boards/arm/stm32/stm3210e-eval/src/Make.defs
+++ b/boards/arm/stm32/stm3210e-eval/src/Make.defs
@@ -44,7 +44,7 @@ ifeq ($(CONFIG_USBDEV_COMPOSITE),y)
 CSRCS += stm32_composite.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/stm3210e-eval/src/stm3210e-eval.h b/boards/arm/stm32/stm3210e-eval/src/stm3210e-eval.h
index 6903daf..4af51b8 100644
--- a/boards/arm/stm32/stm3210e-eval/src/stm3210e-eval.h
+++ b/boards/arm/stm32/stm3210e-eval/src/stm3210e-eval.h
@@ -221,7 +221,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_bringup.c b/boards/arm/stm32/stm3210e-eval/src/stm32_bringup.c
index ef1d138..6e0e8a3 100644
--- a/boards/arm/stm32/stm3210e-eval/src/stm32_bringup.c
+++ b/boards/arm/stm32/stm3210e-eval/src/stm32_bringup.c
@@ -279,7 +279,7 @@ int stm32_bringup(void)
     }
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/stm3220g-eval/src/Make.defs b/boards/arm/stm32/stm3220g-eval/src/Make.defs
index bc3ce6a..8346d32 100644
--- a/boards/arm/stm32/stm3220g-eval/src/Make.defs
+++ b/boards/arm/stm32/stm3220g-eval/src/Make.defs
@@ -48,7 +48,7 @@ ifeq ($(CONFIG_PWM),y)
 CSRCS += stm32_pwm.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/stm3220g-eval/src/stm3220g-eval.h b/boards/arm/stm32/stm3220g-eval/src/stm3220g-eval.h
index e90bdd0..774f950 100644
--- a/boards/arm/stm32/stm3220g-eval/src/stm3220g-eval.h
+++ b/boards/arm/stm32/stm3220g-eval/src/stm3220g-eval.h
@@ -305,7 +305,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c b/boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c
index 77a2773..4de80de 100644
--- a/boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c
+++ b/boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c
@@ -309,7 +309,7 @@ int board_app_initialize(uintptr_t arg)
     }
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/stm3240g-eval/src/Make.defs b/boards/arm/stm32/stm3240g-eval/src/Make.defs
index cfc00e8..bb1822e 100644
--- a/boards/arm/stm32/stm3240g-eval/src/Make.defs
+++ b/boards/arm/stm32/stm3240g-eval/src/Make.defs
@@ -49,7 +49,7 @@ ifeq ($(CONFIG_PWM),y)
 CSRCS += stm32_pwm.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/stm3240g-eval/src/stm3240g-eval.h b/boards/arm/stm32/stm3240g-eval/src/stm3240g-eval.h
index 274bd07..fbd4c23 100644
--- a/boards/arm/stm32/stm3240g-eval/src/stm3240g-eval.h
+++ b/boards/arm/stm32/stm3240g-eval/src/stm3240g-eval.h
@@ -333,7 +333,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/stm3240g-eval/src/stm32_bringup.c b/boards/arm/stm32/stm3240g-eval/src/stm32_bringup.c
index 345e8b5..6ab613d 100644
--- a/boards/arm/stm32/stm3240g-eval/src/stm32_bringup.c
+++ b/boards/arm/stm32/stm3240g-eval/src/stm32_bringup.c
@@ -376,7 +376,7 @@ int stm32_bringup(void)
     }
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/stm32f334-disco/src/Make.defs b/boards/arm/stm32/stm32f334-disco/src/Make.defs
index 8b8f06b..19c0380 100644
--- a/boards/arm/stm32/stm32f334-disco/src/Make.defs
+++ b/boards/arm/stm32/stm32f334-disco/src/Make.defs
@@ -30,7 +30,7 @@ ifeq ($(CONFIG_BOARDCTL),y)
 CSRCS += stm32_appinit.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h b/boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h
index d7ee6cb..62b05c7 100644
--- a/boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h
+++ b/boards/arm/stm32/stm32f334-disco/src/stm32f334-disco.h
@@ -154,7 +154,7 @@ int stm32_adc_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/stm32f4discovery/src/Make.defs b/boards/arm/stm32/stm32f4discovery/src/Make.defs
index 9b118e1..f5ebaef 100644
--- a/boards/arm/stm32/stm32f4discovery/src/Make.defs
+++ b/boards/arm/stm32/stm32f4discovery/src/Make.defs
@@ -40,7 +40,7 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
 CSRCS +=  stm32_buttons.c
 endif
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c b/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c
index d124e21..322ff1f 100644
--- a/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c
+++ b/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c
@@ -332,7 +332,7 @@ int stm32_bringup(void)
     }
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h b/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h
index 8bd7100..09df790 100644
--- a/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h
+++ b/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h
@@ -563,7 +563,7 @@ int stm32_pwm_setup(void);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif
 
diff --git a/boards/arm/stm32/viewtool-stm32f107/src/Make.defs b/boards/arm/stm32/viewtool-stm32f107/src/Make.defs
index 9590568..414ddbd 100644
--- a/boards/arm/stm32/viewtool-stm32f107/src/Make.defs
+++ b/boards/arm/stm32/viewtool-stm32f107/src/Make.defs
@@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = stm32_boot.c stm32_bringup.c stm32_leds.c stm32_spi.c
 
-ifeq ($(CONFIG_CAN),y)
+ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y)
 CSRCS += stm32_can.c
 endif
 
diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_bringup.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_bringup.c
index 0b0a853..2d6f620 100644
--- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_bringup.c
+++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_bringup.c
@@ -164,7 +164,7 @@ int stm32_bringup(void)
     }
 #endif
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
   /* Initialize CAN and register the CAN driver. */
 
   ret = stm32_can_setup();
diff --git a/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h b/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h
index 9c83c4b..f4671e6 100644
--- a/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h
+++ b/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h
@@ -442,7 +442,7 @@ int stm32_sdinitialize(int minor);
  *
  ****************************************************************************/
 
-#ifdef CONFIG_CAN
+#ifdef CONFIG_STM32_CAN_CHARDRIVER
 int stm32_can_setup(void);
 #endif