Set the flag for 8 keys which the falling edge is detected.
[GUI setting example]
Interrupt |
Used | |||
KEY |
Used | |||
KR0 |
Used | |||
KR1 |
Used | |||
KR2 |
Used | |||
KR3 |
Used | |||
KR4 |
Used | |||
KR5 |
Used | |||
KR6 |
Used | |||
KR7 |
Used | |||
Priority |
High |
[API setting example]
r_main.c
void main(void)
{
R_MAIN_UserInit();
/* Start user code. Do not edit comment generated here */
/* Clear INTKR interrupt flag and enable interrupt */
R_KEY_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_key_fix = 0x00U;
/* End user code. Do not edit comment generated here */
static void __near r_key_interrupt(void)
{
/* Start user code. Do not edit comment generated here */
g_key_fix = ~P7;
/* End user code. Do not edit comment generated here */
}