SimAVR
AVR Simulator
Interrupts

Data Structures

struct  avr_int_vector_t
 interrupt vector for the IO modules More...
 
struct  avr_int_table_t
 Interrupt vectors, and their enable/clear registers. More...
 

Typedefs

typedef struct avr_int_vector_t avr_int_vector_t
 interrupt vector for the IO modules More...
 
typedef struct avr_int_table_t avr_int_table_t
 Interrupt vectors, and their enable/clear registers. More...
 
typedef struct avr_int_table_tavr_int_table_p
 

Functions

void avr_register_vector (struct avr_t *avr, avr_int_vector_t *vector)
 Register an interrupt vector. It's only needed if you want to use the "r_raised" flags. More...
 
int avr_raise_interrupt (struct avr_t *avr, avr_int_vector_t *vector)
 Raise an interrupt (if enabled). More...
 
int avr_has_pending_interrupts (struct avr_t *avr)
 Return non-zero if the AVR core has any pending interrupts. More...
 
int avr_is_interrupt_pending (struct avr_t *avr, avr_int_vector_t *vector)
 Return nonzero if a specific interrupt vector is pending. More...
 
void avr_clear_interrupt (struct avr_t *avr, avr_int_vector_t *vector)
 Clear the "pending" status of an interrupt. More...
 
void avr_service_interrupts (struct avr_t *avr)
 Called by the core at each cycle to check whether an interrupt is pending. More...
 
int avr_clear_interrupt_if (struct avr_t *avr, avr_int_vector_t *vector, uint8_t old)
 Clear the interrupt (inc pending) if "raised" flag is 1. More...
 
avr_irq_tavr_get_interrupt_irq (struct avr_t *avr, uint8_t v)
 Return the IRQ that is raised when the vector is enabled and called/cleared this allows tracing of pending interrupts. More...
 
void avr_interrupt_init (struct avr_t *avr)
 Initializes the interrupt table. More...
 
void avr_interrupt_reset (struct avr_t *avr)
 Reset the interrupt table and the fifo. More...
 

Detailed Description

Typedef Documentation

typedef struct avr_int_table_t * avr_int_table_p

Interrupt vectors, and their enable/clear registers.

interrupt vector for the IO modules

Function Documentation

void avr_clear_interrupt ( struct avr_t avr,
avr_int_vector_t vector 
)

Clear the "pending" status of an interrupt.

Here is the call graph for this function:

Here is the caller graph for this function:

int avr_clear_interrupt_if ( struct avr_t avr,
avr_int_vector_t vector,
uint8_t  old 
)

Clear the interrupt (inc pending) if "raised" flag is 1.

Here is the call graph for this function:

Here is the caller graph for this function:

avr_irq_t* avr_get_interrupt_irq ( struct avr_t avr,
uint8_t  v 
)

Return the IRQ that is raised when the vector is enabled and called/cleared this allows tracing of pending interrupts.

int avr_has_pending_interrupts ( struct avr_t avr)

Return non-zero if the AVR core has any pending interrupts.

Here is the caller graph for this function:

void avr_interrupt_init ( struct avr_t avr)

Initializes the interrupt table.

Here is the caller graph for this function:

void avr_interrupt_reset ( struct avr_t avr)

Reset the interrupt table and the fifo.

Here is the caller graph for this function:

int avr_is_interrupt_pending ( struct avr_t avr,
avr_int_vector_t vector 
)

Return nonzero if a specific interrupt vector is pending.

int avr_raise_interrupt ( struct avr_t avr,
avr_int_vector_t vector 
)

Raise an interrupt (if enabled).

The interrupt is latched and will be called later return non-zero if the interrupt was raised and is now pending

Here is the call graph for this function:

Here is the caller graph for this function:

void avr_register_vector ( struct avr_t avr,
avr_int_vector_t vector 
)

Register an interrupt vector. It's only needed if you want to use the "r_raised" flags.

Here is the caller graph for this function:

void avr_service_interrupts ( struct avr_t avr)

Called by the core at each cycle to check whether an interrupt is pending.

Here is the call graph for this function:

Here is the caller graph for this function: