1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-04 03:40:58 +00:00

refactor(core): cleaner backlight switch-off in PVD IRQ

[no changelog]
This commit is contained in:
tychovrahe 2025-01-29 16:13:08 +01:00 committed by TychoVrahe
parent 4e74d2852b
commit 368d41902d

View File

@ -24,6 +24,10 @@
#include <sys/irq.h> #include <sys/irq.h>
#include <sys/mpu.h> #include <sys/mpu.h>
#ifdef USE_BACKLIGHT
#include <io/backlight.h>
#endif
#if defined(KERNEL_MODE) && defined(USE_PVD) #if defined(KERNEL_MODE) && defined(USE_PVD)
void pvd_init(void) { void pvd_init(void) {
@ -52,10 +56,11 @@ void PVD_PVM_IRQHandler(void) {
void PVD_IRQHandler(void) { void PVD_IRQHandler(void) {
#endif #endif
mpu_reconfig(MPU_MODE_DEFAULT); mpu_reconfig(MPU_MODE_DEFAULT);
#ifdef TPS61043_TIM
// Turn off display backlight #ifdef USE_BACKLIGHT
TPS61043_TIM->TPS61043_TIM_CCR = 0; backlight_set(0);
#endif #endif
error_shutdown("PVD IRQ"); error_shutdown("PVD IRQ");
} }