CC26xx Driver Library
interrupt.c File Reference
#include "interrupt.h"

Functions

static void IntDefaultHandler (void)
 The default interrupt handler. More...
 
void IntRegister (uint32_t ui32Interrupt, void(*pfnHandler)(void))
 Registers a function as an interrupt handler in the dynamic vector table. More...
 
void IntUnregister (uint32_t ui32Interrupt)
 Unregisters an interrupt handler in the dynamic vector table. More...
 
void IntPriorityGroupingSet (uint32_t ui32Bits)
 Sets the priority grouping of the interrupt controller. More...
 
uint32_t IntPriorityGroupingGet (void)
 Gets the priority grouping of the interrupt controller. More...
 
void IntPrioritySet (uint32_t ui32Interrupt, uint8_t ui8Priority)
 Sets the priority of an interrupt. More...
 
int32_t IntPriorityGet (uint32_t ui32Interrupt)
 Gets the priority of an interrupt. More...
 
void IntEnable (uint32_t ui32Interrupt)
 Enables an interrupt or system exception. More...
 
void IntDisable (uint32_t ui32Interrupt)
 Disables an interrupt or system exception. More...
 
void IntPendSet (uint32_t ui32Interrupt)
 Pends an interrupt. More...
 
bool IntPendGet (uint32_t ui32Interrupt)
 Checks if an interrupt is pending. More...
 
void IntPendClear (uint32_t ui32Interrupt)
 Unpends an interrupt. More...
 

Variables

static const uint32_t g_pui32Priority []
 
static const uint32_t g_pui32Regs []
 
void(* g_pfnRAMVectors [NUM_INTERRUPTS])(void)
 Global pointer to the (dynamic) interrupt vector table when placed in SRAM. More...
 

Function Documentation

§ IntDefaultHandler()

static void IntDefaultHandler ( void  )
static

The default interrupt handler.

This is the default interrupt handler for all interrupts. It simply loops forever so that the system state is preserved for observation by a debugger. Since interrupts should be disabled before unregistering the corresponding handler, this should never be called.

Returns
None

Referenced by IntUnregister().

110 {
111  // Go into an infinite loop.
112  while(1)
113  {
114  }
115 }

Variable Documentation

§ g_pfnRAMVectors

void(* g_pfnRAMVectors[NUM_INTERRUPTS])(void)

Global pointer to the (dynamic) interrupt vector table when placed in SRAM.

Interrupt vector table is placed at "vtable_ram" defined in the linker file provided by Texas Instruments. By default, this is at the beginning of SRAM.

Note
See interrupt.c for compiler specific implementation!

Referenced by IntRegister(), and IntUnregister().

§ g_pui32Priority

const uint32_t g_pui32Priority[]
static
Initial value:
=
{
NVIC_APINT_PRIGROUP_0_8, NVIC_APINT_PRIGROUP_1_7, NVIC_APINT_PRIGROUP_2_6,
NVIC_APINT_PRIGROUP_3_5, NVIC_APINT_PRIGROUP_4_4, NVIC_APINT_PRIGROUP_5_3,
NVIC_APINT_PRIGROUP_6_2, NVIC_APINT_PRIGROUP_7_1
}

This is a mapping between priority grouping encodings and the number of preemption priority bits.

Referenced by IntPriorityGroupingGet(), and IntPriorityGroupingSet().

§ g_pui32Regs

const uint32_t g_pui32Regs[]
static
Initial value:
=
{
0, NVIC_SYS_PRI1, NVIC_SYS_PRI2, NVIC_SYS_PRI3, NVIC_PRI0, NVIC_PRI1,
NVIC_PRI2, NVIC_PRI3, NVIC_PRI4, NVIC_PRI5, NVIC_PRI6, NVIC_PRI7,
NVIC_PRI8, NVIC_PRI9, NVIC_PRI10, NVIC_PRI11, NVIC_PRI12, NVIC_PRI13
}

This is a mapping between interrupt number and the register that contains the priority encoding for that interrupt.

Referenced by IntPriorityGet(), and IntPrioritySet().