Merged in raiden00/nuttx_h7 (pull request #674)

stm32h7: stm32_irq.c: extend irqinfo to support H7 family

Approved-by: GregoryN <gnutt@nuttx.org>
This commit is contained in:
Mateusz Szafoni 2018-07-11 19:13:55 +00:00 committed by GregoryN
parent 235d580984
commit 639d75ca3a

View File

@ -334,6 +334,33 @@ static int stm32_irqinfo(int irq, uintptr_t *regaddr, uint32_t *bit,
*bit = 1 << (extint - 96);
}
else
#elif STM32_IRQ_NEXTINTS <= 160
if (extint < 32)
{
*regaddr = (NVIC_IRQ0_31_ENABLE + offset);
*bit = 1 << extint;
}
else if (extint < 64)
{
*regaddr = (NVIC_IRQ32_63_ENABLE + offset);
*bit = 1 << (extint - 32);
}
else if (extint < 96)
{
*regaddr = (NVIC_IRQ64_95_ENABLE + offset);
*bit = 1 << (extint - 64);
}
else if (extint < 128)
{
*regaddr = (NVIC_IRQ96_127_ENABLE + offset);
*bit = 1 << (extint - 96);
}
else if (extint < STM32_IRQ_NEXTINTS)
{
*regaddr = (NVIC_IRQ128_159_ENABLE + offset);
*bit = 1 << (extint - 128);
}
else
#else
# warning Missing logic
#endif