1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-05 21:10:57 +00:00

TEMP - add power button (disc2)

This commit is contained in:
cepetr 2024-11-25 09:10:29 +01:00
parent 4d01e15ace
commit 9e53a649ed
2 changed files with 15 additions and 0 deletions

View File

@ -5,6 +5,15 @@
#define DISPLAY_COLOR_MODE DMA2D_OUTPUT_ARGB8888
#define BTN_POWER_PIN GPIO_PIN_13
#define BTN_POWER_PORT GPIOC
#define BTN_POWER_CLK_ENA __HAL_RCC_GPIOC_CLK_ENABLE
#define BTN_EXTI_INTERRUPT_GPIOSEL EXTI_GPIOC
#define BTN_EXTI_INTERRUPT_LINE EXTI_LINE_13
#define BTN_EXTI_INTERRUPT_PIN GPIO_PIN_13
#define BTN_EXTI_INTERRUPT_NUM EXTI13_IRQn
#define BTN_EXTI_INTERRUPT_HANDLER EXTI13_IRQHandler
#define I2C_COUNT 2
#define I2C_INSTANCE_0 I2C5
#define I2C_INSTANCE_0_CLK_EN __HAL_RCC_I2C5_CLK_ENABLE

View File

@ -56,6 +56,12 @@ def configure(
("USE_I2C", "1"),
]
sources += ["embed/io/button/stm32/button.c"]
paths += ["embed/io/button/inc"]
features_available.append("button")
defines += ["USE_BUTTON=1"]
if "usb" in features_wanted:
sources += [
"embed/io/usb/stm32/usb_class_hid.c",