Usage example

Count the number of falling edge.

[GUI setting example]

Interrupt

Used

INTP

Used

INTP0

Valid edge

Falling

Priority

Low

[API setting example]

r_main.c

void main(void)

{

R_MAIN_UserInit();

/* Start user code. Do not edit comment generated here */

/* Clear INTP0 interrupt flag and enable interrupt */

R_INTC0_Start();

while (1U)

{

;

}

/* End user code. Do not edit comment generated here */

}

r_cg_intc_user.c

/* Start user code for global. Do not edit comment generated here */

volatile uint8_t g_intc0_cnt = 0U;

/* End user code. Do not edit comment generated here */

static void __near r_intc0_interrupt(void)

{

/* Start user code. Do not edit comment generated here */

/* Count INTP0 */

g_intc0_cnt++;

/* End user code. Do not edit comment generated here */

}