From 922e75409f92ede3362925181bb0ab8ceb07f914 Mon Sep 17 00:00:00 2001 From: Philipp Molitor Date: Wed, 14 Aug 2024 01:04:14 +0200 Subject: [PATCH] more h5 usbfs register fixes --- src/stm32/usbfs.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/stm32/usbfs.c b/src/stm32/usbfs.c index f44f28585..c883f76be 100644 --- a/src/stm32/usbfs.c +++ b/src/stm32/usbfs.c @@ -30,12 +30,7 @@ typedef volatile uint16_t epmword_t; #define WSIZE 2 #define USBx_IRQn USB_LP_IRQn -#elif CONFIG_MACH_STM32G0 - // Transfer memory is accessed with 32bits and contains 32bits of data - typedef volatile uint32_t epmword_t; - #define WSIZE 4 - #define USBx_IRQn USB_IRQn -#elif CONFIG_MACH_STM32H5 +#elif CONFIG_MACH_STM32G0 || CONFIG_MACH_STM32H5 // Transfer memory is accessed with 32bits and contains 32bits of data typedef volatile uint32_t epmword_t; #define WSIZE 4 @@ -45,7 +40,6 @@ // The stm32g0 and stm32h5 have slightly different register names #if CONFIG_MACH_STM32G0 || CONFIG_MACH_STM32H5 #if CONFIG_MACH_STM32G0 - #define USB USB_DRD_FS #if CONFIG_MACH_STM32G0B1 #define USB_IRQn USB_UCPD1_2_IRQn #endif @@ -54,6 +48,7 @@ #define USB_IRQn USB_DRD_FS_IRQn #define USB_BASE USB_DRD_FS_BASE #endif + #define USB USB_DRD_FS #define USB_PMAADDR USB_DRD_PMAADDR #define USB_EPADDR_FIELD USB_CHEP_ADDR #define USB_EP_CTR_RX USB_EP_VTRX