From 642afeea8b7189cd37e2bbf87427df95f5587c72 Mon Sep 17 00:00:00 2001 From: Nathan Conrad Date: Thu, 19 Sep 2019 09:28:19 -0400 Subject: [PATCH] s/static const/define/ --- src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 e205979fc..ff25df048 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 @@ -46,7 +46,7 @@ defined(STM32F072xB) | \ defined(STM32F078xx) #include "stm32f0xx.h" -#define PMA_LENGTH 1024 +#define PMA_LENGTH (1024u) // F0x2 models are crystal-less // All have internal D+ pull-up // 070RB: 2 x 16 bits/word memory LPM Support, BCD Support @@ -55,7 +55,7 @@ defined(STM32F103x6) | defined(STM32F103xB) | \ defined(STM32F103xE) | defined(STM32F103xB) #include "stm32f1xx.h" -#define PMA_LENGTH 512u +#define PMA_LENGTH (512u) // NO internal Pull-ups // *B, and *C: 2 x 16 bits/word #error The F102/F103 driver is expected not to work, but it might? Try it? @@ -64,7 +64,7 @@ defined(STM32F303xB) | defined(STM32F303xC) | \ defined(STM32F373xC) #include "stm32f3xx.h" -#define PMA_LENGTH 512u +#define PMA_LENGTH (512u) // NO internal Pull-ups // *B, and *C: 1 x 16 bits/word // PMA dedicated to USB (no sharing with CAN) @@ -72,7 +72,7 @@ defined(STM32F302xD) | defined(STM32F302xE) | \ defined(STM32F303xD) | defined(STM32F303xE) | \ #include "stm32f3xx.h" -#define PMA_LENGTH 1024u +#define PMA_LENGTH (1024u) // NO internal Pull-ups // *6, *8, *D, and *E: 2 x 16 bits/word LPM Support // When CAN clock is enabled, USB can use first 768 bytes ONLY. @@ -83,9 +83,9 @@ // For purposes of accessing the packet #if ((PMA_LENGTH) == 512u) -const size_t PMA_STRIDE = 2u; +#define PMA_STRIDE (2u) #elif ((PMA_LENGTH) == 1024u) -const size_t PMA_STRIDE = 1u; +#define PMA_STRIDE (1u) #endif // And for type-safety create a new macro for the volatile address of PMAADDR