summaryrefslogtreecommitdiff
path: root/src/portable/st/stm32_fsdev
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-09-27 00:15:43 +0700
committerhathach <[email protected]>2019-09-27 00:15:43 +0700
commit6183dbd0ceefdbff42d30e6691fa9948a695e9af (patch)
treeee2660cfb05f002990a16ff69beea96271a09629 /src/portable/st/stm32_fsdev
parent7ba8e818527eca1c16946ef8f58a0cde807fb3f3 (diff)
add -Wextra for more warnings to example
non-stack warning (probably mcu driver) should be suppressed in the board.mk
Diffstat (limited to 'src/portable/st/stm32_fsdev')
-rw-r--r--src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c16
-rw-r--r--src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
index 00f5b1239..9debef2ae 100644
--- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
+++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
@@ -103,17 +103,17 @@
#include "tusb_option.h"
-#define STM32F1_FSDEV ( \
- defined(STM32F102x6) || defined(STM32F102xB) || \
+#if defined(STM32F102x6) || defined(STM32F102xB) || \
defined(STM32F103x6) || defined(STM32F103xB) || \
- defined(STM32F103xE) || defined(STM32F103xG) \
-)
+ defined(STM32F103xE) || defined(STM32F103xG)
+#define STM32F1_FSDEV
+#endif
#if (TUSB_OPT_DEVICE_ENABLED) && ( \
- (CFG_TUSB_MCU == OPT_MCU_STM32F0 ) || \
- (CFG_TUSB_MCU == OPT_MCU_STM32F1 && STM32F1_FSDEV ) || \
- (CFG_TUSB_MCU == OPT_MCU_STM32F3 ) || \
- (CFG_TUSB_MCU == OPT_MCU_STM32L0 ) \
+ (CFG_TUSB_MCU == OPT_MCU_STM32F0 ) || \
+ (CFG_TUSB_MCU == OPT_MCU_STM32F1 && defined(STM32F1_FSDEV)) || \
+ (CFG_TUSB_MCU == OPT_MCU_STM32F3 ) || \
+ (CFG_TUSB_MCU == OPT_MCU_STM32L0 ) \
)
// In order to reduce the dependance on HAL, we undefine this.
diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h
index 30538541a..bbaa52eae 100644
--- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h
+++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h
@@ -52,7 +52,7 @@
// 070RB: 2 x 16 bits/word memory LPM Support, BCD Support
// PMA dedicated to USB (no sharing with CAN)
-#elif STM32F1_FSDEV
+#elif defined(STM32F1_FSDEV)
#include "stm32f1xx.h"
#define PMA_LENGTH (512u)
// NO internal Pull-ups