Skip to content

Commit

Permalink
more h5 usbfs register fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippMolitor committed Aug 13, 2024
1 parent 2c9ca3a commit 922e754
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/stm32/usbfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 922e754

Please sign in to comment.