summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-05-15 19:08:27 +0800
committersakumisu <[email protected]>2022-05-15 19:08:36 +0800
commitd20a8ed7f285a6b7db361c04b27b13e34d507f2b (patch)
treedff9e0af20fca5ea8d53761eccb2cf91e842b507
parent3577e19b9c9222ec2829c2c3d165997287d0eea9 (diff)
move mm32 USB_BASE into c file
-rw-r--r--port/mm32/usb_dc_mm32.c3
-rw-r--r--port/mm32/usb_mm32_reg.h3
2 files changed, 3 insertions, 3 deletions
diff --git a/port/mm32/usb_dc_mm32.c b/port/mm32/usb_dc_mm32.c
index 76075064..9482dc95 100644
--- a/port/mm32/usb_dc_mm32.c
+++ b/port/mm32/usb_dc_mm32.c
@@ -5,6 +5,9 @@
#define USBD_IRQHandler USB_HP_CAN1_TX_IRQHandler //use actual usb irq name instead
#endif
+#define USB_BASE ((uint32_t)0x40005C00)
+#define USB ((USB_TypeDef *)USB_BASE)
+
#ifndef USB_NUM_BIDIR_ENDPOINTS
#define USB_NUM_BIDIR_ENDPOINTS 5
#endif
diff --git a/port/mm32/usb_mm32_reg.h b/port/mm32/usb_mm32_reg.h
index 11001f4d..54209664 100644
--- a/port/mm32/usb_mm32_reg.h
+++ b/port/mm32/usb_mm32_reg.h
@@ -156,9 +156,6 @@ typedef struct
__IO uint32_t rPOWER; /*! Address offset: 0x1C0 */
} USB_TypeDef;
-#define USB_BASE ((uint32_t)0x40005C00)
-#define USB ((USB_TypeDef*) USB_BASE )
-
/******************************************************************************/
/* */
/* USB */