adl_ioDefs_t MyGpioConfig1[2] =
{
ADL_IO_GPIO | 9 | ADL_IO_DIR_OUT,
ADL_IO_GPIO | 10 | ADL_IO_DIR_OUT,
// ADL_IO_GPIO | 20 | ADL_IO_DIR_IN
};
MyGpioHandle1 = adl_ioSubscribe(2, MyGpioConfig1, 0, 0, 0);
Above is the code I use to subscribe to the gpio service. When I only use GPIO 9 and 10 (SL6087) I can perform an adl_ioWriteSingle function call.
However when I add the third line with GPIO 20 (Also adjusting the array size and the first parameter of the adl_ioSubscribe call) then open AT throws an exception when the execution reaches the same adl_ioWriteSingle call.
R7.45.0 is the firmware I’m using.
Can anyone tell me what the problem could be? Much appreciated
EDIT: I’m figuring out the return value of the subscribe function
EDIT: adl_ioSubscribe returns 11. That’s odd, it is not ADL_RET_ERR_ALREADY_SUBSCRIBED, ADL_RET_ERR_FATAL or ADL_RET_ERR_PARAM.
EDIT: 11 matches ADL_RET_ERR_DONE (found in adl_gpio.h)
EDIT: From adl_gpio.h:
<b>#ADL_RET_ERR_DONE</b> refers to the field #adl_ioError_e for more informations.
I don’t know what field this is about, but it might be a clue?
EDIT: The adl_ioError_e refers to the 3 MSB bits of the elements of the adl_ioDefs_t array.
EDIT: the adl_ioError field is GPIO20 is ADL_IO_ERR, for GPIO10 it is ADL_IO_ERR_USED (Weird because this is the only adl_ioSubscribe call)