diff --git a/core/embed/models/D002/boards/stm32u5g9j-dk.h b/core/embed/models/D002/boards/stm32u5g9j-dk.h index 26587d162d..a7e5befced 100644 --- a/core/embed/models/D002/boards/stm32u5g9j-dk.h +++ b/core/embed/models/D002/boards/stm32u5g9j-dk.h @@ -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 diff --git a/core/site_scons/models/D002/discovery2.py b/core/site_scons/models/D002/discovery2.py index 4b953742e3..0bd1aa3d12 100644 --- a/core/site_scons/models/D002/discovery2.py +++ b/core/site_scons/models/D002/discovery2.py @@ -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",