For port ADIN4/GPIO5 reading I fulfil sequence:
adl_atCmdCreate(“AT+WIOM=0,“GPIO23"”,FALSE,NULL,NULL,NULL);
adl_atCmdCreate(“AT+WIOM=1,“GPIO29”,1,1”,FALSE,NULL,NULL,NULL);
adl_atCmdCreate(“AT+WIOM=1,“GPIO23”,0”,FALSE,NULL,NULL,NULL);
adl_atCmdCreate(“AT+WIOR=“GPIO23"”,FALSE,gpio_handler,”+WIOR:”,NULL);
static bool gpio_handler(adl_atResponse_t Rsp) {
/… response …*/
return TRUE;
}
Changes of a state pin13 are defined.
How to organise these operations by means of function adl_ioSubscribe(…)?
I try:
s32 GpioHandle;
adl_ioDefs_t GpioConfig[1]={ADL_IO_GPI | 23 | ADL_IO_DIR_IN};
GpioHandle=adl_ioSubscribe(1,GpioConfig,0,0,0);
return: GpioHandle=-11;
How to form GpioConfig[xxx]={…,ADL_IO_GPIO | 29 | ADL_IO_DIR_OUT, ADL_IO_GPI | 23 | ADL_IO_DIR_IN,…}, that has earned?