From 29c507decc8a1290d15833de0ea511864c3d851f Mon Sep 17 00:00:00 2001 From: cepetr Date: Thu, 19 Sep 2024 13:31:16 +0200 Subject: [PATCH] fixup! feat(core/embed): introduce non-blocking i2c drivers --- core/site_scons/models/D001/discovery.py | 3 +-- core/site_scons/models/D002/discovery2.py | 7 ++----- core/site_scons/models/T2B1/trezor_r_v10.py | 5 +---- core/site_scons/models/T2T1/trezor_t.py | 3 +-- core/site_scons/models/T3B1/trezor_t3b1_revB.py | 5 +---- core/site_scons/models/T3T1/trezor_t3t1_revE.py | 3 +-- core/site_scons/models/T3T1/trezor_t3t1_v4.py | 2 +- 7 files changed, 8 insertions(+), 20 deletions(-) diff --git a/core/site_scons/models/D001/discovery.py b/core/site_scons/models/D001/discovery.py index 4180c120afa..84592a75815 100644 --- a/core/site_scons/models/D001/discovery.py +++ b/core/site_scons/models/D001/discovery.py @@ -37,8 +37,6 @@ def configure( "embed/models/D001/model_D001_layout.c", ] - sources += ["embed/trezorhal/stm32f4/i2c_bus.c"] - if "new_rendering" in features_wanted: sources += [ "embed/trezorhal/xdisplay_legacy.c", @@ -74,6 +72,7 @@ def configure( features_available.append("display_rgb565") if "input" in features_wanted: + sources += ["embed/trezorhal/stm32f4/i2c_bus.c"] sources += ["embed/trezorhal/stm32f4/touch/stmpe811.c"] features_available.append("touch") diff --git a/core/site_scons/models/D002/discovery2.py b/core/site_scons/models/D002/discovery2.py index 0014463bb48..9a71eaa294f 100644 --- a/core/site_scons/models/D002/discovery2.py +++ b/core/site_scons/models/D002/discovery2.py @@ -44,8 +44,6 @@ def configure( "embed/models/D002/model_D002_layout.c", ] - sources += ["embed/trezorhal/stm32u5/i2c_bus.c"] - if "new_rendering" in features_wanted: sources += [ "embed/trezorhal/xdisplay_legacy.c", @@ -59,9 +57,8 @@ def configure( ] if "input" in features_wanted: - sources += [ - "embed/trezorhal/stm32u5/touch/sitronix.c", - ] + sources += ["embed/trezorhal/stm32u5/i2c_bus.c"] + sources += ["embed/trezorhal/stm32u5/touch/sitronix.c"] features_available.append("touch") # if "sd_card" in features_wanted: diff --git a/core/site_scons/models/T2B1/trezor_r_v10.py b/core/site_scons/models/T2B1/trezor_r_v10.py index 02481648d6e..1d8951e0c20 100644 --- a/core/site_scons/models/T2B1/trezor_r_v10.py +++ b/core/site_scons/models/T2B1/trezor_r_v10.py @@ -48,10 +48,6 @@ def configure( else: sources += [f"embed/trezorhal/stm32f4/displays/{display}"] - sources += [ - "embed/trezorhal/stm32f4/i2c_bus.c", - ] - if "input" in features_wanted: sources += ["embed/trezorhal/stm32f4/button.c"] features_available.append("button") @@ -81,6 +77,7 @@ def configure( if "optiga" in features_wanted: defines += ["USE_OPTIGA=1"] + sources += ["embed/trezorhal/stm32f4/i2c_bus.c"] sources += ["embed/trezorhal/stm32f4/optiga_hal.c"] sources += ["embed/trezorhal/optiga/optiga.c"] sources += ["embed/trezorhal/optiga/optiga_commands.c"] diff --git a/core/site_scons/models/T2T1/trezor_t.py b/core/site_scons/models/T2T1/trezor_t.py index 554668b7baa..d35ab5152b2 100644 --- a/core/site_scons/models/T2T1/trezor_t.py +++ b/core/site_scons/models/T2T1/trezor_t.py @@ -43,8 +43,6 @@ def configure( "embed/models/T2T1/compat_settings.c", ] - sources += ["embed/trezorhal/stm32f4/i2c_bus.c"] - if "new_rendering" in features_wanted: sources += ["embed/trezorhal/xdisplay_legacy.c"] sources += ["embed/trezorhal/stm32f4/xdisplay/st-7789/display_nofb.c"] @@ -84,6 +82,7 @@ def configure( features_available.append("backlight") if "input" in features_wanted: + sources += ["embed/trezorhal/stm32f4/i2c_bus.c"] sources += ["embed/trezorhal/stm32f4/touch/ft6x36.c"] features_available.append("touch") diff --git a/core/site_scons/models/T3B1/trezor_t3b1_revB.py b/core/site_scons/models/T3B1/trezor_t3b1_revB.py index 669b081b09b..c20b056b737 100644 --- a/core/site_scons/models/T3B1/trezor_t3b1_revB.py +++ b/core/site_scons/models/T3B1/trezor_t3b1_revB.py @@ -43,10 +43,6 @@ def configure( "embed/models/T3B1/model_T3B1_layout.c", ] - sources += [ - "embed/trezorhal/stm32u5/i2c_bus.c", - ] - if "new_rendering" in features_wanted: sources += ["embed/trezorhal/xdisplay_legacy.c"] sources += ["embed/trezorhal/stm32u5/xdisplay/vg-2864/display_driver.c"] @@ -77,6 +73,7 @@ def configure( if "optiga" in features_wanted: defines += ["USE_OPTIGA=1"] + sources += ["embed/trezorhal/stm32u5/i2c_bus.c"] sources += ["embed/trezorhal/stm32u5/optiga_hal.c"] sources += ["embed/trezorhal/optiga/optiga.c"] sources += ["embed/trezorhal/optiga/optiga_commands.c"] diff --git a/core/site_scons/models/T3T1/trezor_t3t1_revE.py b/core/site_scons/models/T3T1/trezor_t3t1_revE.py index 08528f0fc24..1195a7143bf 100644 --- a/core/site_scons/models/T3T1/trezor_t3t1_revE.py +++ b/core/site_scons/models/T3T1/trezor_t3t1_revE.py @@ -47,8 +47,6 @@ def configure( "embed/models/T3T1/model_T3T1_layout.c", ] - sources += ["embed/trezorhal/stm32u5/i2c_bus.c"] - if "new_rendering" in features_wanted: sources += ["embed/trezorhal/xdisplay_legacy.c"] sources += ["embed/trezorhal/stm32u5/xdisplay/st-7789/display_fb.c"] @@ -73,6 +71,7 @@ def configure( features_available.append("backlight") if "input" in features_wanted: + sources += ["embed/trezorhal/stm32u5/i2c_bus.c"] sources += ["embed/trezorhal/stm32u5/touch/ft6x36.c"] sources += ["embed/trezorhal/stm32u5/touch/panels/lx154a2422cpt23.c"] features_available.append("touch") diff --git a/core/site_scons/models/T3T1/trezor_t3t1_v4.py b/core/site_scons/models/T3T1/trezor_t3t1_v4.py index 31752a1e6d2..63e26c69936 100644 --- a/core/site_scons/models/T3T1/trezor_t3t1_v4.py +++ b/core/site_scons/models/T3T1/trezor_t3t1_v4.py @@ -48,7 +48,6 @@ def configure( ] sources += [ f"embed/trezorhal/stm32u5/displays/{display}", - "embed/trezorhal/stm32u5/i2c_bus.c", ] if "new_rendering" in features_wanted: @@ -76,6 +75,7 @@ def configure( features_available.append("backlight") if "input" in features_wanted: + sources += ["embed/trezorhal/stm32u5/i2c_bus.c"] sources += ["embed/trezorhal/stm32u5/touch/ft6x36.c"] features_available.append("touch")