Skip to content

Commit

Permalink
fixup! feat(core/embed): introduce non-blocking i2c drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
cepetr committed Sep 19, 2024
1 parent 65a3a66 commit 29c507d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 20 deletions.
3 changes: 1 addition & 2 deletions core/site_scons/models/D001/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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")

Expand Down
7 changes: 2 additions & 5 deletions core/site_scons/models/D002/discovery2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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:
Expand Down
5 changes: 1 addition & 4 deletions core/site_scons/models/T2B1/trezor_r_v10.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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"]
Expand Down
3 changes: 1 addition & 2 deletions core/site_scons/models/T2T1/trezor_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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")

Expand Down
5 changes: 1 addition & 4 deletions core/site_scons/models/T3B1/trezor_t3b1_revB.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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"]
Expand Down
3 changes: 1 addition & 2 deletions core/site_scons/models/T3T1/trezor_t3t1_revE.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion core/site_scons/models/T3T1/trezor_t3t1_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 29c507d

Please sign in to comment.