1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-21 12:51:03 +00:00

feat(core): introduce USE_USB feature

[no changelog]
This commit is contained in:
cepetr 2024-12-19 12:08:57 +01:00
parent 677d62bed8
commit ffd3179554
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

@ -90,6 +90,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 += [
"USE_DMA2D",

View File

@ -78,6 +78,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

@ -96,6 +96,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

@ -69,6 +69,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

@ -106,6 +106,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 += [
"USE_DMA2D",