mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
fix(core): switch define to invert display colors into const volatile
using define causes compiler to over-optimize the code in display_init_seq leading to larger differences in the resulting binaries when the flag changes we want to keep the difference to minimum (1 byte) and using const volatile instead of define achieves that
This commit is contained in:
parent
e7966cc804
commit
d211e3af07
@ -19,7 +19,12 @@
|
||||
|
||||
#include STM32_HAL_H
|
||||
|
||||
#define DISPLAY_ST7789V_INVERT_COLORS 0
|
||||
// using const volatile instead of #define results in binaries that change
|
||||
// only in 1-byte when the flag changes.
|
||||
// using #define leads compiler to over-optimize the code leading to bigger
|
||||
// differencies in the resulting binaries.
|
||||
|
||||
const volatile uint8_t DISPLAY_ST7789V_INVERT_COLORS = 0;
|
||||
|
||||
// FSMC/FMC Bank 1 - NOR/PSRAM 1
|
||||
#define DISPLAY_MEMORY_BASE 0x60000000
|
||||
|
Loading…
Reference in New Issue
Block a user