aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/usbfs.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2022-12-15 18:42:31 -0500
committerKevin O'Connor <kevin@koconnor.net>2022-12-15 18:43:25 -0500
commitb0d9cbfb4bf91674cf460aac531c8d79f3bd4303 (patch)
tree838cd377f4bcfcf9edc713fd2918ddab47761738 /src/stm32/usbfs.c
parent7d1df81e5eddca79b888f6ae1ba9b196c57ceb16 (diff)
downloadkutter-b0d9cbfb4bf91674cf460aac531c8d79f3bd4303.tar.gz
kutter-b0d9cbfb4bf91674cf460aac531c8d79f3bd4303.tar.xz
kutter-b0d9cbfb4bf91674cf460aac531c8d79f3bd4303.zip
stm32: Fix usb build on stm32g0b0
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/stm32/usbfs.c')
-rw-r--r--src/stm32/usbfs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/stm32/usbfs.c b/src/stm32/usbfs.c
index f144b2c9..f7559efd 100644
--- a/src/stm32/usbfs.c
+++ b/src/stm32/usbfs.c
@@ -29,9 +29,14 @@
// Transfer memory is accessed with 32bits and contains 32bits of data
typedef volatile uint32_t epmword_t;
#define WSIZE 4
- #define USBx_IRQn USB_UCPD1_2_IRQn
+ #define USBx_IRQn USB_IRQn
+#endif
- // The stm32g0 has slightly different register names
+// The stm32g0 has slightly different register names
+#if CONFIG_MACH_STM32G0
+ #if CONFIG_MACH_STM32G0B1
+ #define USB_IRQn USB_UCPD1_2_IRQn
+ #endif
#define USB USB_DRD_FS
#define USB_PMAADDR USB_DRD_PMAADDR
#define USB_EPADDR_FIELD USB_CHEP_ADDR