1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-04-13 05:45:42 +00:00

feat(core): introduce USE_USB feature

[no changelog]
This commit is contained in:
cepetr 2025-01-13 19:08:16 +01:00 committed by cepetr
parent 27e37de695
commit 4fda1c4dfb
8 changed files with 11 additions and 0 deletions

View File

@ -54,7 +54,9 @@ void powerctl_suspend(void) {
// Deinitialize all drivers that are not required in low-power mode
// (e.g., USB, display, touch, haptic, etc.).
#ifdef USE_USB
usb_stop();
#endif
#ifdef USE_HAPTIC
haptic_deinit();
#endif
@ -118,7 +120,9 @@ void powerctl_suspend(void) {
#ifdef USE_HAPTIC
haptic_init();
#endif
#ifdef USE_USB
usb_start();
#endif
}
#endif // KERNEL_MODE

View File

@ -94,6 +94,7 @@ def configure(
]
features_available.append("usb")
paths += ["embed/io/usb/inc"]
defines += [("USE_USB", "1")]
defines += [("USE_PVD", "1")]

View File

@ -73,6 +73,7 @@ def configure(
]
features_available.append("usb")
paths += ["embed/io/usb/inc"]
defines += [("USE_USB", "1")]
defines += [
"FRAMEBUFFER",

View File

@ -82,6 +82,7 @@ def configure(
]
features_available.append("usb")
paths += ["embed/io/usb/inc"]
defines += [("USE_USB", "1")]
if "optiga" in features_wanted:
sources += ["embed/io/i2c_bus/stm32f4/i2c_bus.c"]

View File

@ -100,6 +100,7 @@ def configure(
]
features_available.append("usb")
paths += ["embed/io/usb/inc"]
defines += [("USE_USB", "1")]
if "dma2d" in features_wanted:
defines += ["USE_DMA2D"]

View File

@ -73,6 +73,7 @@ def configure(
]
features_available.append("usb")
paths += ["embed/io/usb/inc"]
defines += [("USE_USB", "1")]
if "optiga" in features_wanted:
sources += ["embed/io/i2c_bus/stm32u5/i2c_bus.c"]

View File

@ -110,6 +110,7 @@ def configure(
]
features_available.append("usb")
paths += ["embed/io/usb/inc"]
defines += [("USE_USB", "1")]
if "dma2d" in features_wanted:
defines += [("USE_DMA2D", "1")]

View File

@ -130,6 +130,7 @@ def configure(
]
features_available.append("usb")
paths += ["embed/io/usb/inc"]
defines += [("USE_USB", "1")]
defines += [
"FRAMEBUFFER",