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

TEMP - enable disc2 powerctl

This commit is contained in:
cepetr 2024-11-20 16:24:20 +01:00
parent c7a17d8174
commit 58533d2286
2 changed files with 11 additions and 1 deletions

View File

@ -54,7 +54,7 @@ static void button_setup_pin(GPIO_TypeDef *port, uint16_t pin) {
GPIO_InitTypeDef GPIO_InitStructure = {0}; GPIO_InitTypeDef GPIO_InitStructure = {0};
GPIO_InitStructure.Mode = GPIO_MODE_INPUT; GPIO_InitStructure.Mode = GPIO_MODE_INPUT;
GPIO_InitStructure.Pull = GPIO_PULLUP; GPIO_InitStructure.Pull = GPIO_PULLDOWN;
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStructure.Pin = pin; GPIO_InitStructure.Pin = pin;
HAL_GPIO_Init(port, &GPIO_InitStructure); HAL_GPIO_Init(port, &GPIO_InitStructure);

View File

@ -97,6 +97,16 @@ def configure(
"USE_RESET_TO_BOOT=1", "USE_RESET_TO_BOOT=1",
] ]
sources += [
"embed/sys/powerctl/npm1300/npm1300.c",
"embed/sys/powerctl/stwlc38/stwlc38.c",
"embed/sys/powerctl/stm32u5/powerctl.c",
"embed/sys/powerctl/stm32u5/powerctl_suspend.c",
"embed/sys/powerctl/wakeup_flags.c",
]
paths += ["embed/sys/powerctl/inc"]
defines += ["USE_POWERCTL=1"]
env.get("ENV")["LINKER_SCRIPT"] = linker_script env.get("ENV")["LINKER_SCRIPT"] = linker_script
defs = env.get("CPPDEFINES_IMPLICIT") defs = env.get("CPPDEFINES_IMPLICIT")