User`s manual

RX62N Group, RX621 Group 4. Library Reference
6) R_INTC_GetExtInterruptStatus
Synopsis
Read the external interrupt status.
Prototype
bool R_INTC_GetExtInterruptStatus(
uint8_t data1,
// Pin selection
uint8_t * data2
// A pointer to the buffer where the status data shall be stored.
);
Description
Acquire the status for the specified external interrupt.
[data1]
Choose the interrupt pin to be checked.
PDL_INTC_IRQn (n = 0 to 15) or
PDL_INTC_NMI
IRQn (n = 0 to 15) interrupt pin or
NMI interrupt pin
[data2]
The status flags shall be stored in the following format:
For an IRQ pin:
b7 b4
b3 b2
b1
b0
0
Input detection condition
Pin level
Input detection status
00b: Low level
01b: Falling edge
10b: Rising edge
11b: Both edges
0: Low
1: High
0: Not detected
1: Detected
For the NMI pin:
b7 b4
b3
b2
b1
b0
0
Oscillation stop
interrupt request
Low voltage
interrupt request
Input detection
condition
Input detection
status
0: Not detected
1: Detected
0: Not detected
1: Detected
0: Falling edge
1: Rising edge
0: Not detected
1: Detected
Return value
True if all parameters are valid and exclusive; otherwise false.
Category
Interrupt control
Reference
None.
Remarks
I/O port register PF8IRQ or PF9IRQ is checked to determine which pin is used for IRQn.
If this function is called from within a callback function, the input detection status will be 0.
Program example
/* RPDL definitions */
#include "r_pdl_intc.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func( void )
{
uint8_t irq_status;
/* Read the IR flag and pin state for IRQ5 */
R_INTC_GetExtInterruptStatus(
PDL_INTC_IRQ5,
&irq_status
);
}
R20UT0084EE0112 Rev.1.12 Page 4-19
July. 16, 2014