
Rev.1.00 May 22 2012
REJ09B0566
Library Reference
4.2.2 33BInterrupt Control Unit R_INTC_CreateExtInterrupt
4.2.2. Interrupt Control Unit
1) R_INTC_CreateExtInterrupt
Synopsis
Configure an external interrupt pin.
Prototype bool R_INTC_CreateExtInterrupt(
uint8_t data1, // Interrupt selection
uint16_t data2, // Configuration
uint8_t data3, // Interrupt priority level
void * func
// Callback function
);
Description
Sets the specified external interrupt.
[data1]
Choose the interrupt pin to be configured.
PDL_INTC_IRQ0 External interrupt 0
PDL_INTC_IRQ1 External interrupt 1
PDL_INTC_IRQ2 External interrupt 2
PDL_INTC_IRQ3 External interrupt 3
PDL_INTC_IRQ4 External interrupt 4
PDL_INTC_IRQ5 External interrupt 5
PDL_INTC_IRQ6 External interrupt 6
PDL_INTC_IRQ7 External interrupt 7
PDL_INTC_PINT0 External interrupt Pin 0
PDL_INTC_PINT1 External interrupt Pin 1
PDL_INTC_PINT2 External interrupt Pin 2
PDL_INTC_PINT3 External interrupt Pin 3
PDL_INTC_PINT4 External interrupt Pin 4
PDL_INTC_PINT5 External interrupt Pin 5
PDL_INTC_PINT6 External interrupt Pin 6
PDL_INTC_PINT7 External interrupt Pin 7
PDL_INTC_NMI NMI Interrupt
PDL_INTC_GEN_ILL_INSTRUCTION General illegal instruction
PDL_INTC_SLOT_ILL_INSTRUCTION Slot illegal instruction
PDL_INTC_CPU_ADDR_ERR CPU Address Error
PDL_INTC_DMA_ADDR_ERR DMA Address Error
PDL_INTC_FPU FPU Error
PDL_INTC_BANK_OVERFLOW BANK Overflow Error
PDL_INTC_BANK_UNDERFLOW BANK Underflow Error
PDL_INTC_DIV_BY_ZERO Divide by Zero Error
PDL_INTC_DIV_OVERFLOW Divide Overflow Error
[data2]
Choose the pin settings. If multiple selections are required, use “|” to separate each selection.
The default settings are shown in bold.
• Detection sense selection (for the IRQ pins)
PDL_INTC_IRQ_LOW or
PDL_INTC_IRQ_FALLING or
PDL_INTC_IRQ_RISING or
PDL_INTC_IRQ_BOTH
Select Low level,
Falling edge,
Rising edge or
Falling and rising edge detection.
• Detection sense selection (for the PINT pin)
PDL_INTC_PINT_LOW
PDL_INTC_PINT_HIGH
Select between PINT Low and High Level Selection.
• Detection sense selection (for the NMI pin)
PDL_INTC_IRQ_FALLING or
PDL_INTC_IRQ_RISING
Falling or rising edge detection.
• Alternate pin selection (for the IRQ pins)
PDL_INTC_A or
PDL_INTC_B
Select the IRQn-A or IRQn-B pin to be used.
Kommentare zu diesen Handbüchern