Nios® V Processor Software Developer Handbook

ID 743810
Date 10/06/2025
Public
Document Table of Contents

18.1.3.13. alt_clic_set_priority()

Prototype

int alt_clic_set_ priority(alt_u32 irq, alt_u8 priority_bits)

Commonly Called By

C/C++ programs

Device drivers

Thread-safe

No.

Available from ISR

No.

Include

<sys/alt_irq.h>

Description

Sets the priority of the CLIC platform interrupt indicated by irq.

The functions arguments are as follows:
  • irq is the IRQ number, as defined in system.h, identifying the interrupt to register.
  • priority_bits is the preferred interrupt level.

    If the ALT_CPU_CLIC_NUM_PRIORITIES in system.h is 4, the CLIC supports 4 interrupt levels with a single application level. Thus, the available options for priority_bits are 0, 1, 2, and 3.

Return

This function returns zero if successful, or nonzero otherwise. The function fails if irq is an invalid platform interrupt number.