Nios® V Processor Software Developer Handbook

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

18.1.3.11. alt_clic_set_level ()

Prototype

int alt_clic_set_level(alt_u32 irq, alt_u8 level_bits)

Commonly Called By

C/C++ programs

Device drivers

Thread-safe

No.

Available from ISR

No.

Include

<sys/alt_irq.h>

Description

Sets the level 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.
  • level_bits is the preferred interrupt level.

    If the ALT_CPU_CLIC_NUM_LEVELS in system.h is 5, the CLIC supports 4 interrupt levels with a single application level. Thus, the available options for level_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.