1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +00:00

TEMP - add power button (disc2)

This commit is contained in:
cepetr 2024-11-20 16:24:20 +01:00
parent 3b7efe7d18
commit c7a17d8174
2 changed files with 15 additions and 0 deletions

View File

@ -5,6 +5,15 @@
#define DISPLAY_COLOR_MODE DMA2D_OUTPUT_ARGB8888 #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_COUNT 2
#define I2C_INSTANCE_0 I2C5 #define I2C_INSTANCE_0 I2C5
#define I2C_INSTANCE_0_CLK_EN __HAL_RCC_I2C5_CLK_ENABLE #define I2C_INSTANCE_0_CLK_EN __HAL_RCC_I2C5_CLK_ENABLE

View File

@ -51,6 +51,12 @@ def configure(
defines += ["USE_TOUCH=1"] defines += ["USE_TOUCH=1"]
defines += ["USE_I2C=1"] defines += ["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: if "usb" in features_wanted:
sources += [ sources += [
"embed/io/usb/stm32/usb_class_hid.c", "embed/io/usb/stm32/usb_class_hid.c",