1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 20:19:23 +00:00

refactor(core): relocate display resolution to model.h

[no changelog]
This commit is contained in:
cepetr 2024-10-31 21:15:18 +01:00 committed by cepetr
parent bba94ab1f6
commit 80a67c647f
25 changed files with 34 additions and 28 deletions

View File

@ -23,6 +23,7 @@
#include <stdbool.h>
#include "common.h"
#include "model.h"
#include TREZOR_BOARD
#define BUFFER_PIXELS DISPLAY_RESX

View File

@ -3,8 +3,6 @@
#define HSE_8MHZ
#define DISPLAY_RESX 240
#define DISPLAY_RESY 320
#define DISPLAY_COLOR_MODE DMA2D_OUTPUT_RGB565
#define DISPLAY_LEGACY_HEADER "displays/ltdc.h"

View File

@ -24,7 +24,10 @@
#define IMAGE_CHUNK_SIZE (128 * 1024)
#define IMAGE_HASH_BLAKE2S
#define DISPLAY_JUMP_BEHAVIOR DISPLAY_RESET_CONTENT
#define DISPLAY_RESX 240
#define DISPLAY_RESY 320
// SHARED WITH MAKEFILE
// common

View File

@ -4,9 +4,6 @@
#define HSE_16MHZ
#define VDD_1V8 1
#define DISPLAY_RESX 240
#define DISPLAY_RESY 240
#define DISPLAY_COLOR_MODE DMA2D_OUTPUT_ARGB8888
#define DISPLAY_LEGACY_HEADER "displays/dsi.h"

View File

@ -26,7 +26,10 @@
#define IMAGE_CHUNK_SIZE SIZE_256K
#define IMAGE_HASH_SHA256
#define DISPLAY_JUMP_BEHAVIOR DISPLAY_RESET_CONTENT
#define DISPLAY_RESX 240
#define DISPLAY_RESY 240
// SHARED WITH MAKEFILE, LINKER SCRIPT etc.
// misc

View File

@ -1,9 +1,6 @@
#ifndef BOARDS_T2B1_UNIX_H
#define BOARDS_T2B1_UNIX_H
#define DISPLAY_RESX 128
#define DISPLAY_RESY 64
#define WINDOW_WIDTH 193
#define WINDOW_HEIGHT 339
#define TOUCH_OFFSET_X 32

View File

@ -3,8 +3,6 @@
#define HSE_8MHZ
#define DISPLAY_RESX 128
#define DISPLAY_RESY 64
#define DISPLAY_LEGACY_HEADER "displays/vg-2864ksweg01.h"
#define BTN_LEFT_PIN GPIO_PIN_10

View File

@ -24,7 +24,10 @@
#define IMAGE_CHUNK_SIZE (128 * 1024)
#define IMAGE_HASH_BLAKE2S
#define DISPLAY_JUMP_BEHAVIOR DISPLAY_RETAIN_CONTENT
#define DISPLAY_RESX 128
#define DISPLAY_RESY 64
// SHARED WITH MAKEFILE
// common

View File

@ -1,9 +1,6 @@
#ifndef BOARDS_T2T1_UNIX_H
#define BOARDS_T2T1_UNIX_H
#define DISPLAY_RESX 240
#define DISPLAY_RESY 240
#define ORIENTATION_NSEW 1
#ifdef TREZOR_EMULATOR_RASPI

View File

@ -3,8 +3,6 @@
#define HSE_8MHZ
#define DISPLAY_RESX 240
#define DISPLAY_RESY 240
#define DISPLAY_COLOR_MODE DMA2D_OUTPUT_RGB565
#define DISPLAY_LEGACY_HEADER "displays/st7789v.h"

View File

@ -24,7 +24,10 @@
#define IMAGE_CHUNK_SIZE (128 * 1024)
#define IMAGE_HASH_BLAKE2S
#define DISPLAY_JUMP_BEHAVIOR DISPLAY_RETAIN_CONTENT
#define DISPLAY_RESX 240
#define DISPLAY_RESY 240
// SHARED WITH MAKEFILE
// common

View File

@ -1,9 +1,6 @@
#ifndef BOARDS_T3B1_UNIX_H
#define BOARDS_T3B1_UNIX_H
#define DISPLAY_RESX 128
#define DISPLAY_RESY 64
#define WINDOW_WIDTH 193
#define WINDOW_HEIGHT 339
#define TOUCH_OFFSET_X 32

View File

@ -1,9 +1,6 @@
#ifndef _TREZOR_T3B1_H
#define _TREZOR_T3B1_H
#define DISPLAY_RESX 128
#define DISPLAY_RESY 64
#define VDD_3V3 1
#define DISPLAY_LEGACY_HEADER "displays/vg-2864ksweg01.h"

View File

@ -25,7 +25,10 @@
#define IMAGE_CHUNK_SIZE (128 * 1024)
#define IMAGE_HASH_SHA256
#define DISPLAY_JUMP_BEHAVIOR DISPLAY_RETAIN_CONTENT
#define DISPLAY_RESX 128
#define DISPLAY_RESY 64
// SHARED WITH MAKEFILE, LINKER SCRIPT etc.
// misc

View File

@ -1,9 +1,6 @@
#ifndef BOARDS_T3T1_UNIX_H
#define BOARDS_T3T1_UNIX_H
#define DISPLAY_RESX 240
#define DISPLAY_RESY 240
#define WINDOW_WIDTH 400
#define WINDOW_HEIGHT 600
#define TOUCH_OFFSET_X 80

View File

@ -3,8 +3,6 @@
#define VDD_3V3 1
#define DISPLAY_RESX 240
#define DISPLAY_RESY 240
#define DISPLAY_LEGACY_HEADER "displays/st7789v.h"
#define DISPLAY_COLOR_MODE DMA2D_OUTPUT_RGB565
#define DISPLAY_PANEL_LX154A2482 1

View File

@ -25,7 +25,10 @@
#define IMAGE_CHUNK_SIZE (128 * 1024)
#define IMAGE_HASH_SHA256
#define DISPLAY_JUMP_BEHAVIOR DISPLAY_RETAIN_CONTENT
#define DISPLAY_RESX 240
#define DISPLAY_RESY 240
// SHARED WITH MAKEFILE, LINKER SCRIPT etc.
// misc

View File

@ -3,8 +3,6 @@
#define HSE_8MHZ
#define DISPLAY_RESX 240
#define DISPLAY_RESY 320
#define DISPLAY_COLOR_MODE DMA2D_OUTPUT_RGB565
#define DISPLAY_LEGACY_HEADER "displays/st7789v.h"
#define DISPLAY_PANEL_LHS200KB_IF21 1

View File

@ -26,8 +26,17 @@
#define IMAGE_CHUNK_SIZE (128 * 1024)
#define IMAGE_HASH_BLAKE2S
#define DISPLAY_JUMP_BEHAVIOR DISPLAY_RESET_CONTENT
#ifdef TREZOR_EMULATOR
#define DISPLAY_RESX 380
#define DISPLAY_RESY 520
#else
#define DISPLAY_RESX 240
#define DISPLAY_RESY 320
#endif
// SHARED WITH MAKEFILE
// common

View File

@ -22,6 +22,7 @@
#include "lx154a2422cpt23.h"
#include "model.h"
#include "touch.h"
void lhs200kb_if21_touch_correction(uint16_t x, uint16_t y, uint16_t *x_new,

View File

@ -21,6 +21,7 @@
#include "lx154a2422cpt23.h"
#include "model.h"
#include "touch.h"
void lx154a2422cpt23_touch_correction(uint16_t x, uint16_t y, uint16_t *x_new,

View File

@ -1,6 +1,7 @@
#include "lhs200kb-if21.h"
#include "../display_io.h"
#include "model.h"
void lhs200kb_if21_gamma(void) {
ISSUE_CMD_BYTE(0xE0);

View File

@ -20,6 +20,7 @@
#include "lx154a2422.h"
#include "../display_io.h"
#include "model.h"
void lx154a2422_gamma(void) {
// positive voltage correction

View File

@ -20,6 +20,7 @@
#include "lx154a2482.h"
#include "../display_io.h"
#include "model.h"
void lx154a2482_gamma(void) {
// positive voltage correction

View File

@ -19,6 +19,7 @@
#include "tf15411a.h"
#include "../display_io.h"
#include "model.h"
void tf15411a_init_seq(void) {
// Inter Register Enable1