Hello segiulungu,
I’m more or less in the same pitfall.
As I understood from my distributor:
OpenAT v3.x cannot be used with Fastrack Supreme
OpenAT v4.x cannot be used with Fastrack M1306B
If your are using a Fastrack Supreme then you MUST use OpenAT v4.x (instead of v3,13).
I’ve check the ADL User’s Guide of both versions and the GPIO section is completely different.
// In order to set-up an automatic GPIO polling process, the adl_ioEventSubscribe()
// function has to be called before the adl_ioSubscribe().
gpioEventHandle = adl_ioEventSubscribe(GpioHandler);
if (gpioEventHandle < 0 )
{
DEBUG_TRACE((DEBUG_LEVEL_ERROR, "ERROR: adl_ioEventSubscribe() failed. gpioEventHandle=%d", gpioEventHandle));
DEBUG_PRINT_ADL_ERROR((DEBUG_LEVEL_ERROR, gpioEventHandle));
}
gpioHandle = adl_ioSubscribe(1, &gpioDefine, ADL_TMR_TYPE_100MS, 3, 0);
if (gpioHandle < 0)
{
DEBUG_TRACE((DEBUG_LEVEL_ERROR, "ERROR: adl_ioSubscribe() failed. gpioHandle=%d", gpioHandle));
DEBUG_PRINT_ADL_ERROR((DEBUG_LEVEL_ERROR, gpioHandle));
if (gpioHandle == ADL_RET_ERR_DONE)
{
DEBUG_TRACE((DEBUG_LEVEL_ERROR, "ERROR: gpioDefine & ADL_IO_GERR_MSK = 0x%x", gpioDefine & ADL_IO_GERR_MSK));
DEBUG_TRACE((DEBUG_LEVEL_ERROR, "ERROR: gpioDefine & ADL_IO_ERR_MSK = 0x%x", gpioDefine & ADL_IO_ERR_MSK));
}
}
As written above, adl_ioSubscribe() returns the error ADL_RET_ERR_PARAM always. If I remove the timer type and timer value then adl_ioSubscribe() return success. Why?
If I remove the timer type and timer value then adl_ioSubscribe() return success.
[/quote]
if you don’t use polling (set the timer type and value to 0) you don’t need a handler-function. so that succeeds.