From 10687e8fa00674e04f4a2d87fa7a7ca775bdf846 Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Thu, 14 Nov 2024 12:53:29 +0100 Subject: [PATCH] feat(core): add power button to T3W1 board rev A [no changelog] --- core/embed/models/T3W1/boards/trezor_t3w1_revA.h | 4 ++++ core/site_scons/models/T3W1/trezor_t3w1_revA.py | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/embed/models/T3W1/boards/trezor_t3w1_revA.h b/core/embed/models/T3W1/boards/trezor_t3w1_revA.h index f34f248aca..112258598c 100644 --- a/core/embed/models/T3W1/boards/trezor_t3w1_revA.h +++ b/core/embed/models/T3W1/boards/trezor_t3w1_revA.h @@ -4,6 +4,10 @@ #define HSE_32MHZ #define VDD_1V8 1 +#define BTN_POWER_PIN GPIO_PIN_5 +#define BTN_POWER_PORT GPIOE +#define BTN_POWER_CLK_ENA __HAL_RCC_GPIOE_CLK_ENABLE + #define DISPLAY_COLOR_MODE DMA2D_OUTPUT_RGB565 #define BACKLIGHT_PWM_FREQ 1000 diff --git a/core/site_scons/models/T3W1/trezor_t3w1_revA.py b/core/site_scons/models/T3W1/trezor_t3w1_revA.py index 012984fc08..c47e3b5662 100644 --- a/core/site_scons/models/T3W1/trezor_t3w1_revA.py +++ b/core/site_scons/models/T3W1/trezor_t3w1_revA.py @@ -50,12 +50,12 @@ def configure( paths += ["embed/io/i2c_bus/inc"] paths += ["embed/io/touch/inc"] features_available.append("touch") - # sources += ["embed/io/button/stm32/button.c"] - # paths += ["embed/io/button/inc"] - # features_available.append("button") + sources += ["embed/io/button/stm32/button.c"] + paths += ["embed/io/button/inc"] + features_available.append("button") defines += ["USE_TOUCH=1"] defines += ["USE_I2C=1"] - # defines += ["USE_BUTTON=1"] + defines += ["USE_BUTTON=1"] # if "ble" in features_wanted: # sources += ["embed/trezorhal/stm32f4/ble/ble_hal.c"]