[N9H30] Fix IRQ trap issues.

1. Fix mismatch IRQ trap issue.
2. Use cond-wait in ge2d driver.
This commit is contained in:
Wayne Lin 2021-08-03 09:07:09 +08:00
parent a4818ad3dd
commit 37f5236dfa
2 changed files with 15 additions and 11 deletions

View File

@ -12,7 +12,7 @@
#include <drv_sys.h>
//#define DEBUG
//#define DEF_COND_WAIT 1
#define DEF_COND_WAIT 1
static unsigned int GFX_BPP;
static unsigned int GFX_WIDTH;

View File

@ -48,19 +48,23 @@ void rt_interrupt_dispatch(rt_uint32_t fiq_irq)
/* Get irq number */
_mIPER = (inpw(REG_AIC_IPER) >> 2) & 0x3f;
_mISNR = inpw(REG_AIC_ISNR) & 0x3f;
if ((_mIPER != _mISNR) || _mISNR == 0)
return;
/* Get interrupt service routine */
isr_func = irq_desc[_mISNR].handler;
param = irq_desc[_mISNR].param;
if (_mISNR != 0)
{
if (_mIPER == _mISNR)
{
/* Get interrupt service routine */
isr_func = irq_desc[_mISNR].handler;
param = irq_desc[_mISNR].param;
#ifdef RT_USING_INTERRUPT_INFO
irq_desc[_mISNR].counter ++;
#endif
#ifdef RT_USING_INTERRUPT_INFO
irq_desc[_mISNR].counter ++;
#endif
/* Turn to interrupt service routine */
isr_func(_mISNR, param);
/* Turn to interrupt service routine */
isr_func(_mISNR, param);
}
}
/* Handled the ISR. */
outpw(REG_AIC_EOSCR, 1);