diff --git a/core/SConscript.boardloader b/core/SConscript.boardloader index 786c9970a..0d4607e46 100644 --- a/core/SConscript.boardloader +++ b/core/SConscript.boardloader @@ -59,8 +59,8 @@ CPPPATH_MOD += [ ] SOURCE_MOD += [ 'embed/lib/colors.c', + 'embed/lib/display_draw.c', 'embed/lib/display_utils.c', - 'embed/lib/display.c', 'embed/lib/fonts/font_bitmap.c', 'embed/lib/fonts/fonts.c', 'embed/lib/image.c', diff --git a/core/SConscript.bootloader b/core/SConscript.bootloader index 8e673b666..a29701e2b 100644 --- a/core/SConscript.bootloader +++ b/core/SConscript.bootloader @@ -83,8 +83,8 @@ SOURCE_MOD += [ 'embed/extmod/modtrezorcrypto/rand.c', 'embed/lib/buffers.c', 'embed/lib/colors.c', + 'embed/lib/display_draw.c', 'embed/lib/display_utils.c', - 'embed/lib/display.c', 'embed/lib/fonts/font_bitmap.c', 'embed/lib/fonts/fonts.c', 'embed/lib/image.c', diff --git a/core/SConscript.bootloader_ci b/core/SConscript.bootloader_ci index 5ac0d8805..085855efd 100644 --- a/core/SConscript.bootloader_ci +++ b/core/SConscript.bootloader_ci @@ -76,8 +76,8 @@ CPPPATH_MOD += [ SOURCE_MOD += [ 'embed/extmod/modtrezorcrypto/rand.c', 'embed/lib/colors.c', + 'embed/lib/display_draw.c', 'embed/lib/display_utils.c', - 'embed/lib/display.c', 'embed/lib/fonts/font_bitmap.c', 'embed/lib/fonts/fonts.c', 'embed/lib/image.c', diff --git a/core/SConscript.bootloader_emu b/core/SConscript.bootloader_emu index d912d3bb1..56b23e403 100644 --- a/core/SConscript.bootloader_emu +++ b/core/SConscript.bootloader_emu @@ -80,8 +80,8 @@ SOURCE_MOD += [ 'embed/extmod/modtrezorcrypto/rand.c', 'embed/lib/buffers.c', 'embed/lib/colors.c', + 'embed/lib/display_draw.c', 'embed/lib/display_utils.c', - 'embed/lib/display.c', 'embed/lib/fonts/font_bitmap.c', 'embed/lib/fonts/fonts.c', 'embed/lib/image.c', diff --git a/core/SConscript.firmware b/core/SConscript.firmware index b988ef114..f312990cf 100644 --- a/core/SConscript.firmware +++ b/core/SConscript.firmware @@ -190,8 +190,8 @@ SOURCE_MOD += [ 'embed/extmod/modtrezorui/modtrezorui.c', 'embed/lib/buffers.c', 'embed/lib/colors.c', + 'embed/lib/display_draw.c', 'embed/lib/display_utils.c', - 'embed/lib/display.c', 'embed/lib/fonts/font_bitmap.c', 'embed/lib/fonts/fonts.c', 'embed/lib/image.c', diff --git a/core/SConscript.prodtest b/core/SConscript.prodtest index bf8b4d188..e8b32a075 100644 --- a/core/SConscript.prodtest +++ b/core/SConscript.prodtest @@ -81,8 +81,8 @@ CPPPATH_MOD += [ SOURCE_MOD += [ 'embed/lib/colors.c', + 'embed/lib/display_draw.c', 'embed/lib/display_utils.c', - 'embed/lib/display.c', 'embed/lib/fonts/font_bitmap.c', 'embed/lib/fonts/fonts.c', 'embed/lib/image.c', diff --git a/core/SConscript.reflash b/core/SConscript.reflash index 8b63be817..22fcc40c0 100644 --- a/core/SConscript.reflash +++ b/core/SConscript.reflash @@ -55,8 +55,8 @@ CPPPATH_MOD += [ ] SOURCE_MOD += [ 'embed/lib/colors.c', + 'embed/lib/display_draw.c', 'embed/lib/display_utils.c', - 'embed/lib/display.c', 'embed/lib/fonts/font_bitmap.c', 'embed/lib/fonts/fonts.c', 'embed/lib/image.c', diff --git a/core/SConscript.unix b/core/SConscript.unix index 783485a99..1ff872700 100644 --- a/core/SConscript.unix +++ b/core/SConscript.unix @@ -192,8 +192,8 @@ SOURCE_MOD += [ 'embed/extmod/modtrezorui/modtrezorui.c', 'embed/lib/buffers.c', 'embed/lib/colors.c', + 'embed/lib/display_draw.c', 'embed/lib/display_utils.c', - 'embed/lib/display.c', 'embed/lib/fonts/font_bitmap.c', 'embed/lib/fonts/fonts.c', 'embed/lib/image.c', diff --git a/core/embed/lib/display.c b/core/embed/lib/display_draw.c similarity index 99% rename from core/embed/lib/display.c rename to core/embed/lib/display_draw.c index 5c99bfaff..608fabe42 100644 --- a/core/embed/lib/display.c +++ b/core/embed/lib/display_draw.c @@ -19,7 +19,7 @@ #define _GNU_SOURCE -#include "display.h" +#include "display_draw.h" #include "buffers.h" #include "common.h" @@ -34,7 +34,7 @@ #include "memzero.h" -#include "display_interface.h" +#include "display.h" static struct { int x, y; } DISPLAY_OFFSET; diff --git a/core/embed/lib/display.h b/core/embed/lib/display_draw.h similarity index 95% rename from core/embed/lib/display.h rename to core/embed/lib/display_draw.h index f76c8b4cc..dcd046681 100644 --- a/core/embed/lib/display.h +++ b/core/embed/lib/display_draw.h @@ -17,8 +17,8 @@ * along with this program. If not, see . */ -#ifndef __DISPLAY_H__ -#define __DISPLAY_H__ +#ifndef __DISPLAY_DRAW_H__ +#define __DISPLAY_DRAW_H__ #include #include @@ -27,7 +27,6 @@ #include "buffers.h" #include "colors.h" #include TREZOR_BOARD -#include "display_interface.h" #include "fonts/fonts.h" // provided by common diff --git a/core/embed/lib/dma2d_emul.c b/core/embed/lib/dma2d_emul.c index a9ccd9d10..99fb880be 100644 --- a/core/embed/lib/dma2d_emul.c +++ b/core/embed/lib/dma2d_emul.c @@ -18,7 +18,7 @@ */ #include "colors.h" -#include "display_interface.h" +#include "display.h" typedef enum { DMA2D_LAYER_FG = 1, diff --git a/core/embed/rust/trezorhal.h b/core/embed/rust/trezorhal.h index 1ee7ac69a..8425398b2 100644 --- a/core/embed/rust/trezorhal.h +++ b/core/embed/rust/trezorhal.h @@ -3,7 +3,6 @@ #include "button.h" #include "common.h" #include "display.h" -#include "display_interface.h" #include "dma2d.h" #include "flash.h" #include "fonts/fonts.h" diff --git a/core/embed/lib/display_interface.h b/core/embed/trezorhal/display.h similarity index 94% rename from core/embed/lib/display_interface.h rename to core/embed/trezorhal/display.h index 19f68161a..4cc2a2bc1 100644 --- a/core/embed/lib/display_interface.h +++ b/core/embed/trezorhal/display.h @@ -17,11 +17,12 @@ * along with this program. If not, see . */ -#ifndef _DISPLAY_INTERFACE_H -#define _DISPLAY_INTERFACE_H +#ifndef TREZORHAL_DISPLAY_H +#define TREZORHAL_DISPLAY_H #include #include "common.h" +#include "display_draw.h" #include TREZOR_BOARD #ifndef DISPLAY_FRAMEBUFFER_OFFSET_Y @@ -68,4 +69,4 @@ uint8_t *display_get_wr_addr(void); void display_shift_window(uint16_t pixels); uint16_t display_get_window_offset(void); -#endif //_DISPLAY_INTERFACE_H +#endif // TREZORHAL_DISPLAY_H diff --git a/core/embed/trezorhal/stm32f4/displays/ltdc.c b/core/embed/trezorhal/stm32f4/displays/ltdc.c index 52cfd015d..0024773ed 100644 --- a/core/embed/trezorhal/stm32f4/displays/ltdc.c +++ b/core/embed/trezorhal/stm32f4/displays/ltdc.c @@ -19,7 +19,7 @@ #include #include TREZOR_BOARD -#include "display_interface.h" +#include "display.h" #include "memzero.h" #include STM32_HAL_H diff --git a/core/embed/trezorhal/stm32f4/displays/panels/lx154a2422.c b/core/embed/trezorhal/stm32f4/displays/panels/lx154a2422.c index acc0efe3f..9a632fd68 100644 --- a/core/embed/trezorhal/stm32f4/displays/panels/lx154a2422.c +++ b/core/embed/trezorhal/stm32f4/displays/panels/lx154a2422.c @@ -1,5 +1,5 @@ -#include "display_interface.h" +#include "display.h" #include "displays/st7789v.h" #include "touch.h" diff --git a/core/embed/trezorhal/stm32f4/displays/panels/tf15411a.c b/core/embed/trezorhal/stm32f4/displays/panels/tf15411a.c index 4c186bc74..179e3018f 100644 --- a/core/embed/trezorhal/stm32f4/displays/panels/tf15411a.c +++ b/core/embed/trezorhal/stm32f4/displays/panels/tf15411a.c @@ -1,4 +1,4 @@ -#include "display_interface.h" +#include "display.h" #include "displays/st7789v.h" void tf15411a_init_seq(void) { diff --git a/core/embed/trezorhal/stm32f4/displays/st7789v.c b/core/embed/trezorhal/stm32f4/displays/st7789v.c index ff2932e50..2d1a6e798 100644 --- a/core/embed/trezorhal/stm32f4/displays/st7789v.c +++ b/core/embed/trezorhal/stm32f4/displays/st7789v.c @@ -22,7 +22,7 @@ #include #include TREZOR_BOARD #include "backlight_pwm.h" -#include "display_interface.h" +#include "display.h" #include "irq.h" #include "memzero.h" #include "st7789v.h" diff --git a/core/embed/trezorhal/stm32f4/displays/ug-2828tswig01.c b/core/embed/trezorhal/stm32f4/displays/ug-2828tswig01.c index a9561b756..b705c9541 100644 --- a/core/embed/trezorhal/stm32f4/displays/ug-2828tswig01.c +++ b/core/embed/trezorhal/stm32f4/displays/ug-2828tswig01.c @@ -19,7 +19,7 @@ #include #include TREZOR_BOARD -#include "display_interface.h" +#include "display.h" #include "memzero.h" #include STM32_HAL_H diff --git a/core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c b/core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c index 29f371cd6..a26dc51fb 100644 --- a/core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c +++ b/core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c @@ -20,7 +20,7 @@ #include #include #include TREZOR_BOARD -#include "display_interface.h" +#include "display.h" #include STM32_HAL_H #ifdef USE_CONSUMPTION_MASK diff --git a/core/embed/trezorhal/stm32f4/dma2d.c b/core/embed/trezorhal/stm32f4/dma2d.c index d71b61bbe..5be0462e4 100644 --- a/core/embed/trezorhal/stm32f4/dma2d.c +++ b/core/embed/trezorhal/stm32f4/dma2d.c @@ -20,7 +20,7 @@ #include "dma2d.h" #include "colors.h" #include STM32_HAL_H -#include "display_interface.h" +#include "display.h" typedef enum { DMA2D_LAYER_FG = 1, diff --git a/core/embed/trezorhal/unix/display-unix.c b/core/embed/trezorhal/unix/display-unix.c index f0442cf4a..4170e933e 100644 --- a/core/embed/trezorhal/unix/display-unix.c +++ b/core/embed/trezorhal/unix/display-unix.c @@ -31,7 +31,7 @@ #include "common.h" #include "display-unix.h" -#include "display_interface.h" +#include "display.h" #include "profile.h" #define EMULATOR_BORDER 16