Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

9.2.1.3. Using the Enhanced HAL Interrupt API to Implement ISRs

Using the enhanced HAL API to implement ISRs requires that you perform the following steps:
  1. Write your ISR that handles hardware interrupts for a specific device.
  2. Ensure that your program registers the ISR with the HAL by calling the alt_ic_isr_register() function. alt_ic_isr_register() enables hardware interrupts for you.

The SBT inserts the following symbol definitions in system.h, indicating the configuration of the processor’s interrupt-related hardware options:

  • NIOS2_EIC_PRESENT—If defined, indicates that one or more EICs are present
  • NIOS2_NUM_OF_SHADOW_REG_SETS—Indicates how many shadow register sets are present. The maximum value is 63. If there are no shadow register sets, the value is 0.