diff options
author | Inès Varhol <ines.varhol@telecom-paris.fr> | 2024-07-07 10:58:54 +0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2024-07-11 11:41:34 +0100 |
commit | bc080002cea5893fcbb0e651f6482f27a19356fb (patch) | |
tree | 4daca05cad7169682cc29884320e72b3b3fd9cf4 | |
parent | 27d405301a676beffea4c13f5108c344fa6b8165 (diff) | |
download | qemu-bc080002cea5893fcbb0e651f6482f27a19356fb.zip qemu-bc080002cea5893fcbb0e651f6482f27a19356fb.tar.gz qemu-bc080002cea5893fcbb0e651f6482f27a19356fb.tar.bz2 |
hw/misc: In STM32L4x5 EXTI, handle direct interrupts
The previous implementation for EXTI interrupts only handled
"configurable" interrupts, like those originating from STM32L4x5 SYSCFG
(the only device currently connected to the EXTI up until now).
In order to connect STM32L4x5 USART to the EXTI, this commit adds
handling for direct interrupts (interrupts without configurable edge).
Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr>
Message-id: 20240707085927.122867-3-ines.varhol@telecom-paris.fr
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/misc/stm32l4x5_exti.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/misc/stm32l4x5_exti.c b/hw/misc/stm32l4x5_exti.c index b9a69a6..e281841 100644 --- a/hw/misc/stm32l4x5_exti.c +++ b/hw/misc/stm32l4x5_exti.c @@ -113,6 +113,13 @@ static void stm32l4x5_exti_set_irq(void *opaque, int irq, int level) return; } + /* In case of a direct line interrupt */ + if (extract32(exti_romask[bank], irq, 1)) { + qemu_set_irq(s->irq[oirq], level); + return; + } + + /* In case of a configurable interrupt */ if ((level && extract32(s->rtsr[bank], irq, 1)) || (!level && extract32(s->ftsr[bank], irq, 1))) { |