与外设通信,PIO中断是必不可少的,比如,为了与ENC28J60高效沟通,必须能捕捉到ENC28J60发出的中断信号。
NoisII的PIO模块提供两种中断方式,参考Embedded Peripherals IP User Guide中的PIO核一节
Interrupt
Turn on Generate IRQ to assert an IRQ output when a specified event occurs on input
ports. The user must further specify the cause of an IRQ event:
■ Level— The core generates an IRQ whenever a specific input is high and
interrupts are enabled for that input in the interruptmaskregister.
■ Edge— The core generates an IRQ whenever a specific bit in the edge capture
register is high and interrupts are enabled for that bit in the interruptmask
register.
When Generate IRQis off, the interruptmask register does not exist