Skip to content

Commit

Permalink
Merged in raiden00/nuttx_h7 (pull request #674)
Browse files Browse the repository at this point in the history
stm32h7: stm32_irq.c: extend irqinfo to support H7 family

Approved-by: GregoryN <gnutt@nuttx.org>
  • Loading branch information
raiden00pl authored and gregory-nutt committed Jul 11, 2018
1 parent 235d580 commit 639d75c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions arch/arm/src/stm32h7/stm32_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 639d75c

Please sign in to comment.