From f7b0aeec523577d2ab5b3d486124979e093f5a45 Mon Sep 17 00:00:00 2001 From: Nathan Conrad Date: Mon, 9 Sep 2019 19:20:26 -0400 Subject: Start clock on F0 and F0, and handle USB interrupts. --- src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c index 2411c1c37..8f809b6a7 100644 --- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c +++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c @@ -125,14 +125,18 @@ * Checks, structs, defines, function definitions, etc. */ -#if (MAX_EP_COUNT > 8) +#if ((MAX_EP_COUNT) > 8) # error Only 8 endpoints supported on the hardware #endif -#if ((DCD_STM32_BTABLE_BASE + DCD_STM32_BTABLE_LENGTH)>PMA_LENGTH) +#if (((DCD_STM32_BTABLE_BASE) + (DCD_STM32_BTABLE_LENGTH))>(PMA_LENGTH)) # error BTABLE does not fit in PMA RAM #endif +#if (((DCD_STM32_BTABLE_BASE) % 8) != 0) +// per STM32F3 reference manual +#error BTABLE must be aligned to 8 bytes +#endif // Max size of a USB FS packet is 64... #define MAX_PACKET_SIZE 64 -- cgit v1.3.1