1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-30 03:18:20 +00:00

trezorhal: move internal constants to common.c

This commit is contained in:
Pavol Rusnak 2017-10-11 19:06:09 +02:00
parent 69953a91c5
commit eb345046d3
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 3 additions and 3 deletions

View File

@ -60,6 +60,9 @@ void hal_delay(uint32_t ms)
HAL_Delay(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) void clear_peripheral_local_memory(void)
{ {
RCC->AHB1ENR |= RCC_AHB1ENR_OTGHSEN; // enable USB_OTG_HS peripheral clock so that the peripheral memory is accessible RCC->AHB1ENR |= RCC_AHB1ENR_OTGHSEN; // enable USB_OTG_HS peripheral clock so that the peripheral memory is accessible

View File

@ -8,9 +8,6 @@
#define FIRMWARE_START 0x08020000 #define FIRMWARE_START 0x08020000
#define HEADER_SIZE 0x200 #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); extern void memset_reg(volatile void *start, volatile void *stop, uint32_t val);
void clear_peripheral_local_memory(void); void clear_peripheral_local_memory(void);