MotorWare f2806x Driver API Documentation

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

cap.h
Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
2 * Copyright (c) 2015, Texas Instruments Incorporated
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 * --/COPYRIGHT--*/
32 #ifndef _CAP_H_
33 #define _CAP_H_
34
41
42 // **************************************************************************
43 // the includes
44
45 // drivers
46 #include "sw/modules/types/src/types.h"
47
48
49 // modules
50
51
56
57
58
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62
63
64 // **************************************************************************
65 // the defines
66
67
70 #define CAP1_BASE_ADDR (0x00006A00)
71
74 #define CAP2_BASE_ADDR (0x00006A20)
75
78 #define CAP3_BASE_ADDR (0x00006A40)
79
80
83 #define CAP_ECCTL1_FREESOFT_BITS (3 << 14)
84
87 #define CAP_ECCTL1_PRESCALE_BITS (31 << 9)
88
91 #define CAP_ECCTL1_CAPLDEN_BITS (1 << 8)
92
95 #define CAP_ECCTL1_CTRRST4_BITS (1 << 7)
96
99 #define CAP_ECCTL1_CAP4POL_BITS (1 << 6)
100
103 #define CAP_ECCTL1_CTRRST3_BITS (1 << 5)
104
107 #define CAP_ECCTL1_CAP3POL_BITS (1 << 4)
108
111 #define CAP_ECCTL1_CTRRST2_BITS (1 << 3)
112
115 #define CAP_ECCTL1_CAP2POL_BITS (1 << 2)
116
119 #define CAP_ECCTL1_CTRRST1_BITS (1 << 1)
120
123 #define CAP_ECCTL1_CAP1POL_BITS (1 << 0)
124
125
128 #define CAP_ECCTL2_APWMPOL_BITS (1 << 10)
129
132 #define CAP_ECCTL2_CAPAPWM_BITS (1 << 9)
133
136 #define CAP_ECCTL2_SWSYNC_BITS (1 << 8)
137
140 #define CAP_ECCTL2_SYNCOSEL_BITS (3 << 6)
141
144 #define CAP_ECCTL2_SYNCIEN_BITS (1 << 5)
145
148 #define CAP_ECCTL2_TSCTRSTOP_BITS (1 << 4)
149
152 #define CAP_ECCTL2_REARM_BITS (1 << 3)
153
156 #define CAP_ECCTL2_STOP_WRAP_BITS (3 << 1)
157
160 #define CAP_ECCTL2_CONTONESHOT_BITS (1 << 0)
161
162
165 #define CAP_ECCxxx_CTRCOMP_BITS (1 << 7)
166
169 #define CAP_ECCxxx_CTRPRD_BITS (1 << 6)
170
173 #define CAP_ECCxxx_CTROVF_BITS (1 << 5)
174
177 #define CAP_ECCxxx_CEVT4_BITS (1 << 4)
178
181 #define CAP_ECCxxx_CEVT3_BITS (1 << 3)
182
185 #define CAP_ECCxxx_CEVT2_BITS (1 << 2)
186
189 #define CAP_ECCxxx_CEVT1_BITS (1 << 1)
190
193 #define CAP_ECCxxx_INT_BITS (1 << 0)
194
195
196
197
198 // **************************************************************************
199 // the typedefs
200
203 typedef enum
204 {
205 CAP_Int_Type_CTR_CMP = (1 << 7),
206 CAP_Int_Type_CTR_PRD = (1 << 6),
207 CAP_Int_Type_CTR_OVF = (1 << 5),
208 CAP_Int_Type_CEVT4 = (1 << 4),
209 CAP_Int_Type_CEVT3 = (1 << 3),
210 CAP_Int_Type_CEVT2 = (1 << 2),
211 CAP_Int_Type_CEVT1 = (1 << 1),
212 CAP_Int_Type_Global = (1 << 0),
213 CAP_Int_Type_All = 0x00FF
214 } CAP_Int_Type_e;
215
218 typedef enum
219 {
220 CAP_Prescale_By_1 = (0 << 9),
221 CAP_Prescale_By_2 = (1 << 9),
222 CAP_Prescale_By_4 = (2 << 9),
223 CAP_Prescale_By_6 = (3 << 9),
224 CAP_Prescale_By_8 = (4 << 9),
225 CAP_Prescale_By_10 = (5 << 9),
226 CAP_Prescale_By_12 = (6 << 9),
227 CAP_Prescale_By_14 = (7 << 9),
228 CAP_Prescale_By_16 = (8 << 9),
229 CAP_Prescale_By_18 = (9 << 9),
230 CAP_Prescale_By_20 = (10 << 9),
231 CAP_Prescale_By_22 = (11 << 9),
232 CAP_Prescale_By_24 = (12 << 9),
233 CAP_Prescale_By_26 = (13 << 9),
234 CAP_Prescale_By_28 = (14 << 9),
235 CAP_Prescale_By_30 = (15 << 9),
236 CAP_Prescale_By_32 = (16 << 9),
237 CAP_Prescale_By_34 = (17 << 9),
238 CAP_Prescale_By_36 = (18 << 9),
239 CAP_Prescale_By_38 = (19 << 9),
240 CAP_Prescale_By_40 = (20 << 9),
241 CAP_Prescale_By_42 = (21 << 9),
242 CAP_Prescale_By_44 = (22 << 9),
243 CAP_Prescale_By_46 = (23 << 9),
244 CAP_Prescale_By_48 = (24 << 9),
245 CAP_Prescale_By_50 = (25 << 9),
246 CAP_Prescale_By_52 = (26 << 9),
247 CAP_Prescale_By_54 = (27 << 9),
248 CAP_Prescale_By_56 = (28 << 9),
249 CAP_Prescale_By_58 = (29 << 9),
250 CAP_Prescale_By_60 = (30 << 9),
251 CAP_Prescale_By_62 = (31 << 9)
252 } CAP_Prescale_e;
253
256 typedef enum
257 {
258 CAP_RunMode_HardStop = (0 << 14),
259 CAP_RunMode_SoftStopAfterCycle = (1 << 14),
260 CAP_RunMode_FreeRun = (2 << 14)
261 } CAP_RunMode_e;
262
265 typedef enum
266 {
267 CAP_Stop_Wrap_CEVT1 = (0 << 1),
268 CAP_Stop_Wrap_CEVT2 = (1 << 1),
269 CAP_Stop_Wrap_CEVT3 = (2 << 1),
270 CAP_Stop_Wrap_CEVT4 = (3 << 1)
271 } CAP_Stop_Wrap_e;
272
275 typedef enum
276 {
277 CAP_Event_1 = 0,
278 CAP_Event_2,
279 CAP_Event_3,
280 CAP_Event_4
281 } CAP_Event_e;
282
285 typedef enum
286 {
287 CAP_Polarity_Rising = 0,
288 CAP_Polarity_Falling
289 } CAP_Polarity_e;
290
291
294 typedef enum
295 {
296 CAP_Reset_Disable = 0,
297 CAP_Reset_Enable
298 } CAP_Reset_e;
299
302 typedef enum
303 {
304 CAP_SyncOut_SyncIn = (0 << 6),
305 CAP_SyncOut_CTRPRD = (1 << 6),
306 CAP_SyncOut_Disable = (2 << 6)
307 } CAP_SyncOut_e;
308
309
312 typedef struct _CAP_Obj_
313 {
314 volatile uint32_t TSCTR;
315 volatile uint32_t CTRPHS;
316 volatile uint32_t CAP1;
317 volatile uint32_t CAP2;
318 volatile uint32_t CAP3;
319 volatile uint32_t CAP4;
320 volatile uint16_t Rsvd_1[8];
321 volatile uint16_t ECCTL1;
322 volatile uint16_t ECCTL2;
323 volatile uint16_t ECEINT;
324 volatile uint16_t ECEFLG;
325 volatile uint16_t ECECLR;
326 volatile uint16_t ECEFRC;
327
328 } CAP_Obj;
329
330
333 typedef struct _CAP_Obj_ *CAP_Handle;
334
335
336 // **************************************************************************
337 // the globals
338
339
340 // **************************************************************************
341 // the function prototypes
342
343
344
347 extern void CAP_setModeCap(CAP_Handle capHandle);
348
351 extern void CAP_setModeApwm(CAP_Handle capHandle);
352
356 static inline void CAP_clearInt(CAP_Handle capHandle, const CAP_Int_Type_e intType)
357 {
358 CAP_Obj *cap = (CAP_Obj *)capHandle;
359
360 cap->ECECLR |= intType;
361
362 return;
363 }
364
367 extern void CAP_disableCaptureLoad(CAP_Handle capHandle);
368
372 extern void CAP_disableInt(CAP_Handle capHandle, const CAP_Int_Type_e intType);
373
376 extern void CAP_disableSyncIn(CAP_Handle capHandle);
377
380 extern void CAP_disableTimestampCounter(CAP_Handle capHandle);
381
384 extern void CAP_enableCaptureLoad(CAP_Handle capHandle);
385
389 extern void CAP_enableInt(CAP_Handle capHandle, const CAP_Int_Type_e intType);
390
393 extern void CAP_enableSyncIn(CAP_Handle capHandle);
394
397 extern void CAP_enableTimestampCounter(CAP_Handle capHandle);
398
401 static inline uint32_t CAP_getCap1(CAP_Handle capHandle)
402 {
403 CAP_Obj *cap = (CAP_Obj *)capHandle;
404
405 return (cap->CAP1);
406 } // end of CAP_getCap1() function
407
410 static inline uint32_t CAP_getCap2(CAP_Handle capHandle)
411 {
412 CAP_Obj *cap = (CAP_Obj *)capHandle;
413
414 return (cap->CAP2);
415 } // end of CAP_getCap2() function
416
419 static inline uint32_t CAP_getCap3(CAP_Handle capHandle)
420 {
421 CAP_Obj *cap = (CAP_Obj *)capHandle;
422
423 return (cap->CAP3);
424 } // end of CAP_getCap3() function
425
428 static inline uint32_t CAP_getCap4(CAP_Handle capHandle)
429 {
430 CAP_Obj *cap = (CAP_Obj *)capHandle;
431
432 return (cap->CAP4);
433 } // end of CAP_getCap4() function
434
437 static inline void CAP_rearm(CAP_Handle capHandle)
438 {
439 CAP_Obj *cap = (CAP_Obj *)capHandle;
440
441 cap->ECCTL2 |= CAP_ECCTL2_REARM_BITS;
442
443 return;
444 } // end of CAP_rearm() function
445
450 extern void CAP_setCapEvtPolarity(CAP_Handle capHandle, const CAP_Event_e event, const CAP_Polarity_e polarity);
451
456 extern void CAP_setCapEvtReset(CAP_Handle capHandle, const CAP_Event_e event, const CAP_Reset_e reset);
457
460 extern void CAP_setCapContinuous(CAP_Handle capHandle);
461
464 extern void CAP_setCapOneShot(CAP_Handle capHandle);
465
469 static inline void CAP_setApwmPeriod(CAP_Handle capHandle, const uint32_t period)
470 {
471 CAP_Obj *cap = (CAP_Obj *)capHandle;
472
473 cap->CAP1 = period;
474
475 return;
476 } // end of CAP_setApwmPeriod() function
477
481 static inline void CAP_setApwmCompare(CAP_Handle capHandle, const uint32_t compare)
482 {
483 CAP_Obj *cap = (CAP_Obj *)capHandle;
484
485 cap->CAP2 = compare;
486
487 return;
488 } // end of CAP_setApwmCompare() function
489
493 static inline void CAP_setApwmShadowPeriod(CAP_Handle capHandle, const uint32_t shadowPeriod)
494 {
495 CAP_Obj *cap = (CAP_Obj *)capHandle;
496
497 cap->CAP3 = shadowPeriod;
498
499 return;
500 } // end of CAP_setApwmShadowPeriod() function
501
505 extern void CAP_setStopWrap(CAP_Handle capHandle, const CAP_Stop_Wrap_e stopWrap);
506
510 extern void CAP_setSyncOut(CAP_Handle capHandle, const CAP_SyncOut_e syncOut);
511
516 extern CAP_Handle CAP_init(void *pMemory,const size_t numBytes);
517
518
519
520 #ifdef __cplusplus
521 }
522 #endif // extern "C"
523
525 #endif // end of _CAP_H_ definition
526
CAP_SyncOut_SyncIn
Sync In used for Sync Out.
Definition: cap.h:304
CAP_Int_Type_All
Denotes All interrupts.
Definition: cap.h:213
CAP_setModeApwm
void CAP_setModeApwm(CAP_Handle capHandle)
Sets capture peripheral up for APWM mode.
Definition: cap.c:213
_CAP_Obj_::CAP4
volatile uint32_t CAP4
Capture 4 Register.
Definition: cap.h:319
_CAP_Obj_::CAP1
volatile uint32_t CAP1
Capture 1 Register.
Definition: cap.h:316
CAP_RunMode_HardStop
Definition: cap.h:258
CAP_Prescale_By_62
Divide by 62.
Definition: cap.h:251
CAP_disableInt
void CAP_disableInt(CAP_Handle capHandle, const CAP_Int_Type_e intType)
Disables capture (CAP) interrupt source.
Definition: cap.c:91
CAP_setModeCap
void CAP_setModeCap(CAP_Handle capHandle)
Sets capture peripheral up for capture mode.
Definition: cap.c:202
CAP_Prescale_By_38
Divide by 38.
Definition: cap.h:239
CAP_SyncOut_CTRPRD
CTR = PRD used for Sync Out.
Definition: cap.h:305
CAP_enableSyncIn
void CAP_enableSyncIn(CAP_Handle capHandle)
Enables counter synchronization.
Definition: cap.c:133
CAP_Prescale_By_22
Divide by 22.
Definition: cap.h:231
_CAP_Obj_::ECEINT
volatile uint16_t ECEINT
Capture Interrupt Enable Register.
Definition: cap.h:323
CAP_getCap3
static uint32_t CAP_getCap3(CAP_Handle capHandle)
Gets the CAP3 register value.
Definition: cap.h:419
CAP_Prescale_By_26
Divide by 26.
Definition: cap.h:233
_CAP_Obj_
Defines the capture (CAP) object.
Definition: cap.h:312
CAP_Prescale_By_1
Divide by 1.
Definition: cap.h:220
CAP_SyncOut_Disable
Disables Sync Out.
Definition: cap.h:306
CAP_Prescale_By_42
Divide by 42.
Definition: cap.h:241
CAP_Prescale_By_50
Divide by 50.
Definition: cap.h:245
CAP_Prescale_By_14
Divide by 14.
Definition: cap.h:227
CAP_disableSyncIn
void CAP_disableSyncIn(CAP_Handle capHandle)
Disables counter synchronization.
Definition: cap.c:80
CAP_clearInt
static void CAP_clearInt(CAP_Handle capHandle, const CAP_Int_Type_e intType)
Clears capture (CAP) interrupt flag.
Definition: cap.h:356
_CAP_Obj_::CAP2
volatile uint32_t CAP2
Capture 2 Register.
Definition: cap.h:317
CAP_Prescale_By_20
Divide by 20.
Definition: cap.h:230
CAP_Prescale_e
CAP_Prescale_e
Enumeration to define the capture (CAP) prescaler values.
Definition: cap.h:218
CAP_Handle
struct _CAP_Obj_ * CAP_Handle
Defines the capture (CAP) handle.
Definition: cap.h:333
CAP_Obj
struct _CAP_Obj_ CAP_Obj
Defines the capture (CAP) object.
CAP_Int_Type_CTR_PRD
Denotes CTR = PRD interrupt.
Definition: cap.h:206
CAP_Int_Type_CEVT2
Denotes CEVT2 interrupt.
Definition: cap.h:210
CAP_setApwmShadowPeriod
static void CAP_setApwmShadowPeriod(CAP_Handle capHandle, const uint32_t shadowPeriod)
Sets the APWM shadow period.
Definition: cap.h:493
_CAP_Obj_::CAP3
volatile uint32_t CAP3
Capture 3 Register.
Definition: cap.h:318
CAP_Int_Type_CEVT3
Denotes CEVT3 interrupt.
Definition: cap.h:209
CAP_Reset_Enable
Enable counter reset on capture event.
Definition: cap.h:297
_CAP_Obj_::ECEFRC
volatile uint16_t ECEFRC
Capture Interrupt Force Register.
Definition: cap.h:326
CAP_setCapEvtReset
void CAP_setCapEvtReset(CAP_Handle capHandle, const CAP_Event_e event, const CAP_Reset_e reset)
Sets the capture event counter reset configuration.
Definition: cap.c:167
CAP_Prescale_By_6
Divide by 6.
Definition: cap.h:223
CAP_Prescale_By_30
Divide by 30.
Definition: cap.h:235
CAP_Prescale_By_4
Divide by 4.
Definition: cap.h:222
CAP_Prescale_By_34
Divide by 34.
Definition: cap.h:237
CAP_Prescale_By_54
Divide by 54.
Definition: cap.h:247
CAP_Int_Type_e
CAP_Int_Type_e
Enumeration to define the capture (CAP) interrupts.
Definition: cap.h:203
_CAP_Obj_::TSCTR
volatile uint32_t TSCTR
Time-stamp Counter.
Definition: cap.h:314
_CAP_Obj_::CTRPHS
volatile uint32_t CTRPHS
Counter Phase Offset Value Register.
Definition: cap.h:315
CAP_setSyncOut
void CAP_setSyncOut(CAP_Handle capHandle, const CAP_SyncOut_e syncOut)
Set the sync out mode.
Definition: cap.c:238
CAP_Prescale_By_18
Divide by 18.
Definition: cap.h:229
CAP_enableCaptureLoad
void CAP_enableCaptureLoad(CAP_Handle capHandle)
Enables loading of CAP1-4 on capture event.
Definition: cap.c:112
CAP_Reset_Disable
Disable counter reset on capture event.
Definition: cap.h:296
CAP_Prescale_By_10
Divide by 10.
Definition: cap.h:225
CAP_Prescale_By_40
Divide by 40.
Definition: cap.h:240
_CAP_Obj_::ECEFLG
volatile uint16_t ECEFLG
Capture Interrupt Flag Register.
Definition: cap.h:324
CAP_Prescale_By_52
Divide by 52.
Definition: cap.h:246
CAP_Prescale_By_12
Divide by 12.
Definition: cap.h:226
CAP_Stop_Wrap_CEVT2
Stop/Wrap after Capture Event 2.
Definition: cap.h:268
_CAP_Obj_::ECCTL1
volatile uint16_t ECCTL1
Capture Control Register 1.
Definition: cap.h:321
CAP_Int_Type_CTR_CMP
Denotes CTR = CMP interrupt.
Definition: cap.h:205
CAP_disableCaptureLoad
void CAP_disableCaptureLoad(CAP_Handle capHandle)
Disables loading of CAP1-4 on capture event.
Definition: cap.c:70
CAP_Event_1
Capture Event 1.
Definition: cap.h:277
CAP_setCapEvtPolarity
void CAP_setCapEvtPolarity(CAP_Handle capHandle, const CAP_Event_e event, const CAP_Polarity_e polarity)
Sets the capture event polarity.
Definition: cap.c:154
CAP_Stop_Wrap_CEVT1
Stop/Wrap after Capture Event 1.
Definition: cap.h:267
CAP_setStopWrap
void CAP_setStopWrap(CAP_Handle capHandle, const CAP_Stop_Wrap_e stopWrap)
Set the stop/wrap mode.
Definition: cap.c:224
CAP_Prescale_By_24
Divide by 24.
Definition: cap.h:232
CAP_Prescale_By_56
Divide by 56.
Definition: cap.h:248
CAP_Prescale_By_16
Divide by 16.
Definition: cap.h:228
CAP_Stop_Wrap_e
CAP_Stop_Wrap_e
Enumeration to define the capture (CAP) Stop/Wrap modes.
Definition: cap.h:265
CAP_Event_4
Capture Event 4.
Definition: cap.h:280
CAP_Prescale_By_28
Divide by 28.
Definition: cap.h:234
CAP_getCap1
static uint32_t CAP_getCap1(CAP_Handle capHandle)
Gets the CAP1 register value.
Definition: cap.h:401
CAP_enableTimestampCounter
void CAP_enableTimestampCounter(CAP_Handle capHandle)
Enables Time Stamp counter to running.
Definition: cap.c:144
CAP_Prescale_By_8
Divide by 8.
Definition: cap.h:224
CAP_SyncOut_e
CAP_SyncOut_e
Enumeration to define the Sync Out options.
Definition: cap.h:302
CAP_getCap2
static uint32_t CAP_getCap2(CAP_Handle capHandle)
Gets the CAP2 register value.
Definition: cap.h:410
CAP_Prescale_By_32
Divide by 32.
Definition: cap.h:236
CAP_setApwmCompare
static void CAP_setApwmCompare(CAP_Handle capHandle, const uint32_t compare)
Sets the APWM compare value.
Definition: cap.h:481
CAP_ECCTL2_REARM_BITS
#define CAP_ECCTL2_REARM_BITS
Defines the location of the REARM bits in the ECCTL2 register.
Definition: cap.h:152
CAP_Prescale_By_36
Divide by 36.
Definition: cap.h:238
CAP_Prescale_By_58
Divide by 58.
Definition: cap.h:249
CAP_Polarity_e
CAP_Polarity_e
Enumeration to define the capture (CAP) event polarities.
Definition: cap.h:285
CAP_Prescale_By_46
Divide by 46.
Definition: cap.h:243
CAP_Event_2
Capture Event 2.
Definition: cap.h:278
CAP_Int_Type_CEVT1
Denotes CEVT1 interrupt.
Definition: cap.h:211
CAP_Prescale_By_60
Divide by 60.
Definition: cap.h:250
CAP_disableTimestampCounter
void CAP_disableTimestampCounter(CAP_Handle capHandle)
Disables Time Stamp counter from running.
Definition: cap.c:102
CAP_Reset_e
CAP_Reset_e
Enumeration to define the capture (CAP) event resets.
Definition: cap.h:294
CAP_rearm
static void CAP_rearm(CAP_Handle capHandle)
(Re-)Arm the capture module
Definition: cap.h:437
CAP_RunMode_e
CAP_RunMode_e
Enumeration to define the pulse width modulation (PWM) run modes.
Definition: cap.h:256
CAP_Int_Type_CEVT4
Denotes CEVT4 interrupt.
Definition: cap.h:208
_CAP_Obj_::ECCTL2
volatile uint16_t ECCTL2
Capture Control Register 2.
Definition: cap.h:322
CAP_Prescale_By_2
Divide by 2.
Definition: cap.h:221
CAP_getCap4
static uint32_t CAP_getCap4(CAP_Handle capHandle)
Gets the CAP4 register value.
Definition: cap.h:428
CAP_Polarity_Rising
Rising Edge Triggered.
Definition: cap.h:287
CAP_Prescale_By_48
Divide by 48.
Definition: cap.h:244
CAP_RunMode_SoftStopAfterCycle
Definition: cap.h:259
CAP_Polarity_Falling
Falling Edge Triggered.
Definition: cap.h:288
CAP_setApwmPeriod
static void CAP_setApwmPeriod(CAP_Handle capHandle, const uint32_t period)
Sets the APWM period.
Definition: cap.h:469
CAP_Int_Type_CTR_OVF
Denotes CTROVF interrupt.
Definition: cap.h:207
CAP_Event_3
Capture Event 3.
Definition: cap.h:279
CAP_RunMode_FreeRun
Definition: cap.h:260
CAP_init
CAP_Handle CAP_init(void *pMemory, const size_t numBytes)
Initializes the capture (CAP) object handle.
Definition: cap.c:56
CAP_Prescale_By_44
Divide by 44.
Definition: cap.h:242
CAP_Stop_Wrap_CEVT3
Stop/Wrap after Capture Event 3.
Definition: cap.h:269
CAP_enableInt
void CAP_enableInt(CAP_Handle capHandle, const CAP_Int_Type_e intType)
Enables capture (CAP) interrupt source.
Definition: cap.c:122
_CAP_Obj_::ECECLR
volatile uint16_t ECECLR
Capture Interrupt Clear Register.
Definition: cap.h:325
CAP_Stop_Wrap_CEVT4
Stop/Wrap after Capture Event 4.
Definition: cap.h:270
CAP_Event_e
CAP_Event_e
Enumeration to define the capture (CAP) events.
Definition: cap.h:275
_CAP_Obj_::Rsvd_1
volatile uint16_t Rsvd_1[8]
Reserved.
Definition: cap.h:320
CAP_Int_Type_Global
Denotes Capture global interrupt.
Definition: cap.h:212
CAP_setCapContinuous
void CAP_setCapContinuous(CAP_Handle capHandle)
Sets up for continuous Capture.
Definition: cap.c:180
CAP_setCapOneShot
void CAP_setCapOneShot(CAP_Handle capHandle)
Sets up for one-shot Capture.
Definition: cap.c:191