From d20a8ed7f285a6b7db361c04b27b13e34d507f2b Mon Sep 17 00:00:00 2001 From: sakumisu <1203593632@qq.com> Date: Sun, 15 May 2022 19:08:27 +0800 Subject: move mm32 USB_BASE into c file --- port/mm32/usb_dc_mm32.c | 3 +++ port/mm32/usb_mm32_reg.h | 3 --- 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 */ -- cgit v1.3.1