diff --git a/embed/trezorhal/common.c b/embed/trezorhal/common.c index 32baa46155..104c114cb9 100644 --- a/embed/trezorhal/common.c +++ b/embed/trezorhal/common.c @@ -60,6 +60,9 @@ void hal_delay(uint32_t ms) HAL_Delay(ms); } +#define USB_OTG_HS_DATA_FIFO_RAM (USB_OTG_HS_PERIPH_BASE + 0x20000U) // reference RM0090 section 35.12.1 Figure 413 +#define USB_OTG_HS_DATA_FIFO_SIZE (4096U) + void clear_peripheral_local_memory(void) { RCC->AHB1ENR |= RCC_AHB1ENR_OTGHSEN; // enable USB_OTG_HS peripheral clock so that the peripheral memory is accessible diff --git a/embed/trezorhal/common.h b/embed/trezorhal/common.h index 3863ac8adc..67d888e285 100644 --- a/embed/trezorhal/common.h +++ b/embed/trezorhal/common.h @@ -8,9 +8,6 @@ #define FIRMWARE_START 0x08020000 #define HEADER_SIZE 0x200 -#define USB_OTG_HS_DATA_FIFO_RAM (USB_OTG_HS_PERIPH_BASE + 0x20000U) // reference RM0090 section 35.12.1 Figure 413 -#define USB_OTG_HS_DATA_FIFO_SIZE (4096U) - extern void memset_reg(volatile void *start, volatile void *stop, uint32_t val); void clear_peripheral_local_memory(void);