Przeglądaj źródła

Remove OPT_MCU_STM for L and G series.

Nathan Conrad 6 lat temu
rodzic
commit
23d39f2b15

+ 4 - 11
src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c

@@ -35,7 +35,7 @@
  * STM32F070RB
  * STM32F070RB
  *
  *
  *
  *
- * It also should work with minimal changes for any ST MCU with an "USB A" peripheral. This
+ * It also should work with minimal changes for any ST MCU with an "USB A"/"PCD"/"HCD" peripheral. This
  * covers:
  * covers:
  *
  *
  * F04x, F072, F078, 070x6/B      1024 byte buffer
  * F04x, F072, F078, 070x6/B      1024 byte buffer
@@ -44,7 +44,7 @@
  * F302x6/8, F302xD/E2, F303xD/E  1024 byte buffer; no internal D+ pull-up
  * F302x6/8, F302xD/E2, F303xD/E  1024 byte buffer; no internal D+ pull-up
  * L0x2, L0x3                     1024 byte buffer
  * L0x2, L0x3                     1024 byte buffer
  * L1                              512 byte buffer
  * L1                              512 byte buffer
- * 2L4x2, 2L4x3                   1024 byte buffer
+ * L4x2, L4x3                     1024 byte buffer
  *
  *
  * Assumptions of the driver:
  * Assumptions of the driver:
  * - dcd_fs_irqHandler() is called by the USB interrupt handler
  * - dcd_fs_irqHandler() is called by the USB interrupt handler
@@ -107,13 +107,7 @@
     ((CFG_TUSB_MCU) == (OPT_MCU_STM32F0x0)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32F0x2)) || \
     ((CFG_TUSB_MCU) == (OPT_MCU_STM32F0x0)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32F0x2)) || \
         ((CFG_TUSB_MCU) == (OPT_MCU_STM32F0x8)) || \
         ((CFG_TUSB_MCU) == (OPT_MCU_STM32F0x8)) || \
     ((CFG_TUSB_MCU) == (OPT_MCU_STM32F1x2)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32F1x3)) || \
     ((CFG_TUSB_MCU) == (OPT_MCU_STM32F1x2)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32F1x3)) || \
-    ((CFG_TUSB_MCU) == (OPT_MCU_STM32F3x2)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32F3x3)) || \
-    ((CFG_TUSB_MCU) == (OPT_MCU_STM32L0x1)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32L0x2)) || \
-    ((CFG_TUSB_MCU) == (OPT_MCU_STM32L1x0)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32L1x1)) || \
-        ((CFG_TUSB_MCU) == (OPT_MCU_STM32L1x2))  || \
-    ((CFG_TUSB_MCU) == (OPT_MCU_STM32L4x2)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32L4x3)) || \
-    ((CFG_TUSB_MCU) == (OPT_MCU_STM32G1x1)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32G1x3)) || \
-        ((CFG_TUSB_MCU) == (OPT_MCU_STM32G1x4)) \
+    ((CFG_TUSB_MCU) == (OPT_MCU_STM32F3x2)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32F3x3)) \
     )
     )
 
 
 // In order to reduce the dependance on HAL, we undefine this.
 // In order to reduce the dependance on HAL, we undefine this.
@@ -792,8 +786,7 @@ static void dcd_read_packet_memory(void *__restrict dst, uint16_t src, size_t wN
 
 
 // Interrupt handlers
 // Interrupt handlers
 #if ((CFG_TUSB_MCU) == (OPT_MCU_STM32F0x0)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32F0x2)) || \
 #if ((CFG_TUSB_MCU) == (OPT_MCU_STM32F0x0)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32F0x2)) || \
-       ((CFG_TUSB_MCU) == (OPT_MCU_STM32F0x8)) || \
-	  ((CFG_TUSB_MCU) == (OPT_MCU_STM32L0x1)) || ((CFG_TUSB_MCU) == (OPT_MCU_STM32L0x2))
+       ((CFG_TUSB_MCU) == (OPT_MCU_STM32F0x8))
 void USB_IRQHandler(void)
 void USB_IRQHandler(void)
 {
 {
   dcd_fs_irqHandler();
   dcd_fs_irqHandler();

+ 1 - 1
src/portable/st/stm32_fsdev/dcd_stm32_fsdev_pvt_st.h

@@ -78,7 +78,7 @@
 // When CAN clock is enabled, USB can use first 768 bytes ONLY.
 // When CAN clock is enabled, USB can use first 768 bytes ONLY.
 #else
 #else
 #error You are using an untested or unimplemented STM32 variant. Please update the driver.
 #error You are using an untested or unimplemented STM32 variant. Please update the driver.
-// This includes for L0x2, L0x3, L1, L4x2 and L4x3
+// This includes L0x2, L0x3, L1x0, L1x1, L1x2, L4x2 and L4x3, G1x1, G1x3, and G1x4
 #endif
 #endif
 
 
 // For purposes of accessing the packet
 // For purposes of accessing the packet

+ 0 - 11
src/tusb_option.h

@@ -62,17 +62,6 @@
 #define OPT_MCU_STM32F1x3     334 ///< ST STM32F1x3
 #define OPT_MCU_STM32F1x3     334 ///< ST STM32F1x3
 #define OPT_MCU_STM32F3x2     335 ///< ST STM32F3x2
 #define OPT_MCU_STM32F3x2     335 ///< ST STM32F3x2
 #define OPT_MCU_STM32F3x3     336 ///< ST STM32F3x3
 #define OPT_MCU_STM32F3x3     336 ///< ST STM32F3x3
-#define OPT_MCU_STM32L0x1     337 ///< ST STM32L3x1
-#define OPT_MCU_STM32L0x2     338 ///< ST STM32L3x2
-#define OPT_MCU_STM32L1x0     339 ///< ST STM32L1x0
-#define OPT_MCU_STM32L1x1     340 ///< ST STM32L1x1
-#define OPT_MCU_STM32L1x2     341 ///< ST STM32L1x2
-#define OPT_MCU_STM32L4x2     342 ///< ST STM32L4x2
-#define OPT_MCU_STM32L4x3     343 ///< ST STM32L4x3
-#define OPT_MCU_STM32G4x1     344 ///< ST STM32G4x1
-#define OPT_MCU_STM32G4x3     345 ///< ST STM32G4x3
-#define OPT_MCU_STM32G4x4     346 ///< ST STM32G4x4
-
 
 
 
 
 /** @} */
 /** @} */