summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Conrad <[email protected]>2019-09-19 09:28:19 -0400
committerNathan Conrad <[email protected]>2019-09-19 09:30:16 -0400
commit642afeea8b7189cd37e2bbf87427df95f5587c72 (patch)
tree1744ad507342218e748f0084005edd46390bb095 /src
parent85623584f99dfa0a974ffe62639e58a0f2589674 (diff)
s/static const/define/
Diffstat (limited to 'src')
-rw-r--r--src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h12
1 files 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