I cannot seem to call adl_irqSubscribe without getting an error message back. I wonder if anyone else use this can see why. Here is how I call it:
s32 gLowLevIrqHandle;
gLowLevIrqHandle = adl_irqSubscribe ( Interrupt_Handler, ADL_IRQ_NOTIFY_LOW_LEVEL, ADL_IRQ_PRIORITY_HIGH_LEVEL, ADL_IRQ_OPTION_AUTO_READ );
This returns -5 (ADL_RET_ERR_NOT_SUBSCRIBED)
I’ve tried several other ways of calling this including the method below, but it it aways fails with the same error message:
s32 gLowLevIrqHandle;
adl_irqCapabilities_t Caps;
adl_irqGetCapabilities ( &Caps ); // Get capabilities
// Set configuration
Config.PriorityLevel = Caps.PriorityLevelsCount - 1; // Highest priority
Config.Enable = TRUE; // Interrupt handler enabled
Config.Options = ADL_IRQ_OPTION_AUTO_READ; // Auto-read option set
gLowLevIrqHandle = adl_irqSubscribe(Interrupt_Handler, ADL_IRQ_NOTIFY_HIGH_LEVEL, &Config);