mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 03:50:58 +00:00
refactor(core): fix platform header includes
[no changelog]
This commit is contained in:
parent
7670958fc5
commit
d062a54929
@ -32,6 +32,7 @@
|
|||||||
#include "image.h"
|
#include "image.h"
|
||||||
#include "model.h"
|
#include "model.h"
|
||||||
#include "mpu.h"
|
#include "mpu.h"
|
||||||
|
#include "platform.h"
|
||||||
#include "rng.h"
|
#include "rng.h"
|
||||||
#include "rsod.h"
|
#include "rsod.h"
|
||||||
#include "secret.h"
|
#include "secret.h"
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "mpu.h"
|
#include "mpu.h"
|
||||||
#include "optiga_commands.h"
|
#include "optiga_commands.h"
|
||||||
#include "optiga_transport.h"
|
#include "optiga_transport.h"
|
||||||
|
#include "platform.h"
|
||||||
#include "random_delays.h"
|
#include "random_delays.h"
|
||||||
#include "rsod.h"
|
#include "rsod.h"
|
||||||
#include "sdcard.h"
|
#include "sdcard.h"
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include "secbool.h"
|
#include "secbool.h"
|
||||||
|
|
||||||
#include "error_handling.h"
|
#include "error_handling.h"
|
||||||
#include "platform.h"
|
|
||||||
#include "systick.h"
|
#include "systick.h"
|
||||||
|
|
||||||
#ifndef MIN_8bits
|
#ifndef MIN_8bits
|
||||||
|
@ -24,9 +24,22 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "flash_ll.h"
|
#include "flash_ll.h"
|
||||||
#include "platform.h"
|
|
||||||
#include "secbool.h"
|
#include "secbool.h"
|
||||||
|
|
||||||
|
#ifndef TREZOR_EMULATOR
|
||||||
|
#include STM32_HAL_H
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef STM32U5
|
||||||
|
|
||||||
|
#define FLASH_QUADWORD_WORDS (4)
|
||||||
|
#define FLASH_QUADWORD_SIZE (FLASH_QUADWORD_WORDS * sizeof(uint32_t))
|
||||||
|
|
||||||
|
#define FLASH_BURST_WORDS (8 * FLASH_QUADWORD_WORDS)
|
||||||
|
#define FLASH_BURST_SIZE (FLASH_BURST_WORDS * sizeof(uint32_t))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
void flash_init(void);
|
void flash_init(void);
|
||||||
|
|
||||||
#endif // TREZORHAL_FLASH_H
|
#endif // TREZORHAL_FLASH_H
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "irq.h"
|
#include "irq.h"
|
||||||
#include "model.h"
|
#include "model.h"
|
||||||
#include "mpu.h"
|
#include "mpu.h"
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
#ifdef KERNEL_MODE
|
#ifdef KERNEL_MODE
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "optiga_hal.h"
|
#include "optiga_hal.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include TREZOR_BOARD
|
#include TREZOR_BOARD
|
||||||
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#ifdef KERNEL_MODE
|
#ifdef KERNEL_MODE
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include "irq.h"
|
#include "irq.h"
|
||||||
#include "mpu.h"
|
#include "mpu.h"
|
||||||
#include "platform.h"
|
|
||||||
#include "systemview.h"
|
#include "systemview.h"
|
||||||
|
|
||||||
#include "systick.h"
|
#include "systick.h"
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "irq.h"
|
#include "irq.h"
|
||||||
#include "platform.h"
|
|
||||||
#include "systick_internal.h"
|
#include "systick_internal.h"
|
||||||
#include "systimer.h"
|
#include "systimer.h"
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef TREZORHAL_DISPLAY_INTERNAL_H
|
#ifndef TREZORHAL_DISPLAY_INTERNAL_H
|
||||||
#define TREZORHAL_DISPLAY_INTERNAL_H
|
#define TREZORHAL_DISPLAY_INTERNAL_H
|
||||||
|
|
||||||
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifdef XFRAMEBUFFER
|
#ifdef XFRAMEBUFFER
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#include "error_handling.h"
|
#include "error_handling.h"
|
||||||
#include "flash_otp.h"
|
#include "flash_otp.h"
|
||||||
#include "model.h"
|
#include "model.h"
|
||||||
#include "platform.h"
|
|
||||||
#include "rand.h"
|
#include "rand.h"
|
||||||
#include "secret.h"
|
#include "secret.h"
|
||||||
|
|
||||||
|
@ -20,15 +20,8 @@
|
|||||||
#ifndef TREZORHAL_STM32_H
|
#ifndef TREZORHAL_STM32_H
|
||||||
#define TREZORHAL_STM32_H
|
#define TREZORHAL_STM32_H
|
||||||
|
|
||||||
#include STM32_HAL_H
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define FLASH_QUADWORD_WORDS (4)
|
|
||||||
#define FLASH_QUADWORD_SIZE (FLASH_QUADWORD_WORDS * sizeof(uint32_t))
|
|
||||||
|
|
||||||
#define FLASH_BURST_WORDS (8 * FLASH_QUADWORD_WORDS)
|
|
||||||
#define FLASH_BURST_SIZE (FLASH_BURST_WORDS * sizeof(uint32_t))
|
|
||||||
|
|
||||||
// the following functions are defined in util.s
|
// the following functions are defined in util.s
|
||||||
void memset_reg(volatile void *start, volatile void *stop, uint32_t val);
|
void memset_reg(volatile void *start, volatile void *stop, uint32_t val);
|
||||||
void jump_to(uint32_t address);
|
void jump_to(uint32_t address);
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include STM32_HAL_H
|
||||||
|
|
||||||
#include "secret.h"
|
#include "secret.h"
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "platform.h"
|
|
||||||
|
|
||||||
static char last_left = 0, last_right = 0;
|
static char last_left = 0, last_right = 0;
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "platform.h"
|
|
||||||
#include "touch.h"
|
#include "touch.h"
|
||||||
|
|
||||||
extern int sdl_display_res_x, sdl_display_res_y;
|
extern int sdl_display_res_x, sdl_display_res_y;
|
||||||
|
Loading…
Reference in New Issue
Block a user