mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-16 17:42:02 +00:00
fix(core): fix incorrect detection of exception/handler mode
[no changelog]
This commit is contained in:
parent
a1d9975507
commit
e01fda59a9
@ -61,7 +61,8 @@ extern display_driver_t g_display_driver;
|
||||
|
||||
static inline uint32_t is_mode_exception(void) {
|
||||
uint32_t isr_number = __get_IPSR() & IPSR_ISR_Msk;
|
||||
return (isr_number > 0) && (isr_number << 11);
|
||||
// Check if the ISR number is not 0 (thread mode) or 11 (SVCall)
|
||||
return (isr_number != 0) && (isr_number != 11);
|
||||
}
|
||||
|
||||
#endif // TREZORHAL_DISPLAY_INTERNAL_H
|
||||
|
Loading…
Reference in New Issue
Block a user