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
pull/1514/head
Pavol Rusnak 3 years ago
parent e7966cc804
commit d211e3af07
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -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…
Cancel
Save