RTEMS 6.1-rc7
Loading...
Searching...
No Matches
Macros | Functions
irq.c File Reference

This source file contains the interrupt controller support implementation. More...

#include <bsp.h>
#include <bsp/irq-generic.h>
#include <bsp/tms570.h>
#include <bsp/irq.h>
#include <rtems/score/armv4.h>

Macros

#define VIM_CHANCTRL_COUNT   24
 
#define VIM_CHANMAP_MASK   UINT32_C(0x7f)
 
#define VIM_CHANMAP_SHIFT(i)   (24 - (8 * (i)))
 
#define VIM_REQ_REG(vector)   ((vector) >> 5)
 
#define VIM_REQ_BIT(vector)   (UINT32_C(1) << ((vector) & 0x1f))
 

Functions

rtems_status_code tms570_irq_set_priority (rtems_vector_number vector, uint32_t priority)
 Sets the priority of the interrupt vector.
 
rtems_status_code tms570_irq_get_priority (rtems_vector_number vector, unsigned *priority)
 
void bsp_interrupt_dispatch (void)
 Interrupt dispatch.
 
rtems_status_code bsp_interrupt_get_attributes (rtems_vector_number vector, rtems_interrupt_attributes *attributes)
 enables interrupt vector in the HW
 
rtems_status_code bsp_interrupt_is_pending (rtems_vector_number vector, bool *pending)
 Checks if the interrupt is pending.
 
rtems_status_code bsp_interrupt_raise (rtems_vector_number vector)
 Causes the interrupt vector.
 
rtems_status_code bsp_interrupt_clear (rtems_vector_number vector)
 Clears the interrupt vector.
 
rtems_status_code bsp_interrupt_vector_is_enabled (rtems_vector_number vector, bool *enabled)
 Checks if the interrupt is enabled.
 
rtems_status_code bsp_interrupt_vector_enable (rtems_vector_number vector)
 Enables the interrupt vector.
 
rtems_status_code bsp_interrupt_vector_disable (rtems_vector_number vector)
 disables interrupt vector in the HW
 
rtems_status_code bsp_interrupt_set_priority (rtems_vector_number vector, uint32_t priority)
 Sets the priority of the interrupt vector.
 
rtems_status_code bsp_interrupt_get_priority (rtems_vector_number vector, uint32_t *priority)
 Gets the priority of the interrupt vector.
 
void bsp_interrupt_facility_initialize (void)
 Init function of interrupt module.
 

Detailed Description

This source file contains the interrupt controller support implementation.

Function Documentation

◆ bsp_interrupt_dispatch()

void bsp_interrupt_dispatch ( void  )

Interrupt dispatch.

Called by OS to determine which interrupt occured. Function passes control to interrupt handler.

Returns
Void

◆ tms570_irq_set_priority()

rtems_status_code tms570_irq_set_priority ( rtems_vector_number  vector,
uint32_t  priority 
)

Sets the priority of the interrupt vector.

The priority is defined by the VIM interrupt channel. Firstly, the VIM Interrupt Control (CHANCTRL) registers are searched to get the current channel associated with the interrupt vector. The interrupt vector of the channel associated with the priority is assigned to this channel. The specified interrupt vector is assigned to the channel associated with the priority. So, this function swaps the channels of two interrupt vectors.

Parameters
vectoris the number of the interrupt vector to set the priority.
priorityis the priority to set.
Return values
RTEMS_SUCCESSFULThe requested operation was successful.
RTEMS_INVALID_IDThere was no interrupt vector associated with the number specified by vector.
RTEMS_INVALID_PRIORITYThe interrupt priority specified in priority was invalid.