MotorWare f2806x Driver API Documentation

- Main Page
- Modules
- Data Structures
- Files

Data Structures | Macros | Typedefs | Enumerations | Functions
CAP

## Data Structures
struct | _CAP_Obj_
| Defines the capture (CAP) object. More...

## Macros
#define | CAP1_BASE_ADDR (0x00006A00)
| Defines the base address of the capture (CAP) 1 registers. More...
#define | CAP2_BASE_ADDR (0x00006A20)
| Defines the base address of the capture (CAP) 2 registers. More...
#define | CAP3_BASE_ADDR (0x00006A40)
| Defines the base address of the capture (CAP) 3 registers. More...
#define | CAP_ECCTL1_FREESOFT_BITS (3 << 14)
| Defines the location of the FREE/SOFT bits in the ECCTL1 register. More...
#define | CAP_ECCTL1_PRESCALE_BITS (31 << 9)
| Defines the location of the PRESCALE bits in the ECCTL1 register. More...
#define | CAP_ECCTL1_CAPLDEN_BITS (1 << 8)
| Defines the location of the CAPLDEN bits in the ECCTL1 register. More...
#define | CAP_ECCTL1_CTRRST4_BITS (1 << 7)
| Defines the location of the CTRRST4 bits in the ECCTL1 register. More...
#define | CAP_ECCTL1_CAP4POL_BITS (1 << 6)
| Defines the location of the CAP4POL bits in the ECCTL1 register. More...
#define | CAP_ECCTL1_CTRRST3_BITS (1 << 5)
| Defines the location of the CTRRST3 bits in the ECCTL1 register. More...
#define | CAP_ECCTL1_CAP3POL_BITS (1 << 4)
| Defines the location of the CAP3POL bits in the ECCTL1 register. More...
#define | CAP_ECCTL1_CTRRST2_BITS (1 << 3)
| Defines the location of the CTRRST2 bits in the ECCTL1 register. More...
#define | CAP_ECCTL1_CAP2POL_BITS (1 << 2)
| Defines the location of the CAP2POL bits in the ECCTL1 register. More...
#define | CAP_ECCTL1_CTRRST1_BITS (1 << 1)
| Defines the location of the CTRRST1 bits in the ECCTL1 register. More...
#define | CAP_ECCTL1_CAP1POL_BITS (1 << 0)
| Defines the location of the CAP1POL bits in the ECCTL1 register. More...
#define | CAP_ECCTL2_APWMPOL_BITS (1 << 10)
| Defines the location of the APWMPOL bits in the ECCTL2 register. More...
#define | CAP_ECCTL2_CAPAPWM_BITS (1 << 9)
| Defines the location of the CAP/APWM bits in the ECCTL2 register. More...
#define | CAP_ECCTL2_SWSYNC_BITS (1 << 8)
| Defines the location of the SWSYNC bits in the ECCTL2 register. More...
#define | CAP_ECCTL2_SYNCOSEL_BITS (3 << 6)
| Defines the location of the SYNCO_SEL bits in the ECCTL2 register. More...
#define | CAP_ECCTL2_SYNCIEN_BITS (1 << 5)
| Defines the location of the SYNCI_EN bits in the ECCTL2 register. More...
#define | CAP_ECCTL2_TSCTRSTOP_BITS (1 << 4)
| Defines the location of the TSCTRSTOP bits in the ECCTL2 register. More...
#define | CAP_ECCTL2_REARM_BITS (1 << 3)
| Defines the location of the REARM bits in the ECCTL2 register. More...
#define | CAP_ECCTL2_STOP_WRAP_BITS (3 << 1)
| Defines the location of the STOP_WRAP bits in the ECCTL2 register. More...
#define | CAP_ECCTL2_CONTONESHOT_BITS (1 << 0)
| Defines the location of the CONT/ONESHOT bits in the ECCTL2 register. More...
#define | CAP_ECCxxx_CTRCOMP_BITS (1 << 7)
| Defines the location of the CTR=COMP bits in the ECCxxx register. More...
#define | CAP_ECCxxx_CTRPRD_BITS (1 << 6)
| Defines the location of the CTR=PRD bits in the ECCxxx register. More...
#define | CAP_ECCxxx_CTROVF_BITS (1 << 5)
| Defines the location of the CTROVF bits in the ECCxxx register. More...
#define | CAP_ECCxxx_CEVT4_BITS (1 << 4)
| Defines the location of the CEVT4 bits in the ECCxxx register. More...
#define | CAP_ECCxxx_CEVT3_BITS (1 << 3)
| Defines the location of the CEVT4 bits in the ECCxxx register. More...
#define | CAP_ECCxxx_CEVT2_BITS (1 << 2)
| Defines the location of the CEVT4 bits in the ECCxxx register. More...
#define | CAP_ECCxxx_CEVT1_BITS (1 << 1)
| Defines the location of the CEVT4 bits in the ECCxxx register. More...
#define | CAP_ECCxxx_INT_BITS (1 << 0)
| Defines the location of the INT bits in the ECCxxx register. More...

## Typedefs
typedef struct _CAP_Obj_ | CAP_Obj
| Defines the capture (CAP) object. More...
typedef struct _CAP_Obj_ * | CAP_Handle
| Defines the capture (CAP) handle. More...

## Enumerations
enum | CAP_Int_Type_e { CAP_Int_Type_CTR_CMP = (1 << 7), CAP_Int_Type_CTR_PRD = (1 << 6), CAP_Int_Type_CTR_OVF = (1 << 5), CAP_Int_Type_CEVT4 = (1 << 4), CAP_Int_Type_CEVT3 = (1 << 3), CAP_Int_Type_CEVT2 = (1 << 2), CAP_Int_Type_CEVT1 = (1 << 1), CAP_Int_Type_Global = (1 << 0), CAP_Int_Type_All = 0x00FF }
| Enumeration to define the capture (CAP) interrupts. More...
enum | CAP_Prescale_e { CAP_Prescale_By_1 = (0 << 9), CAP_Prescale_By_2 = (1 << 9), CAP_Prescale_By_4 = (2 << 9), CAP_Prescale_By_6 = (3 << 9), CAP_Prescale_By_8 = (4 << 9), CAP_Prescale_By_10 = (5 << 9), CAP_Prescale_By_12 = (6 << 9), CAP_Prescale_By_14 = (7 << 9), CAP_Prescale_By_16 = (8 << 9), CAP_Prescale_By_18 = (9 << 9), CAP_Prescale_By_20 = (10 << 9), CAP_Prescale_By_22 = (11 << 9), CAP_Prescale_By_24 = (12 << 9), CAP_Prescale_By_26 = (13 << 9), CAP_Prescale_By_28 = (14 << 9), CAP_Prescale_By_30 = (15 << 9), CAP_Prescale_By_32 = (16 << 9), CAP_Prescale_By_34 = (17 << 9), CAP_Prescale_By_36 = (18 << 9), CAP_Prescale_By_38 = (19 << 9), CAP_Prescale_By_40 = (20 << 9), CAP_Prescale_By_42 = (21 << 9), CAP_Prescale_By_44 = (22 << 9), CAP_Prescale_By_46 = (23 << 9), CAP_Prescale_By_48 = (24 << 9), CAP_Prescale_By_50 = (25 << 9), CAP_Prescale_By_52 = (26 << 9), CAP_Prescale_By_54 = (27 << 9), CAP_Prescale_By_56 = (28 << 9), CAP_Prescale_By_58 = (29 << 9), CAP_Prescale_By_60 = (30 << 9), CAP_Prescale_By_62 = (31 << 9) }
| Enumeration to define the capture (CAP) prescaler values. More...
enum | CAP_RunMode_e { CAP_RunMode_HardStop = (0 << 14), CAP_RunMode_SoftStopAfterCycle = (1 << 14), CAP_RunMode_FreeRun = (2 << 14) }
| Enumeration to define the pulse width modulation (PWM) run modes. More...
enum | CAP_Stop_Wrap_e { CAP_Stop_Wrap_CEVT1 = (0 << 1), CAP_Stop_Wrap_CEVT2 = (1 << 1), CAP_Stop_Wrap_CEVT3 = (2 << 1), CAP_Stop_Wrap_CEVT4 = (3 << 1) }
| Enumeration to define the capture (CAP) Stop/Wrap modes. More...
enum | CAP_Event_e { CAP_Event_1 = 0, CAP_Event_2, CAP_Event_3, CAP_Event_4 }
| Enumeration to define the capture (CAP) events. More...
enum | CAP_Polarity_e { CAP_Polarity_Rising = 0, CAP_Polarity_Falling }
| Enumeration to define the capture (CAP) event polarities. More...
enum | CAP_Reset_e { CAP_Reset_Disable = 0, CAP_Reset_Enable }
| Enumeration to define the capture (CAP) event resets. More...
enum | CAP_SyncOut_e { CAP_SyncOut_SyncIn = (0 << 6), CAP_SyncOut_CTRPRD = (1 << 6), CAP_SyncOut_Disable = (2 << 6) }
| Enumeration to define the Sync Out options. More...

## Functions
void | CAP_setModeCap (CAP_Handle capHandle)
| Sets capture peripheral up for capture mode. More...
void | CAP_setModeApwm (CAP_Handle capHandle)
| Sets capture peripheral up for APWM mode. More...
static void | CAP_clearInt (CAP_Handle capHandle, const CAP_Int_Type_e intType)
| Clears capture (CAP) interrupt flag. More...
void | CAP_disableCaptureLoad (CAP_Handle capHandle)
| Disables loading of CAP1-4 on capture event. More...
void | CAP_disableInt (CAP_Handle capHandle, const CAP_Int_Type_e intType)
| Disables capture (CAP) interrupt source. More...
void | CAP_disableSyncIn (CAP_Handle capHandle)
| Disables counter synchronization. More...
void | CAP_disableTimestampCounter (CAP_Handle capHandle)
| Disables Time Stamp counter from running. More...
void | CAP_enableCaptureLoad (CAP_Handle capHandle)
| Enables loading of CAP1-4 on capture event. More...
void | CAP_enableInt (CAP_Handle capHandle, const CAP_Int_Type_e intType)
| Enables capture (CAP) interrupt source. More...
void | CAP_enableSyncIn (CAP_Handle capHandle)
| Enables counter synchronization. More...
void | CAP_enableTimestampCounter (CAP_Handle capHandle)
| Enables Time Stamp counter to running. More...
static uint32_t | CAP_getCap1 (CAP_Handle capHandle)
| Gets the CAP1 register value. More...
static uint32_t | CAP_getCap2 (CAP_Handle capHandle)
| Gets the CAP2 register value. More...
static uint32_t | CAP_getCap3 (CAP_Handle capHandle)
| Gets the CAP3 register value. More...
static uint32_t | CAP_getCap4 (CAP_Handle capHandle)
| Gets the CAP4 register value. More...
static void | CAP_rearm (CAP_Handle capHandle)
| (Re-)Arm the capture module More...
void | CAP_setCapEvtPolarity (CAP_Handle capHandle, const CAP_Event_e event, const CAP_Polarity_e polarity)
| Sets the capture event polarity. More...
void | CAP_setCapEvtReset (CAP_Handle capHandle, const CAP_Event_e event, const CAP_Reset_e reset)
| Sets the capture event counter reset configuration. More...
void | CAP_setCapContinuous (CAP_Handle capHandle)
| Sets up for continuous Capture. More...
void | CAP_setCapOneShot (CAP_Handle capHandle)
| Sets up for one-shot Capture. More...
static void | CAP_setApwmPeriod (CAP_Handle capHandle, const uint32_t period)
| Sets the APWM period. More...
static void | CAP_setApwmCompare (CAP_Handle capHandle, const uint32_t compare)
| Sets the APWM compare value. More...
static void | CAP_setApwmShadowPeriod (CAP_Handle capHandle, const uint32_t shadowPeriod)
| Sets the APWM shadow period. More...
void | CAP_setStopWrap (CAP_Handle capHandle, const CAP_Stop_Wrap_e stopWrap)
| Set the stop/wrap mode. More...
void | CAP_setSyncOut (CAP_Handle capHandle, const CAP_SyncOut_e syncOut)
| Set the sync out mode. More...
CAP_Handle | CAP_init (void *pMemory, const size_t numBytes)
| Initializes the capture (CAP) object handle. More...

## Detailed Description

## Data Structure Documentation

struct _CAP_Obj_

Defines the capture (CAP) object.

Definition at line 312 of file cap.h.

Data Fields
volatile uint32_t | CAP1 | Capture 1 Register.
volatile uint32_t | CAP2 | Capture 2 Register.
volatile uint32_t | CAP3 | Capture 3 Register.
volatile uint32_t | CAP4 | Capture 4 Register.
volatile uint32_t | CTRPHS | Counter Phase Offset Value Register.
volatile uint16_t | ECCTL1 | Capture Control Register 1.
volatile uint16_t | ECCTL2 | Capture Control Register 2.
volatile uint16_t | ECECLR | Capture Interrupt Clear Register.
volatile uint16_t | ECEFLG | Capture Interrupt Flag Register.
volatile uint16_t | ECEFRC | Capture Interrupt Force Register.
volatile uint16_t | ECEINT | Capture Interrupt Enable Register.
volatile uint16_t | Rsvd_1[8] | Reserved.
volatile uint32_t | TSCTR | Time-stamp Counter.

## Macro Definition Documentation

#define CAP1_BASE_ADDR (0x00006A00)

Defines the base address of the capture (CAP) 1 registers.

Definition at line 70 of file cap.h.

#define CAP2_BASE_ADDR (0x00006A20)

Defines the base address of the capture (CAP) 2 registers.

Definition at line 74 of file cap.h.

#define CAP3_BASE_ADDR (0x00006A40)

Defines the base address of the capture (CAP) 3 registers.

Definition at line 78 of file cap.h.

#define CAP_ECCTL1_CAP1POL_BITS (1 << 0)

Defines the location of the CAP1POL bits in the ECCTL1 register.

Definition at line 123 of file cap.h.

#define CAP_ECCTL1_CAP2POL_BITS (1 << 2)

Defines the location of the CAP2POL bits in the ECCTL1 register.

Definition at line 115 of file cap.h.

#define CAP_ECCTL1_CAP3POL_BITS (1 << 4)

Defines the location of the CAP3POL bits in the ECCTL1 register.

Definition at line 107 of file cap.h.

#define CAP_ECCTL1_CAP4POL_BITS (1 << 6)

Defines the location of the CAP4POL bits in the ECCTL1 register.

Definition at line 99 of file cap.h.

#define CAP_ECCTL1_CAPLDEN_BITS (1 << 8)

Defines the location of the CAPLDEN bits in the ECCTL1 register.

Definition at line 91 of file cap.h.

Referenced by CAP_disableCaptureLoad(), and CAP_enableCaptureLoad().

#define CAP_ECCTL1_CTRRST1_BITS (1 << 1)

Defines the location of the CTRRST1 bits in the ECCTL1 register.

Definition at line 119 of file cap.h.

#define CAP_ECCTL1_CTRRST2_BITS (1 << 3)

Defines the location of the CTRRST2 bits in the ECCTL1 register.

Definition at line 111 of file cap.h.

#define CAP_ECCTL1_CTRRST3_BITS (1 << 5)

Defines the location of the CTRRST3 bits in the ECCTL1 register.

Definition at line 103 of file cap.h.

#define CAP_ECCTL1_CTRRST4_BITS (1 << 7)

Defines the location of the CTRRST4 bits in the ECCTL1 register.

Definition at line 95 of file cap.h.

#define CAP_ECCTL1_FREESOFT_BITS (3 << 14)

Defines the location of the FREE/SOFT bits in the ECCTL1 register.

Definition at line 83 of file cap.h.

#define CAP_ECCTL1_PRESCALE_BITS (31 << 9)

Defines the location of the PRESCALE bits in the ECCTL1 register.

Definition at line 87 of file cap.h.

#define CAP_ECCTL2_APWMPOL_BITS (1 << 10)

Defines the location of the APWMPOL bits in the ECCTL2 register.

Definition at line 128 of file cap.h.

#define CAP_ECCTL2_CAPAPWM_BITS (1 << 9)

Defines the location of the CAP/APWM bits in the ECCTL2 register.

Definition at line 132 of file cap.h.

Referenced by CAP_setModeApwm(), and CAP_setModeCap().

#define CAP_ECCTL2_CONTONESHOT_BITS (1 << 0)

Defines the location of the CONT/ONESHOT bits in the ECCTL2 register.

Definition at line 160 of file cap.h.

Referenced by CAP_setCapContinuous(), and CAP_setCapOneShot().

#define CAP_ECCTL2_REARM_BITS (1 << 3)

Defines the location of the REARM bits in the ECCTL2 register.

Definition at line 152 of file cap.h.

Referenced by CAP_rearm().

#define CAP_ECCTL2_STOP_WRAP_BITS (3 << 1)

Defines the location of the STOP_WRAP bits in the ECCTL2 register.

Definition at line 156 of file cap.h.

Referenced by CAP_setStopWrap().

#define CAP_ECCTL2_SWSYNC_BITS (1 << 8)

Defines the location of the SWSYNC bits in the ECCTL2 register.

Definition at line 136 of file cap.h.

#define CAP_ECCTL2_SYNCIEN_BITS (1 << 5)

Defines the location of the SYNCI_EN bits in the ECCTL2 register.

Definition at line 144 of file cap.h.

Referenced by CAP_disableSyncIn(), and CAP_enableSyncIn().

#define CAP_ECCTL2_SYNCOSEL_BITS (3 << 6)

Defines the location of the SYNCO_SEL bits in the ECCTL2 register.

Definition at line 140 of file cap.h.

Referenced by CAP_setSyncOut().

#define CAP_ECCTL2_TSCTRSTOP_BITS (1 << 4)

Defines the location of the TSCTRSTOP bits in the ECCTL2 register.

Definition at line 148 of file cap.h.

Referenced by CAP_disableTimestampCounter(), and CAP_enableTimestampCounter().

#define CAP_ECCxxx_CEVT1_BITS (1 << 1)

Defines the location of the CEVT4 bits in the ECCxxx register.

Definition at line 189 of file cap.h.

#define CAP_ECCxxx_CEVT2_BITS (1 << 2)

Defines the location of the CEVT4 bits in the ECCxxx register.

Definition at line 185 of file cap.h.

#define CAP_ECCxxx_CEVT3_BITS (1 << 3)

Defines the location of the CEVT4 bits in the ECCxxx register.

Definition at line 181 of file cap.h.

#define CAP_ECCxxx_CEVT4_BITS (1 << 4)

Defines the location of the CEVT4 bits in the ECCxxx register.

Definition at line 177 of file cap.h.

#define CAP_ECCxxx_CTRCOMP_BITS (1 << 7)

Defines the location of the CTR=COMP bits in the ECCxxx register.

Definition at line 165 of file cap.h.

#define CAP_ECCxxx_CTROVF_BITS (1 << 5)

Defines the location of the CTROVF bits in the ECCxxx register.

Definition at line 173 of file cap.h.

#define CAP_ECCxxx_CTRPRD_BITS (1 << 6)

Defines the location of the CTR=PRD bits in the ECCxxx register.

Definition at line 169 of file cap.h.

#define CAP_ECCxxx_INT_BITS (1 << 0)

Defines the location of the INT bits in the ECCxxx register.

Definition at line 193 of file cap.h.

## Typedef Documentation

typedef struct _CAP_Obj_* CAP_Handle

Defines the capture (CAP) handle.

Definition at line 333 of file cap.h.

typedef struct _CAP_Obj_ CAP_Obj

Defines the capture (CAP) object.

## Enumeration Type Documentation

enum CAP_Event_e

Enumeration to define the capture (CAP) events.

Enumerator
CAP_Event_1 | Capture Event 1.
CAP_Event_2 | Capture Event 2.
CAP_Event_3 | Capture Event 3.
CAP_Event_4 | Capture Event 4.

Definition at line 275 of file cap.h.

enum CAP_Int_Type_e

Enumeration to define the capture (CAP) interrupts.

Enumerator
CAP_Int_Type_CTR_CMP | Denotes CTR = CMP interrupt.
CAP_Int_Type_CTR_PRD | Denotes CTR = PRD interrupt.
CAP_Int_Type_CTR_OVF | Denotes CTROVF interrupt.
CAP_Int_Type_CEVT4 | Denotes CEVT4 interrupt.
CAP_Int_Type_CEVT3 | Denotes CEVT3 interrupt.
CAP_Int_Type_CEVT2 | Denotes CEVT2 interrupt.
CAP_Int_Type_CEVT1 | Denotes CEVT1 interrupt.
CAP_Int_Type_Global | Denotes Capture global interrupt.
CAP_Int_Type_All | Denotes All interrupts.

Definition at line 203 of file cap.h.

enum CAP_Polarity_e

Enumeration to define the capture (CAP) event polarities.

Enumerator
CAP_Polarity_Rising | Rising Edge Triggered.
CAP_Polarity_Falling | Falling Edge Triggered.

Definition at line 285 of file cap.h.

enum CAP_Prescale_e

Enumeration to define the capture (CAP) prescaler values.

Enumerator
CAP_Prescale_By_1 | Divide by 1.
CAP_Prescale_By_2 | Divide by 2.
CAP_Prescale_By_4 | Divide by 4.
CAP_Prescale_By_6 | Divide by 6.
CAP_Prescale_By_8 | Divide by 8.
CAP_Prescale_By_10 | Divide by 10.
CAP_Prescale_By_12 | Divide by 12.
CAP_Prescale_By_14 | Divide by 14.
CAP_Prescale_By_16 | Divide by 16.
CAP_Prescale_By_18 | Divide by 18.
CAP_Prescale_By_20 | Divide by 20.
CAP_Prescale_By_22 | Divide by 22.
CAP_Prescale_By_24 | Divide by 24.
CAP_Prescale_By_26 | Divide by 26.
CAP_Prescale_By_28 | Divide by 28.
CAP_Prescale_By_30 | Divide by 30.
CAP_Prescale_By_32 | Divide by 32.
CAP_Prescale_By_34 | Divide by 34.
CAP_Prescale_By_36 | Divide by 36.
CAP_Prescale_By_38 | Divide by 38.
CAP_Prescale_By_40 | Divide by 40.
CAP_Prescale_By_42 | Divide by 42.
CAP_Prescale_By_44 | Divide by 44.
CAP_Prescale_By_46 | Divide by 46.
CAP_Prescale_By_48 | Divide by 48.
CAP_Prescale_By_50 | Divide by 50.
CAP_Prescale_By_52 | Divide by 52.
CAP_Prescale_By_54 | Divide by 54.
CAP_Prescale_By_56 | Divide by 56.
CAP_Prescale_By_58 | Divide by 58.
CAP_Prescale_By_60 | Divide by 60.
CAP_Prescale_By_62 | Divide by 62.

Definition at line 218 of file cap.h.

enum CAP_Reset_e

Enumeration to define the capture (CAP) event resets.

Enumerator
CAP_Reset_Disable | Disable counter reset on capture event.
CAP_Reset_Enable | Enable counter reset on capture event.

Definition at line 294 of file cap.h.

enum CAP_RunMode_e

Enumeration to define the pulse width modulation (PWM) run modes.

Enumerator
CAP_RunMode_HardStop |
CAP_RunMode_SoftStopAfterCycle |
CAP_RunMode_FreeRun |

Definition at line 256 of file cap.h.

enum CAP_Stop_Wrap_e

Enumeration to define the capture (CAP) Stop/Wrap modes.

Enumerator
CAP_Stop_Wrap_CEVT1 | Stop/Wrap after Capture Event 1.
CAP_Stop_Wrap_CEVT2 | Stop/Wrap after Capture Event 2.
CAP_Stop_Wrap_CEVT3 | Stop/Wrap after Capture Event 3.
CAP_Stop_Wrap_CEVT4 | Stop/Wrap after Capture Event 4.

Definition at line 265 of file cap.h.

enum CAP_SyncOut_e

Enumeration to define the Sync Out options.

Enumerator
CAP_SyncOut_SyncIn | Sync In used for Sync Out.
CAP_SyncOut_CTRPRD | CTR = PRD used for Sync Out.
CAP_SyncOut_Disable | Disables Sync Out.

Definition at line 302 of file cap.h.

## Function Documentation

static void CAP_clearInt | ( | CAP_Handle | capHandle,
|  | const CAP_Int_Type_e | intType
| ) |  |
| inline static

Clears capture (CAP) interrupt flag.

Parameters

  [in] | capHandle | The capture (CAP) object handle
  [in] | intType | The capture interrupt to be cleared

Definition at line 356 of file cap.h.

References _CAP_Obj_::ECECLR.

void CAP_disableCaptureLoad | ( | CAP_Handle | capHandle | ) |

Disables loading of CAP1-4 on capture event.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 70 of file cap.c.

References CAP_ECCTL1_CAPLDEN_BITS, and _CAP_Obj_::ECCTL1.

void CAP_disableInt | ( | CAP_Handle | capHandle,
|  | const CAP_Int_Type_e | intType
| ) |  |

Disables capture (CAP) interrupt source.

Parameters

  [in] | capHandle | The capture (CAP) object handle
  [in] | intType | The capture interrupt type to be disabled

Definition at line 91 of file cap.c.

References _CAP_Obj_::ECEINT.

void CAP_disableSyncIn | ( | CAP_Handle | capHandle | ) |

Disables counter synchronization.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 80 of file cap.c.

References CAP_ECCTL2_SYNCIEN_BITS, and _CAP_Obj_::ECCTL2.

void CAP_disableTimestampCounter | ( | CAP_Handle | capHandle | ) |

Disables Time Stamp counter from running.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 102 of file cap.c.

References CAP_ECCTL2_TSCTRSTOP_BITS, and _CAP_Obj_::ECCTL2.

void CAP_enableCaptureLoad | ( | CAP_Handle | capHandle | ) |

Enables loading of CAP1-4 on capture event.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 112 of file cap.c.

References CAP_ECCTL1_CAPLDEN_BITS, and _CAP_Obj_::ECCTL1.

void CAP_enableInt | ( | CAP_Handle | capHandle,
|  | const CAP_Int_Type_e | intType
| ) |  |

Enables capture (CAP) interrupt source.

Parameters

  [in] | capHandle | The capture (CAP) object handle
  [in] | intType | The capture interrupt type to be enabled

Definition at line 122 of file cap.c.

References _CAP_Obj_::ECEINT.

void CAP_enableSyncIn | ( | CAP_Handle | capHandle | ) |

Enables counter synchronization.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 133 of file cap.c.

References CAP_ECCTL2_SYNCIEN_BITS, and _CAP_Obj_::ECCTL2.

void CAP_enableTimestampCounter | ( | CAP_Handle | capHandle | ) |

Enables Time Stamp counter to running.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 144 of file cap.c.

References CAP_ECCTL2_TSCTRSTOP_BITS, and _CAP_Obj_::ECCTL2.

static uint32_t CAP_getCap1 | ( | CAP_Handle | capHandle | ) |
| inline static

Gets the CAP1 register value.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 401 of file cap.h.

References _CAP_Obj_::CAP1.

static uint32_t CAP_getCap2 | ( | CAP_Handle | capHandle | ) |
| inline static

Gets the CAP2 register value.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 410 of file cap.h.

References _CAP_Obj_::CAP2.

static uint32_t CAP_getCap3 | ( | CAP_Handle | capHandle | ) |
| inline static

Gets the CAP3 register value.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 419 of file cap.h.

References _CAP_Obj_::CAP3.

static uint32_t CAP_getCap4 | ( | CAP_Handle | capHandle | ) |
| inline static

Gets the CAP4 register value.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 428 of file cap.h.

References _CAP_Obj_::CAP4.

CAP_Handle CAP_init | ( | void * | pMemory,
|  | const size_t | numBytes
| ) |  |

Initializes the capture (CAP) object handle.

Parameters

  [in] | pMemory | A pointer to the base address of the CAP registers
  [in] | numBytes | The number of bytes allocated for the CAP object, bytes

Returns
  The capture (CAP) object handle

Definition at line 56 of file cap.c.

static void CAP_rearm | ( | CAP_Handle | capHandle | ) |
| inline static

(Re-)Arm the capture module

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 437 of file cap.h.

References CAP_ECCTL2_REARM_BITS, and _CAP_Obj_::ECCTL2.

static void CAP_setApwmCompare | ( | CAP_Handle | capHandle,
|  | const uint32_t | compare
| ) |  |
| inline static

Sets the APWM compare value.

Parameters

  [in] | capHandle | The capture (CAP) object handle
  [in] | compare | The APWM compare value

Definition at line 481 of file cap.h.

References _CAP_Obj_::CAP2.

static void CAP_setApwmPeriod | ( | CAP_Handle | capHandle,
|  | const uint32_t | period
| ) |  |
| inline static

Sets the APWM period.

Parameters

  [in] | capHandle | The capture (CAP) object handle
  [in] | period | The APWM period

Definition at line 469 of file cap.h.

References _CAP_Obj_::CAP1.

static void CAP_setApwmShadowPeriod | ( | CAP_Handle | capHandle,
|  | const uint32_t | shadowPeriod
| ) |  |
| inline static

Sets the APWM shadow period.

Parameters

  [in] | capHandle | The capture (CAP) object handle
  [in] | shadowPeriod | The APWM shadow period

Definition at line 493 of file cap.h.

References _CAP_Obj_::CAP3.

void CAP_setCapContinuous | ( | CAP_Handle | capHandle | ) |

Sets up for continuous Capture.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 180 of file cap.c.

References CAP_ECCTL2_CONTONESHOT_BITS, and _CAP_Obj_::ECCTL2.

void CAP_setCapEvtPolarity | ( | CAP_Handle | capHandle,
|  | const CAP_Event_e | event,
|  | const CAP_Polarity_e | polarity
| ) |  |

Sets the capture event polarity.

Parameters

  [in] | capHandle | The capture (CAP) object handle
  [in] | event | The event to configure
  [in] | polarity | The polarity to configure the event for

Definition at line 154 of file cap.c.

References _CAP_Obj_::ECCTL1.

void CAP_setCapEvtReset | ( | CAP_Handle | capHandle,
|  | const CAP_Event_e | event,
|  | const CAP_Reset_e | reset
| ) |  |

Sets the capture event counter reset configuration.

Parameters

  [in] | capHandle | The capture (CAP) object handle
  [in] | event | The event to configure
  [in] | reset | Whether the event should reset the counter or not

Definition at line 167 of file cap.c.

References _CAP_Obj_::ECCTL1.

void CAP_setCapOneShot | ( | CAP_Handle | capHandle | ) |

Sets up for one-shot Capture.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 191 of file cap.c.

References CAP_ECCTL2_CONTONESHOT_BITS, and _CAP_Obj_::ECCTL2.

void CAP_setModeApwm | ( | CAP_Handle | capHandle | ) |

Sets capture peripheral up for APWM mode.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 213 of file cap.c.

References CAP_ECCTL2_CAPAPWM_BITS, and _CAP_Obj_::ECCTL2.

void CAP_setModeCap | ( | CAP_Handle | capHandle | ) |

Sets capture peripheral up for capture mode.

Parameters

  [in] | capHandle | The capture (CAP) object handle

Definition at line 202 of file cap.c.

References CAP_ECCTL2_CAPAPWM_BITS, and _CAP_Obj_::ECCTL2.

void CAP_setStopWrap | ( | CAP_Handle | capHandle,
|  | const CAP_Stop_Wrap_e | stopWrap
| ) |  |

Set the stop/wrap mode.

Parameters

  [in] | capHandle | The capture (CAP) object handle
  [in] | stopWrap | The stop/wrap mode to set

Definition at line 224 of file cap.c.

References CAP_ECCTL2_STOP_WRAP_BITS, and _CAP_Obj_::ECCTL2.

void CAP_setSyncOut | ( | CAP_Handle | capHandle,
|  | const CAP_SyncOut_e | syncOut
| ) |  |

Set the sync out mode.

Parameters

  [in] | capHandle | The capture (CAP) object handle
  [in] | syncOut | The sync out mode to set

Definition at line 238 of file cap.c.

References CAP_ECCTL2_SYNCOSEL_BITS, and _CAP_Obj_::ECCTL2.