mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 22:05:21 +00:00
More PIC32 nested interrupt work-around
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4102 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
fe49443cc3
commit
d01965fd90
1 changed files with 12 additions and 1 deletions
|
|
@ -85,7 +85,9 @@
|
|||
|
||||
uint32_t *pic32mx_decodeirq(uint32_t *regs)
|
||||
{
|
||||
#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS
|
||||
uint32_t *savestate;
|
||||
#endif
|
||||
uint32_t regval;
|
||||
int irq;
|
||||
|
||||
|
|
@ -100,7 +102,11 @@ uint32_t *pic32mx_decodeirq(uint32_t *regs)
|
|||
* the interrupted context that is being processed now.
|
||||
*/
|
||||
|
||||
savestate = (uint32_t*)current_regs;
|
||||
#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS
|
||||
savestate = (uint32_t*)current_regs;
|
||||
#else
|
||||
DEBUGASSERT(current_regs == NULL);
|
||||
#endif
|
||||
current_regs = regs;
|
||||
|
||||
/* Loop while there are pending interrupts with priority greater than zero */
|
||||
|
|
@ -145,11 +151,16 @@ uint32_t *pic32mx_decodeirq(uint32_t *regs)
|
|||
* are returning from a nested interrupt.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS
|
||||
current_regs = savestate;
|
||||
if (current_regs == NULL)
|
||||
{
|
||||
up_ledoff(LED_INIRQ);
|
||||
}
|
||||
#else
|
||||
current_regs = savestate;
|
||||
up_ledoff(LED_INIRQ);
|
||||
#endif
|
||||
|
||||
return regs;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue