Visible to Intel only — GUID: mwh1416946887300
Ixiasoft
Visible to Intel only — GUID: mwh1416946887300
Ixiasoft
8.2.1.5. Supporting Multiple Interrupt APIs
- Write it to support the enhanced HAL interrupt API—Write the driver this way if you intend to use it only in combination with other drivers supporting the enhanced API.
- Write it to support both the enhanced and the legacy API—Write the driver this way if you need to use it in combination with legacy drivers supporting only the legacy API.
When the SBT selects the interrupt API, it defines one of the following symbols in system.h, to identify which interrupt API is available:
- ALT_ENHANCED_INTERRUPT_API_PRESENT—Defined if the enhanced API is implemented
- ALT_LEGACY_INTERRUPT_API_PRESENT—Defined if the legacy API is implemented
In your driver code, use these symbols to determine which API calls to make.
To support both APIs, your driver must publish its interrupt API support by way of a software property. In your driver’s <driver name>_sw.tcl file, use the set_sw_property command to set supported_interrupt_apis to both legacy_interrupt_api and enhanced_interrupt_api.
For more information about the set_sw_property command, refer to the “Software Build Tools Tcl Commands” section of the "Nios II Software Build Tools Reference" section.