MotorWare f2806x Driver API Documentation
Data Structures | Macros | Typedefs | Enumerations | Functions
pie.h File Reference

Contains public interface to various functions related to the peripheral interrupt expansion (PIE) object. More...

#include "sw/modules/types/src/types.h"
#include "sw/drivers/adc/src/32b/f28x/f2806x/adc.h"
#include "sw/drivers/pwm/src/32b/f28x/f2806x/pwm.h"

Go to the source code of this file.

Data Structures

struct  _PIE_IERIFR_t
 Defines the PIE_IERIFR_t data type. More...
 
struct  _PIE_Obj_
 Defines the peripheral interrupt expansion (PIE) object. More...
 

Macros

#define PIE_BASE_ADDR   (0x00000CE0)
 Defines the base address of the peripheral interrupt expansion (PIE) registers. More...
 
#define PIE_DBGIER_INT1_BITS   (1 << 0)
 Defines the location of the INT1 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT2_BITS   (1 << 1)
 Defines the location of the INT2 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT3_BITS   (1 << 2)
 Defines the location of the INT3 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT4_BITS   (1 << 3)
 Defines the location of the INT4 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT5_BITS   (1 << 4)
 Defines the location of the INT5 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT6_BITS   (1 << 5)
 Defines the location of the INT6 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT7_BITS   (1 << 6)
 Defines the location of the INT7 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT8_BITS   (1 << 7)
 Defines the location of the INT8 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT9_BITS   (1 << 8)
 Defines the location of the INT9 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT10_BITS   (1 << 9)
 Defines the location of the INT10 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT11_BITS   (1 << 10)
 Defines the location of the INT11 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT12_BITS   (1 << 11)
 Defines the location of the INT12 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT13_BITS   (1 << 12)
 Defines the location of the INT13 bits in the DBGIER register. More...
 
#define PIE_DBGIER_INT14_BITS   (1 << 13)
 Defines the location of the INT14 bits in the DBGIER register. More...
 
#define PIE_DBGIER_DLOGINT_BITS   (1 << 14)
 Defines the location of the DLOGINT bits in the DBGIER register. More...
 
#define PIE_DBGIER_RTOSINT_BITS   (1 << 15)
 Defines the location of the RTOSINT bits in the DBGIER register. More...
 
#define PIE_IER_INT1_BITS   (1 << 0)
 Defines the location of the INT1 bits in the IER register. More...
 
#define PIE_IER_INT2_BITS   (1 << 1)
 Defines the location of the INT2 bits in the IER register. More...
 
#define PIE_IER_INT3_BITS   (1 << 2)
 Defines the location of the INT3 bits in the IER register. More...
 
#define PIE_IER_INT4_BITS   (1 << 3)
 Defines the location of the INT4 bits in the IER register. More...
 
#define PIE_IER_INT5_BITS   (1 << 4)
 Defines the location of the INT5 bits in the IER register. More...
 
#define PIE_IER_INT6_BITS   (1 << 5)
 Defines the location of the INT6 bits in the IER register. More...
 
#define PIE_IER_INT7_BITS   (1 << 6)
 Defines the location of the INT7 bits in the IER register. More...
 
#define PIE_IER_INT8_BITS   (1 << 7)
 Defines the location of the INT8 bits in the IER register. More...
 
#define PIE_IER_INT9_BITS   (1 << 8)
 Defines the location of the INT9 bits in the IER register. More...
 
#define PIE_IER_INT10_BITS   (1 << 9)
 Defines the location of the INT10 bits in the IER register. More...
 
#define PIE_IER_INT11_BITS   (1 << 10)
 Defines the location of the INT11 bits in the IER register. More...
 
#define PIE_IER_INT12_BITS   (1 << 11)
 Defines the location of the INT12 bits in the IER register. More...
 
#define PIE_IER_INT13_BITS   (1 << 12)
 Defines the location of the INT13 bits in the IER register. More...
 
#define PIE_IER_INT14_BITS   (1 << 13)
 Defines the location of the INT14 bits in the IER register. More...
 
#define PIE_IER_DLOGINT_BITS   (1 << 14)
 Defines the location of the DLOGINT bits in the IER register. More...
 
#define PIE_IER_RTOSINT_BITS   (1 << 15)
 Defines the location of the RTOSINT bits in the IER register. More...
 
#define PIE_IERx_INTx1_BITS   (1 << 0)
 Defines the location of the INTx1 bits in the IERx register. More...
 
#define PIE_IERx_INTx2_BITS   (1 << 1)
 Defines the location of the INTx2 bits in the IERx register. More...
 
#define PIE_IERx_INTx3_BITS   (1 << 2)
 Defines the location of the INTx3 bits in the IERx register. More...
 
#define PIE_IERx_INTx4_BITS   (1 << 3)
 Defines the location of the INTx4 bits in the IERx register. More...
 
#define PIE_IERx_INTx5_BITS   (1 << 4)
 Defines the location of the INTx5 bits in the IERx register. More...
 
#define PIE_IERx_INTx6_BITS   (1 << 5)
 Defines the location of the INTx6 bits in the IERx register. More...
 
#define PIE_IERx_INTx7_BITS   (1 << 6)
 Defines the location of the INTx7 bits in the IERx register. More...
 
#define PIE_IERx_INTx8_BITS   (1 << 7)
 Defines the location of the INTx8 bits in the IERx register. More...
 
#define PIE_IFR_INT1_BITS   (1 << 0)
 Defines the location of the INT1 bits in the IFR register. More...
 
#define PIE_IFR_INT2_BITS   (1 << 1)
 Defines the location of the INT2 bits in the IFR register. More...
 
#define PIE_IFR_INT3_BITS   (1 << 2)
 Defines the location of the INT3 bits in the IFR register. More...
 
#define PIE_IFR_INT4_BITS   (1 << 3)
 Defines the location of the INT4 bits in the IFR register. More...
 
#define PIE_IFR_INT5_BITS   (1 << 4)
 Defines the location of the INT5 bits in the IFR register. More...
 
#define PIE_IFR_INT6_BITS   (1 << 5)
 Defines the location of the INT6 bits in the IFR register. More...
 
#define PIE_IFR_INT7_BITS   (1 << 6)
 Defines the location of the INT7 bits in the IFR register. More...
 
#define PIE_IFR_INT8_BITS   (1 << 7)
 Defines the location of the INT8 bits in the IFR register. More...
 
#define PIE_IFR_INT9_BITS   (1 << 8)
 Defines the location of the INT9 bits in the IFR register. More...
 
#define PIE_IFR_INT10_BITS   (1 << 9)
 Defines the location of the INT10 bits in the IFR register. More...
 
#define PIE_IFR_INT11_BITS   (1 << 10)
 Defines the location of the INT11 bits in the IFR register. More...
 
#define PIE_IFR_INT12_BITS   (1 << 11)
 Defines the location of the INT12 bits in the IFR register. More...
 
#define PIE_IFR_INT13_BITS   (1 << 12)
 Defines the location of the INT13 bits in the IFR register. More...
 
#define PIE_IFR_INT14_BITS   (1 << 13)
 Defines the location of the INT14 bits in the IFR register. More...
 
#define PIE_IFR_DLOGINT_BITS   (1 << 14)
 Defines the location of the DLOGINT bits in the IFR register. More...
 
#define PIE_IFR_RTOSINT_BITS   (1 << 15)
 Defines the location of the RTOSINT bits in the IFR register. More...
 
#define PIE_IFRx_INTx1_BITS   (1 << 0)
 Defines the location of the INTx1 bits in the IFRx register. More...
 
#define PIE_IFRx_INTx2_BITS   (1 << 1)
 Defines the location of the INTx2 bits in the IFRx register. More...
 
#define PIE_IFRx_INTx3_BITS   (1 << 2)
 Defines the location of the INTx3 bits in the IFRx register. More...
 
#define PIE_IFRx_INTx4_BITS   (1 << 3)
 Defines the location of the INTx4 bits in the IFRx register. More...
 
#define PIE_IFRx_INTx5_BITS   (1 << 4)
 Defines the location of the INTx5 bits in the IFRx register. More...
 
#define PIE_IFRx_INTx6_BITS   (1 << 5)
 Defines the location of the INTx6 bits in the IFRx register. More...
 
#define PIE_IFRx_INTx7_BITS   (1 << 6)
 Defines the location of the INTx7 bits in the IFRx register. More...
 
#define PIE_IFRx_INTx8_BITS   (1 << 7)
 Defines the location of the INTx8 bits in the IFRx register. More...
 
#define PIE_PIECTRL_ENPIE_BITS   (1 << 0)
 Defines the location of the ENPIE bits in the PIECTRL register. More...
 
#define PIE_PIECTRL_PIEVECT_BITS   (32767 << 1)
 Defines the location of the PIEVECT bits in the PIECTRL register. More...
 
#define PIE_PIEACK_GROUP1_BITS   (1 << 0)
 Defines the location of the GROUP1 bits in the PIEACK register. More...
 
#define PIE_PIEACK_GROUP2_BITS   (1 << 1)
 Defines the location of the GROUP2 bits in the PIEACK register. More...
 
#define PIE_PIEACK_GROUP3_BITS   (1 << 2)
 Defines the location of the GROUP3 bits in the PIEACK register. More...
 
#define PIE_PIEACK_GROUP4_BITS   (1 << 3)
 Defines the location of the GROUP4 bits in the PIEACK register. More...
 
#define PIE_PIEACK_GROUP5_BITS   (1 << 4)
 Defines the location of the GROUP5 bits in the PIEACK register. More...
 
#define PIE_PIEACK_GROUP6_BITS   (1 << 5)
 Defines the location of the GROUP6 bits in the PIEACK register. More...
 
#define PIE_PIEACK_GROUP7_BITS   (1 << 6)
 Defines the location of the GROUP7 bits in the PIEACK register. More...
 
#define PIE_PIEACK_GROUP8_BITS   (1 << 7)
 Defines the location of the GROUP8 bits in the PIEACK register. More...
 
#define PIE_PIEACK_GROUP9_BITS   (1 << 8)
 Defines the location of the GROUP9 bits in the PIEACK register. More...
 
#define PIE_PIEACK_GROUP10_BITS   (1 << 9)
 Defines the location of the GROUP10 bits in the PIEACK register. More...
 
#define PIE_PIEACK_GROUP11_BITS   (1 << 10)
 Defines the location of the GROUP11 bits in the PIEACK register. More...
 
#define PIE_PIEACK_GROUP12_BITS   (1 << 11)
 Defines the location of the GROUP12 bits in the PIEACK register. More...
 
#define PIE_XINTnCR_POLARITY_BITS   (3 << 2)
 
#define PIE_XINTnCR_ENABLE_BITS   (1 << 0)
 

Typedefs

typedef interrupt void(* PIE_IntVec_t) (void)
 Defines the type for an interrupt vector. More...
 
typedef struct _PIE_IERIFR_t PIE_IERIFR_t
 Defines the PIE_IERIFR_t data type. More...
 
typedef struct _PIE_Obj_ PIE_Obj
 Defines the peripheral interrupt expansion (PIE) object. More...
 
typedef struct _PIE_Obj_PIE_Handle
 Defines the peripheral interrupt expansion (PIE) handle. More...
 

Enumerations

enum  PIE_ExtIntPolarity_e { PIE_ExtIntPolarity_FallingEdge =(0 << 2), PIE_ExtIntPolarity_RisingEdge =(1 << 2), PIE_ExtIntPolarity_RisingAndFallingEdge =(3 << 2) }
 Enumeration to define the external interrupt polarity. More...
 
enum  PIE_GroupNumber_e {
  PIE_GroupNumber_1 = 0, PIE_GroupNumber_2 = 1, PIE_GroupNumber_3 = 2, PIE_GroupNumber_4 = 3,
  PIE_GroupNumber_5 = 4, PIE_GroupNumber_6 = 5, PIE_GroupNumber_7 = 6, PIE_GroupNumber_8 = 7,
  PIE_GroupNumber_9 = 8, PIE_GroupNumber_10 = 9, PIE_GroupNumber_11 = 10, PIE_GroupNumber_12 = 11
}
 Enumeration to define the peripheral interrupt expansion (PIE) group numbers. More...
 
enum  PIE_SubGroupNumber_e {
  PIE_SubGroupNumber_1 = 0, PIE_SubGroupNumber_2 = 1, PIE_SubGroupNumber_3 = 2, PIE_SubGroupNumber_4 = 3,
  PIE_SubGroupNumber_5 = 4, PIE_SubGroupNumber_6 = 5, PIE_SubGroupNumber_7 = 6, PIE_SubGroupNumber_8 = 7
}
 Enumeration to define the peripheral interrupt expansion (PIE) sub-group numbers. More...
 
enum  PIE_SystemInterrupts_e {
  PIE_SystemInterrupts_Reset = 0, PIE_SystemInterrupts_INT1, PIE_SystemInterrupts_INT2, PIE_SystemInterrupts_INT3,
  PIE_SystemInterrupts_INT4, PIE_SystemInterrupts_INT5, PIE_SystemInterrupts_INT6, PIE_SystemInterrupts_INT7,
  PIE_SystemInterrupts_INT8, PIE_SystemInterrupts_INT9, PIE_SystemInterrupts_INT10, PIE_SystemInterrupts_INT11,
  PIE_SystemInterrupts_INT12, PIE_SystemInterrupts_TINT1, PIE_SystemInterrupts_TINT2, PIE_SystemInterrupts_DATALOG,
  PIE_SystemInterrupts_RTOSINT, PIE_SystemInterrupts_EMUINT, PIE_SystemInterrupts_NMI, PIE_SystemInterrupts_ILLEGAL,
  PIE_SystemInterrupts_USER1, PIE_SystemInterrupts_USER2, PIE_SystemInterrupts_USER3, PIE_SystemInterrupts_USER4,
  PIE_SystemInterrupts_USER5, PIE_SystemInterrupts_USER6, PIE_SystemInterrupts_USER7, PIE_SystemInterrupts_USER8,
  PIE_SystemInterrupts_USER9, PIE_SystemInterrupts_USER10, PIE_SystemInterrupts_USER11, PIE_SystemInterrupts_USER12
}
 Enumeration to define the system interrupts. More...
 
enum  PIE_InterruptSource_e {
  PIE_InterruptSource_ADCINT_1_1 = (1 << 0), PIE_InterruptSource_ADCINT_1_2 = (1 << 1), PIE_InterruptSource_XINT_1 = (1 << 3), PIE_InterruptSource_XINT_2 = (1 << 4),
  PIE_InterruptSource_ADCINT_9 = (1 << 5), PIE_InterruptSource_TIMER_0 = (1 << 6), PIE_InterruptSource_WAKE = (1 << 7), PIE_InterruptSource_TZ1 = (1 << 0),
  PIE_InterruptSource_TZ2 = (1 << 1), PIE_InterruptSource_TZ3 = (1 << 2), PIE_InterruptSource_TZ4 = (1 << 3), PIE_InterruptSource_TZ5 = (1 << 4),
  PIE_InterruptSource_TZ6 = (1 << 5), PIE_InterruptSource_TZ7 = (1 << 6), PIE_InterruptSource_TZ8 = (1 << 7), PIE_InterruptSource_EPWM1 = (1 << 0),
  PIE_InterruptSource_EPWM2 = (1 << 1), PIE_InterruptSource_EPWM3 = (1 << 2), PIE_InterruptSource_EPWM4 = (1 << 3), PIE_InterruptSource_EPWM5 = (1 << 4),
  PIE_InterruptSource_EPWM6 = (1 << 5), PIE_InterruptSource_EPWM7 = (1 << 6), PIE_InterruptSource_EPWM8 = (1 << 7), PIE_InterruptSource_ECAP1 = (1 << 0),
  PIE_InterruptSource_ECAP2 = (1 << 1), PIE_InterruptSource_ECAP3 = (1 << 2), PIE_InterruptSource_HRCAP1 = (1 << 6), PIE_InterruptSource_HRCAP2 = (1 << 7),
  PIE_InterruptSource_EQEP1 = (1 << 0), PIE_InterruptSource_EQEP2 = (1 << 1), PIE_InterruptSource_HRCAP3 = (1 << 3), PIE_InterruptSource_HRCAP4 = (1 << 4),
  PIE_InterruptSource_USB0 = (1 << 7), PIE_InterruptSource_SPIARX = (1 << 0), PIE_InterruptSource_SPIATX = (1 << 1), PIE_InterruptSource_SPIBRX = (1 << 2),
  PIE_InterruptSource_SPIBTX = (1 << 3), PIE_InterruptSource_MCBSPARX = (1 << 4), PIE_InterruptSource_MCBSPATX = (1 << 5), PIE_InterruptSource_DMA_CH1 = (1 << 0),
  PIE_InterruptSource_DMA_CH2 = (1 << 1), PIE_InterruptSource_DMA_CH3 = (1 << 2), PIE_InterruptSource_DMA_CH4 = (1 << 3), PIE_InterruptSource_DMA_CH5 = (1 << 4),
  PIE_InterruptSource_DMA_CH6 = (1 << 5), PIE_InterruptSource_I2CA1 = (1 << 0), PIE_InterruptSource_I2CA2 = (1 << 1), PIE_InterruptSource_SCIARX = (1 << 0),
  PIE_InterruptSource_SCIATX = (1 << 1), PIE_InterruptSource_SCIBRX = (1 << 2), PIE_InterruptSource_SCIBTX = (1 << 3), PIE_InterruptSource_ECANA0 = (1 << 4),
  PIE_InterruptSource_ECANA1 = (1 << 5), PIE_InterruptSource_ADCINT_10_1 = (1 << 0), PIE_InterruptSource_ADCINT_10_2 = (1 << 1), PIE_InterruptSource_ADCINT_3 = (1 << 2),
  PIE_InterruptSource_ADCINT_4 = (1 << 3), PIE_InterruptSource_ADCINT_5 = (1 << 4), PIE_InterruptSource_ADCINT_6 = (1 << 5), PIE_InterruptSource_ADCINT_7 = (1 << 6),
  PIE_InterruptSource_ADCINT_8 = (1 << 7), PIE_InterruptSource_CLAINT_1 = (1 << 0), PIE_InterruptSource_CLAINT_2 = (1 << 1), PIE_InterruptSource_CLAINT_3 = (1 << 2),
  PIE_InterruptSource_CLAINT_4 = (1 << 3), PIE_InterruptSource_CLAINT_5 = (1 << 4), PIE_InterruptSource_CLAINT_6 = (1 << 5), PIE_InterruptSource_CLAINT_7 = (1 << 6),
  PIE_InterruptSource_CLAINT_8 = (1 << 7), PIE_InterruptSource_XINT_3 = (1 << 0), PIE_InterruptSource_CLAINT_LVF = (1 << 6), PIE_InterruptSource_CLAINT_LUF = (1 << 7)
}
 Enumeration to define the peripheral interrupt expansion (PIE) individual interrupt sources. More...
 

Functions

void PIE_clearAllInts (PIE_Handle pieHandle)
 Clears all the interrupts. More...
 
void PIE_clearAllFlags (PIE_Handle pieHandle)
 Clears all the interrupt flags. More...
 
static void PIE_clearInt (PIE_Handle pieHandle, const PIE_GroupNumber_e groupNumber)
 Clears an interrupt defined by group number. More...
 
void PIE_disable (PIE_Handle pieHandle)
 Disables the peripheral interrupt expansion (PIE) More...
 
void PIE_disableAllInts (PIE_Handle pieHandle)
 Disables all of the interrupts. More...
 
void PIE_disableCaptureInt (PIE_Handle pieHandle)
 Disables the capture interrupt. More...
 
void PIE_disableInt (PIE_Handle pieHandle, const PIE_GroupNumber_e group, const PIE_InterruptSource_e intSource)
 Disable a specific PIE interrupt. More...
 
void PIE_enable (PIE_Handle pieHandle)
 Enables the peripheral interrupt expansion (PIE) More...
 
void PIE_enableAdcInt (PIE_Handle pieHandle, const ADC_IntNumber_e intNumber)
 Enables the specified ADC interrupt. More...
 
void PIE_enableCaptureInt (PIE_Handle pieHandle)
 Enables the capture interrupt. More...
 
void PIE_enableExtInt (PIE_Handle pieHandle, const CPU_ExtIntNumber_e intNumber)
 Enables the prescribed external interrupt. More...
 
void PIE_enableInt (PIE_Handle pieHandle, const PIE_GroupNumber_e group, const PIE_InterruptSource_e intSource)
 Enable a specific PIE interrupt. More...
 
void PIE_enablePwmInt (PIE_Handle pieHandle, const PWM_Number_e pwmNumber)
 Enables the PWM interrupt. More...
 
void PIE_enablePwmTzInt (PIE_Handle pieHandle, const PWM_Number_e pwmNumber)
 Enables the PWM Trip Zone interrupt. More...
 
void PIE_enableTimer0Int (PIE_Handle pieHandle)
 Enables the Cpu Timer 0 interrupt. More...
 
uint16_t PIE_getExtIntCount (PIE_Handle pieHandle, const CPU_ExtIntNumber_e intNumber)
 Gets the external interrupt count value. More...
 
uint16_t PIE_getIntEnables (PIE_Handle pieHandle, const PIE_GroupNumber_e group)
 Gets PIE interrupt enable values. More...
 
uint16_t PIE_getIntFlags (PIE_Handle pieHandle, const PIE_GroupNumber_e group)
 Gets PIE interrupt flag values. More...
 
void PIE_forceInt (PIE_Handle pieHandle, const PIE_GroupNumber_e group, const PIE_InterruptSource_e intSource)
 Force a specific PIE interrupt. More...
 
interrupt void PIE_illegalIsr (void)
 Defines an illegal interrupt service routine - if the program pointer references this function, there is an incorrect mapping in the PIE interrupt table. More...
 
PIE_Handle PIE_init (void *pMemory, const size_t numBytes)
 Initializes the peripheral interrupt expansion (PIE) object handle. More...
 
void PIE_registerPieIntHandler (PIE_Handle pieHandle, const PIE_GroupNumber_e groupNumber, const PIE_SubGroupNumber_e subGroupNumber, const PIE_IntVec_t vector)
 Registers a handler for a PIE interrupt. More...
 
void PIE_registerSystemIntHandler (PIE_Handle pieHandle, const PIE_SystemInterrupts_e systemInt, const PIE_IntVec_t vector)
 Registers a handler for a PIE interrupt. More...
 
void PIE_setDefaultIntVectorTable (PIE_Handle pieHandle)
 Initializes the vector table with illegal ISR handlers. More...
 
void PIE_setExtIntPolarity (PIE_Handle pieHandle, const CPU_ExtIntNumber_e intNumber, const PIE_ExtIntPolarity_e polarity)
 Sets the external interrupt polarity. More...
 
void PIE_unregisterPieIntHandler (PIE_Handle pieHandle, const PIE_GroupNumber_e groupNumber, const PIE_SubGroupNumber_e subGroupNumber)
 Unregisters a handler for a PIE interrupt. More...
 
void PIE_unregisterSystemIntHandler (PIE_Handle pieHandle, const PIE_SystemInterrupts_e systemInt)
 Unregisters a handler for a PIE interrupt. More...
 

Detailed Description

Contains public interface to various functions related to the peripheral interrupt expansion (PIE) object.

(C) Copyright 2015, Texas Instruments, Inc.

Definition in file pie.h.