NEORV32 - Software Framework Documentation
Functions
neorv32_xirq.h File Reference

External Interrupt controller HW driver header file. More...

Go to the source code of this file.

Functions

int neorv32_xirq_available (void)
 
int neorv32_xirq_setup (void)
 
void neorv32_xirq_global_enable (void)
 
void neorv32_xirq_global_disable (void)
 
int neorv32_xirq_get_num (void)
 
void neorv32_xirq_clear_pending (uint8_t ch)
 
void neorv32_xirq_channel_enable (uint8_t ch)
 
void neorv32_xirq_channel_disable (uint8_t ch)
 
int neorv32_xirq_install (uint8_t ch, void(*handler)(void))
 
int neorv32_xirq_uninstall (uint8_t ch)
 

Detailed Description

External Interrupt controller HW driver header file.

Function Documentation

◆ neorv32_xirq_available()

int neorv32_xirq_available ( void  )

Check if external interrupt controller was synthesized.

Returns
0 if XIRQ was not synthesized, 1 if EXTIRQ is available.

◆ neorv32_xirq_channel_disable()

void neorv32_xirq_channel_disable ( uint8_t  ch)

Disable IRQ channel.

Parameters
[in]chXIRQ interrupt channel (0..31).

◆ neorv32_xirq_channel_enable()

void neorv32_xirq_channel_enable ( uint8_t  ch)

Enable IRQ channel.

Parameters
[in]chXIRQ interrupt channel (0..31).

◆ neorv32_xirq_clear_pending()

void neorv32_xirq_clear_pending ( uint8_t  ch)

Clear pending interrupt.

Parameters
[in]chXIRQ interrupt channel (0..31).

◆ neorv32_xirq_get_num()

int neorv32_xirq_get_num ( void  )

Get number of implemented XIRQ channels

Returns
Number of implemented channels (0..32).

◆ neorv32_xirq_global_disable()

void neorv32_xirq_global_disable ( void  )

Globally disable XIRQ interrupts (via according FIRQ channel).

◆ neorv32_xirq_global_enable()

void neorv32_xirq_global_enable ( void  )

Globally enable XIRQ interrupts (via according FIRQ channel).

◆ neorv32_xirq_install()

int neorv32_xirq_install ( uint8_t  ch,
void(*)(void)  handler 
)

Install exception handler function for XIRQ channel.

Note
This will also activate the according XIRQ channel and clear a pending IRQ at this channel.
Parameters
[in]chXIRQ interrupt channel (0..31).
[in]handlerThe actual handler function for the specified exception (function MUST be of type "void function(void);").
Returns
0 if success, 1 if error.

◆ neorv32_xirq_setup()

int neorv32_xirq_setup ( void  )

Initialize XIRQ controller.

Note
All interrupt channels will be deactivated, all pending IRQs will be deleted and all handler addresses will be deleted.
Returns
0 if success, 1 if error.

◆ neorv32_xirq_uninstall()

int neorv32_xirq_uninstall ( uint8_t  ch)

Uninstall exception handler function for XIRQ channel.

Note
This will also deactivate the according XIRQ channel and clear pending state.
Parameters
[in]chXIRQ interrupt channel (0..31).
Returns
0 if success, 1 if error.