Chat freely about anything...

User avatar
By kapooo
#75608 From SDK 2.1.0 the function ets_isr_t is defined in ets_sys.h line 67
Code: Select allvoid 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
Code: Select allETS_GPIO_INTR_ATTACH(func, arg)

defined in ets_sys.h in line 86
Code: Select all#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:
Code: Select alluser/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?