mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-04 13:52:35 +00:00
WIP - fixes after rebase
This commit is contained in:
parent
fa80bbe10c
commit
d5db9229fd
@ -583,7 +583,6 @@ if FROZEN:
|
|||||||
exclude=[
|
exclude=[
|
||||||
SOURCE_PY_DIR + 'apps/homescreen/tt.py',
|
SOURCE_PY_DIR + 'apps/homescreen/tt.py',
|
||||||
SOURCE_PY_DIR + 'apps/homescreen/tr.py',
|
SOURCE_PY_DIR + 'apps/homescreen/tr.py',
|
||||||
SOURCE_PY_DIR + 'apps/homescreen/t1.py',
|
|
||||||
]
|
]
|
||||||
))
|
))
|
||||||
if TREZOR_MODEL in ('T',):
|
if TREZOR_MODEL in ('T',):
|
||||||
|
@ -22,13 +22,6 @@
|
|||||||
#include "fonts/fonts.h"
|
#include "fonts/fonts.h"
|
||||||
#include "memzero.h"
|
#include "memzero.h"
|
||||||
|
|
||||||
#if USE_DMA2D
|
|
||||||
#if defined BOOTLOADER
|
|
||||||
#define BUFFER_SECTION __attribute__((section(".buf")))
|
|
||||||
#else
|
|
||||||
#define BUFFER_SECTION
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define BUFFERS_16BPP 3
|
#define BUFFERS_16BPP 3
|
||||||
#define BUFFERS_4BPP 3
|
#define BUFFERS_4BPP 3
|
||||||
#define BUFFERS_TEXT 1
|
#define BUFFERS_TEXT 1
|
||||||
@ -108,5 +101,3 @@ buffer_blurring_t* buffers_get_blurring_buffer(uint16_t idx, bool clear) {
|
|||||||
}
|
}
|
||||||
return &blurring_buffers[idx];
|
return &blurring_buffers[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -55,10 +55,6 @@
|
|||||||
#define NODMA_BUFFER_SECTION __attribute__((section(".no_dma_buffers")))
|
#define NODMA_BUFFER_SECTION __attribute__((section(".no_dma_buffers")))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LINE_BUFFER_16BPP_SIZE (BUFFER_PIXELS * 2)
|
|
||||||
#define LINE_BUFFER_4BPP_SIZE (BUFFER_PIXELS / 2)
|
|
||||||
#define TEXT_BUFFER_SIZE ((BUFFER_PIXELS * TEXT_BUFFER_HEIGHT) / 2)
|
|
||||||
|
|
||||||
typedef __attribute__((aligned(4))) struct {
|
typedef __attribute__((aligned(4))) struct {
|
||||||
uint8_t buffer[LINE_BUFFER_16BPP_SIZE];
|
uint8_t buffer[LINE_BUFFER_16BPP_SIZE];
|
||||||
} line_buffer_16bpp_t;
|
} line_buffer_16bpp_t;
|
||||||
|
@ -457,6 +457,20 @@ async def confirm_path_warning(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
async def confirm_homescreen(
|
||||||
|
ctx: GenericContext,
|
||||||
|
image: bytes,
|
||||||
|
) -> None:
|
||||||
|
# TODO: show homescreen preview?
|
||||||
|
await confirm_action(
|
||||||
|
ctx,
|
||||||
|
"set_homescreen",
|
||||||
|
"Set homescreen",
|
||||||
|
description="Do you really want to set new homescreen image?",
|
||||||
|
br_code=ButtonRequestType.ProtectCall,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def _show_xpub(xpub: str, title: str, cancel: str | None) -> ui.Layout:
|
def _show_xpub(xpub: str, title: str, cancel: str | None) -> ui.Layout:
|
||||||
return RustLayout(
|
return RustLayout(
|
||||||
trezorui2.confirm_blob(
|
trezorui2.confirm_blob(
|
||||||
|
@ -131,6 +131,7 @@ def test_apply_settings_passphrase_on_device(client: Client):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip_t1
|
@pytest.mark.skip_t1
|
||||||
|
@pytest.mark.skip_tr
|
||||||
def test_apply_homescreen_toif(client: Client):
|
def test_apply_homescreen_toif(client: Client):
|
||||||
img = b"TOIf\x90\x00\x90\x00~\x00\x00\x00\xed\xd2\xcb\r\x83@\x10D\xc1^.\xde#!\xac31\x99\x10\x8aC%\x14~\x16\x92Y9\x02WI3\x01<\xf5cI2d\x1es(\xe1[\xdbn\xba\xca\xe8s7\xa4\xd5\xd4\xb3\x13\xbdw\xf6:\xf3\xd1\xe7%\xc7]\xdd_\xb3\x9e\x9f\x9e\x9fN\xed\xaaE\xef\xdc\xcf$D\xa7\xa4X\r\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0OV"
|
img = b"TOIf\x90\x00\x90\x00~\x00\x00\x00\xed\xd2\xcb\r\x83@\x10D\xc1^.\xde#!\xac31\x99\x10\x8aC%\x14~\x16\x92Y9\x02WI3\x01<\xf5cI2d\x1es(\xe1[\xdbn\xba\xca\xe8s7\xa4\xd5\xd4\xb3\x13\xbdw\xf6:\xf3\xd1\xe7%\xc7]\xdd_\xb3\x9e\x9f\x9e\x9fN\xed\xaaE\xef\xdc\xcf$D\xa7\xa4X\r\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0OV"
|
||||||
|
|
||||||
@ -140,6 +141,7 @@ def test_apply_homescreen_toif(client: Client):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip_t1
|
@pytest.mark.skip_t1
|
||||||
|
@pytest.mark.skip_tr
|
||||||
def test_apply_homescreen_jpeg(client: Client):
|
def test_apply_homescreen_jpeg(client: Client):
|
||||||
img = (
|
img = (
|
||||||
b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x01,\x01,"
|
b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x01,\x01,"
|
||||||
@ -189,6 +191,7 @@ def test_apply_homescreen_jpeg(client: Client):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip_t1
|
@pytest.mark.skip_t1
|
||||||
|
@pytest.mark.skip_tr
|
||||||
def test_apply_homescreen_jpeg_progressive(client: Client):
|
def test_apply_homescreen_jpeg_progressive(client: Client):
|
||||||
img = (
|
img = (
|
||||||
b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x01,\x01,"
|
b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x01,\x01,"
|
||||||
@ -245,6 +248,7 @@ def test_apply_homescreen_jpeg_progressive(client: Client):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip_t1
|
@pytest.mark.skip_t1
|
||||||
|
@pytest.mark.skip_tr
|
||||||
def test_apply_homescreen_jpeg_wrong_size(client: Client):
|
def test_apply_homescreen_jpeg_wrong_size(client: Client):
|
||||||
img = (
|
img = (
|
||||||
b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x01,\x01,"
|
b"\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x01,\x01,"
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user