Using S1 (PA18), I added the code below so that the LED output is inverted every time S1 is input.
---------------------------------------------------------------------------------------------------------------------------------------------
void GROUP1_IRQHandler(void)
{
switch (DL_Interrupt_getPendingGroup(DL_INTERRUPT_GROUP_1)) {
case GPIO_MULTIPLE_GPIOA_INT_IIDX:
switch (DL_GPIO_getPendingInterrupt(GPIO_SWITCHES_PORT)) {
case GPIO_SWITCHES_USER_SWITCH_1_IIDX:
/* If SW is high, turn the LED off */
if (DL_GPIO_readPins(
GPIO_SWITCHES_PORT, GPIO_SWITCHES_USER_SWITCH_1_PIN )) {
DL_GPIO_setPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN);
}
/* Otherwise, turn the LED on */
else {
DL_GPIO_clearPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN);
}
case GPIO_GRP_0_PIN_0_IIDX:
if (DL_GPIO_readPins(
GPIO_SWITCHES_PORT, GPIO_GRP_0_PIN_0_PIN )) {
DL_GPIO_togglePins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN);
}
break;
}
}
}
---------------------------------------------------------------------------------------------------------------------------------------------
It worked, but the following warning occurred.
「warning: 30 enumeration values not handled in switch: 'DL_GPIO_IIDX_DIO0', 'DL_GPIO_IIDX_DIO1', 'DL_GPIO_IIDX_DIO2'... [-Wswitch]」
What does this mean and how can I deal with it?