Nios® V Processor Software Developer Handbook

ID 743810
Date 7/08/2024
Public
Document Table of Contents

9.2.4. Enabling and Disabling Interrupts

The HAL enhanced interrupt API provides the functions:
  • alt_ic_irq_disable(), alt_ic_irq_enable() allow you to to disable and enable individual interrupts.
  • alt_irq_disable_all() disables all interrupts, and returns a context value.
  • Call alt_irq_enable_all() pass in the context parameter to re-enable hardware interrupts.. The interrupts are returned to their state prior to the call to alt_irq_disable_all().
  • alt_irq_enabled() returns nonzero if maskable exceptions are enabled. alt_ic_irq_enabled() determines whether a specified interrupt is enabled.
Note: Disable interrupts for as short a time as possible. Maximum interrupt latency increases with the longest amount of time interrupts are disabled. For more information about disabled interrupts, refer to the Keep Interrupts Enabled chapter.