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:
parent
4e74d2852b
commit
368d41902d
@ -24,6 +24,10 @@
|
||||
#include <sys/irq.h>
|
||||
#include <sys/mpu.h>
|
||||
|
||||
#ifdef USE_BACKLIGHT
|
||||
#include <io/backlight.h>
|
||||
#endif
|
||||
|
||||
#if defined(KERNEL_MODE) && defined(USE_PVD)
|
||||
|
||||
void pvd_init(void) {
|
||||
@ -52,10 +56,11 @@ void PVD_PVM_IRQHandler(void) {
|
||||
void PVD_IRQHandler(void) {
|
||||
#endif
|
||||
mpu_reconfig(MPU_MODE_DEFAULT);
|
||||
#ifdef TPS61043_TIM
|
||||
// Turn off display backlight
|
||||
TPS61043_TIM->TPS61043_TIM_CCR = 0;
|
||||
|
||||
#ifdef USE_BACKLIGHT
|
||||
backlight_set(0);
|
||||
#endif
|
||||
|
||||
error_shutdown("PVD IRQ");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user