From eb345046d3e1d60086a29426c5af44c2de9f04a0 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 11 Oct 2017 19:06:09 +0200 Subject: [PATCH] trezorhal: move internal constants to common.c --- embed/trezorhal/common.c | 3 +++ embed/trezorhal/common.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) 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);