void ets_isr_attach(int i, ets_isr_t func, void *arg);
Before 2.1.0 SDK I was able to attach GPIO interrupt with the macro
ETS_GPIO_INTR_ATTACH(func, arg)
defined in ets_sys.h in line 86
#define ETS_GPIO_INTR_ATTACH(func, arg) \
ets_isr_attach(ETS_GPIO_INUM, (func), (void *)(arg))
From SDK 2.1.0 and later the compile get an error when I use the macro ETS_GPIO_INTR_ATTACH:
user/command.c:563:2: error: passing argument 2 of 'ets_isr_attach' from incompatible pointer type [-Werror]
ETS_GPIO_INTR_ATTACH(gpio_intr_handler, &asp[out]);
.
.
.
/esp-open-sdk/sdk_2.2/include/ets_sys.h:67:6: note: expected 'ets_isr_t' but argument is of type 'void (*)(uint8 *)'
void ets_isr_attach(int i, ets_isr_t func, void *arg);
How can I fix this error?