Nios® V Processor Software Developer Handbook

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

18.1.3.15. alt_clic_set_trigger_mode()

Prototype

int alt_clic_set_trigger_mode(alt_u32 irq, alt_clic_trigger_mode_t trigger_mode)

Commonly Called By

C/C++ programs

Device drivers

Thread-safe

No.

Available from ISR

No.

Include

<sys/alt_irq.h>

Description

Sets the trigger mode 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.
  • trigger_mode is the preferred trigger mode defined in the alt_clic_trigger_mode_t enumeration.
    • ALT_CLIC_LOGIC_1_LEVEL_TRIGGER_MODE – Default trigger mode. CLIC captures “logic 1”-level as interrupt trigger.
    • ALT_CLIC_POSITIVE_EDGE_TRIGGER_MODE – CLIC captures positive-edge as interrupt trigger.
    • ALT_CLIC_LOGIC_0_LEVEL_TRIGGER_MODE – CLIC captures “logic 0”-level as interrupt trigger.
    • ALT_CLIC_NEGATIVE_EDGE_TRIGGER_MODE – CLIC captures negative-edge as interrupt trigger.

Return

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