MSP430™CapTIvateSoftwareLibraryAPIGuide  1_70_00_03
FunctionTimer.h
Go to the documentation of this file.
1 //*****************************************************************************
2 // FunctionTimer.h
3 //
5 //
12 //
15 //
16 //*****************************************************************************
17 //*****************************************************************************
20 //*****************************************************************************
21 
22 #ifndef FUNCTIONTIMER_H_
23 #define FUNCTIONTIMER_H_
24 
26 
27 #if (FUNCTIONTIMER__ENABLE==true)
28 
29 //*****************************************************************************
30 //
32 //
33 //*****************************************************************************
37 };
38 
39 //*****************************************************************************
40 //
45 //
46 //*****************************************************************************
47 typedef struct
48 {
49  //
52  //
54 
55  //
59  //
60  bool (*pbFunction_A)(void);
61 
62  //
65  //
67 
68  //
72  //
73  bool (*pbFunction_B)(void);
74 
76 
77 //*****************************************************************************
78 //
81 //
84 //
85 //*****************************************************************************
86 #if (FUNCTIONTIMER__PERIPHERAL==TIMER_A0_BASE)
87 #define TIMER__CCR0_VECTOR (TIMER0_A0_VECTOR)
88 #define TIMER__CCR1_VECTOR (TIMER0_A1_VECTOR)
89 #elif (FUNCTIONTIMER__PERIPHERAL==TIMER_A1_BASE)
90 #define TIMER__CCR0_VECTOR (TIMER1_A0_VECTOR)
91 #define TIMER__CCR1_VECTOR (TIMER1_A1_VECTOR)
92 #elif (FUNCTIONTIMER__PERIPHERAL==TIMER_A2_BASE)
93 #define TIMER__CCR0_VECTOR (TIMER2_A0_VECTOR)
94 #define TIMER__CCR1_VECTOR (TIMER2_A1_VECTOR)
95 #elif (FUNCTIONTIMER__PERIPHERAL==TIMER_A3_BASE)
96 #define TIMER__CCR0_VECTOR (TIMER3_A0_VECTOR)
97 #define TIMER__CCR1_VECTOR (TIMER3_A1_VECTOR)
98 #else
99 #error INVALID_TIMERA_SELECTION
100 #endif
101 
102 //*****************************************************************************
103 //
107 //
112 //
113 //*****************************************************************************
114 extern void Timer_startDelayedFunctionTimer(const tFunctionTimer *pFunctionTimer);
115 
116 //*****************************************************************************
117 //
119 //
124 //
125 //*****************************************************************************
126 extern void Timer_stopDelayedFunctionTimer(void);
127 
128 //*****************************************************************************
129 //
132 //
136 //
137 //*****************************************************************************
138 extern void Timer_scheduleDelayedFunction(uint8_t ui8Function);
139 
140 //*****************************************************************************
141 //
144 //
148 //
149 //*****************************************************************************
150 extern void Timer_cancelDelayedFunction(uint8_t ui8Function);
151 
152 #endif /* FUNCTIONTIMER__ENABLE */
153 
154 #endif /* FUNCTIONTIMER_DEF_H_ */
155 
156 //*****************************************************************************
159 //*****************************************************************************
void Timer_cancelDelayedFunction(uint8_t ui8Function)
Definition: FunctionTimer.c:75
Definition: FunctionTimer.h:35
void Timer_stopDelayedFunctionTimer(void)
This function stops the Timer_A.
Definition: FunctionTimer.c:46
Definition: FunctionTimer.h:47
tFunctionTimerSelection
enumerates the available function delays.
Definition: FunctionTimer.h:34
void Timer_startDelayedFunctionTimer(const tFunctionTimer *pFunctionTimer)
Definition: FunctionTimer.c:35
Definition: FunctionTimer.h:36
uint16_t ui16FunctionDelay_B
Definition: FunctionTimer.h:66
void Timer_scheduleDelayedFunction(uint8_t ui8Function)
Definition: FunctionTimer.c:51
uint16_t ui16FunctionDelay_A
Definition: FunctionTimer.h:53
© Copyright 1995-2018, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale