Alt_vic_sw_interrupt_set() – Altera Embedded Peripherals IP User Manual

Page 283

Advertising
background image

• alt_ic_isr_register ()

• alt_ic_irq_enable()

• alt_ic_irq_disable()

• alt_ic_irq_enabled()

These functions write to the register map to change the setting or read from the register map to check

the status of the VIC component thru a memory-mapped address.
For detailed descriptions of these functions, refer to the to the

HAL API Reference

chapter of the Nios

II Software Developer’s Handbook.
The table below lists the API functions specific to the VIC core and briefly describes each. Details of

each function follow the table.

Table 28-12: Function List

Name

Description

alt_vic_sw_interrupt_set()

Sets the corresponding bit in the

SW_

INTERRUPT

register to enable a given

interrupt via software.

alt_vic_sw_interrupt_clear()

Clears the corresponding bit in the

SW_

INTERRUPT

register to disable a given

interrupt via software.

alt_vic_sw_interrupt_

status()

Reads the status of the

SW_INTERRUPT

register for a given interrupt.

alt_vic_irq_set_level()

Sets the interrupt level for a given

interrupt.

alt_vic_sw_interrupt_set()

Prototype:

int alt_vic_sw_interrupt_set(alt_u32 ic_id, alt_u32 irq)

Thread-safe: No
Available

from ISR:

No

Include:

altera_vic_irq.h, altera_vic_regs.h

Parameters: ic_id—the interrupt controller identification number as

defined in

system.h

irq—the interrupt value as defined in

system.h

Returns:

Returns zero if successful; otherwise non-zero for one or

more of the following reasons:
The value in ic_id is invalid
The value in irq is invalid

Description: Triggers a single software interrupt

28-14

alt_vic_sw_interrupt_set()

UG-01085

2014.24.07

Altera Corporation

Vectored Interrupt Controller Core

Send Feedback

Advertising