User`s manual
RX62N Group, RX621 Group 4. Library Reference
4.2.2. Interrupt Control Unit
1) R_INTC_CreateExtInterrupt
Synopsis
Configure an external interrupt pin.
Prototype
bool R_INTC_CreateExtInterrupt(
uint8_t data1,
// Pin selection
uint32_t data2,
// Configuration
void * func
// Callback function
uint8_t data3
// Interrupt priority level
);
Description
Sets the specified external interrupt.
[data1]
Choose the interrupt pin to be configured.
PDL_INTC_IRQn (n = 0 to 15) or
PDL_INTC_NMI
IRQn (n = 0 to 15) interrupt pin or
NMI interrupt pin
[data2]
Choose the pin settings. If multiple selections are required, use "|" to separate each selection.
The default settings are shown in bold.
Options which only apply to the IRQ pins
•
Input sense selection
PDL_INTC_LOW or
PDL_INTC_FALLING or
PDL_INTC_RISING or
PDL_INTC_BOTH
Select Low level,
Falling edge,
Rising edge or
Falling and rising edge detection.
•
Alternate pin selection
PDL_INTC_A or
PDL_INTC_B
Select the IRQn-A or IRQn-B pin to be used (where applicable).
•
DMAC / DTC trigger control. Not enabled if low-level detection is selected.
PDL_INTC_DMAC_DTC_TRIGGER_DISABLE or
PDL_INTC_DMAC_TRIGGER_ENABLE or
PDL_INTC_DTC_TRIGGER_ENABLE
Disable or enable activation of the
DMAC or DTC when a valid edge
transition is detected on an IRQn pin.
Options which only apply to the NMI
•
Input sense selection
PDL_INTC_FALLING or
PDL_INTC_RISING
Falling or rising edge detection.
•
Additional detection control
PDL_INTC_LVD_DISABLE or
PDL_INTC_LVD_ENABLE
Disable or enable the NMI when a low-voltage detection
interrupt occurs.
PDL_INTC_OSD_DISABLE or
PDL_INTC_OSD_ENABLE
Disable or enable the NMI when the oscillation stop
detection interrupt occurs.
[func]
The function to be called when a valid condition is detected.
Specify PDL_NO_FUNC if no IRQn interrupt is required.
A function must be specified for the NMI pin.
[data3]
The IRQn interrupt priority level. Select between 1 (lowest priority) and 15 (highest priority).
This parameter will be ignored if PDL_NO_FUNC is specified for parameter func.
This value does not apply to the NMI pin and is ignored.
Return value
True if all parameters are valid and exclusive; otherwise false.
R20UT0084EE0112 Rev.1.12 Page 4-9
July. 16, 2014