iLLD_TC27xD  1.0
IfxGpt12.h
Go to the documentation of this file.
1 /**
2  * \file IfxGpt12.h
3  * \brief GPT12 basic functionality
4  * \ingroup IfxLld_Gpt12
5  *
6  * \version iLLD_1_0_0_11_0
7  * \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
8  *
9  *
10  * IMPORTANT NOTICE
11  *
12  *
13  * Infineon Technologies AG (Infineon) is supplying this file for use
14  * exclusively with Infineon's microcontroller products. This file can be freely
15  * distributed within development tools that are supporting such microcontroller
16  * products.
17  *
18  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21  * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
22  * OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
23  *
24  * \defgroup IfxLld_Gpt12_Std_Enumerations Enumerations
25  * \ingroup IfxLld_Gpt12_Std
26  * \defgroup IfxLld_Gpt12_Std_InterruptFunctions Interrupt Functions
27  * \ingroup IfxLld_Gpt12_Std
28  * \defgroup IfxLld_Gpt12_Std_ConfigurationFunctions Configuration Functions
29  * \ingroup IfxLld_Gpt12_Std
30  * \defgroup IfxLld_Gpt12_Std_UtilityFunctions Utility Functions
31  * \ingroup IfxLld_Gpt12_Std
32  * \defgroup IfxLld_Gpt12_Std_OperativeFunctions Operative Functions
33  * \ingroup IfxLld_Gpt12_Std
34  */
35 
36 #ifndef IFXGPT12_H
37 #define IFXGPT12_H 1
38 
39 /******************************************************************************/
40 /*----------------------------------Includes----------------------------------*/
41 /******************************************************************************/
42 
43 #include "_Impl/IfxGpt12_cfg.h"
44 #include "Src/Std/IfxSrc.h"
45 #include "_Utilities/Ifx_Assert.h"
46 #include "Scu/Std/IfxScuCcu.h"
47 #include "IfxGpt12_reg.h"
49 
50 /******************************************************************************/
51 /*--------------------------------Enumerations--------------------------------*/
52 /******************************************************************************/
53 
54 /** \addtogroup IfxLld_Gpt12_Std_Enumerations
55  * \{ */
56 /** \brief Input Select for CAPIN \n
57  * Definition in IfxGPT12.PISEL.B.ISCAPIN
58  */
59 typedef enum
60 {
61  IfxGpt12_CaptureInput_A = 0, /**< \brief signal CAPINA selected */
62  IfxGpt12_CaptureInput_B = 1, /**< \brief signal CAPINB selected */
63  IfxGpt12_CaptureInput_C = 2, /**< \brief signal CAPINC selected */
64  IfxGpt12_CaptureInput_D = 3 /**< \brief signal CAPIND selected */
66 
67 /** \brief Tx Input Edge Selection (Capture Mode, x=2,4)
68  */
69 typedef enum
70 {
71  IfxGpt12_CaptureInputMode_none = 0, /**< \brief None, Counter is disabled */
72  IfxGpt12_CaptureInputMode_risingEdgeTxIN = 1, /**< \brief rising edge on TxIN */
73  IfxGpt12_CaptureInputMode_fallingEdgeTxIN = 2, /**< \brief falling edge on TxIN */
74  IfxGpt12_CaptureInputMode_bothEdgesTxIN = 3 /**< \brief (rising or falling edge) on TxIN */
76 
77 /** \brief Capture Trigger Enable \n
78  * Definition in IfxGPT12.T5CON.B.CT3
79  */
80 typedef enum
81 {
82  IfxGpt12_CaptureTrigger_capin = 0, /**< \brief Capture Trigger Enable from CAPIN */
83  IfxGpt12_CaptureTrigger_t3inOrT3EUD = 1 /**< \brief Capture Trigger Enable from T3IN/T3EUD */
85 
86 /** \brief Capture Trigger Selection \n
87  * Definition in IfxGPT12.T5CON.B.CI
88  */
89 typedef enum
90 {
91  IfxGpt12_CaptureTriggerMode_disabled = 0, /**< \brief capture disabled */
92  IfxGpt12_CaptureTriggerMode_risingEdge = 1, /**< \brief positive Transition on CAPIN or any Transition on T3IN */
93  IfxGpt12_CaptureTriggerMode_fallingEdge = 2, /**< \brief negative Transition on CAPIN or any Transition on T3EUD */
94  IfxGpt12_CaptureTriggerMode_randomEdge = 3 /**< \brief Any Transition on CAPIN or any Transition on T3IN/T3EUD */
96 
97 /** \brief Input Edge Selection for counter mode\n
98  * Definition in IfxGPT12.TxCON.B.TxI (x = 2 to 6)
99  */
100 typedef enum
101 {
102  IfxGpt12_CounterInputMode_counterDisabled = 0, /**< \brief Counter Tx is disabled */
103  IfxGpt12_CounterInputMode_risingEdgeTxIN = 1, /**< \brief rising edge on TxIN */
104  IfxGpt12_CounterInputMode_fallingEdgeTxIN = 2, /**< \brief falling edge on TxIN */
105  IfxGpt12_CounterInputMode_bothEdgesTxIN = 3, /**< \brief rising or falling edge on TxIN */
106  IfxGpt12_CounterInputMode_risingEdgeTxOTL = 5, /**< \brief rising edge of TxOTL (x=3,6) */
107  IfxGpt12_CounterInputMode_fallingEdgeTxOTL = 6, /**< \brief falling edge of TxOTL */
108  IfxGpt12_CounterInputMode_bothEdgesTxOTL = 7 /**< \brief rising or falling edge of TxOTL */
110 
111 /** \brief Input Select for TxEUD \n
112  * Definition in IfxGPT12.PISEL.B.ISTxEUD (x = 2 to 4)
113  */
114 typedef enum
115 {
116  IfxGpt12_EudInput_A = 0, /**< \brief signal TXEUDA selected */
117  IfxGpt12_EudInput_B = 1, /**< \brief signal TXEUDB selected */
118  IfxGpt12_EudInput_C = 2, /**< \brief signal TXEUDC selected */
119  IfxGpt12_EudInput_D = 3 /**< \brief signal TXEUDD selected */
121 
122 /** \brief GPT1 block prescaler Selection\n
123  * Definition in IfxGPT12.T3CON.B.BPS1
124  */
125 typedef enum
126 {
127  IfxGpt12_Gpt1BlockPrescaler_8 = 0, /**< \brief fGPT/8 */
128  IfxGpt12_Gpt1BlockPrescaler_4 = 1, /**< \brief fGPT/4 */
129  IfxGpt12_Gpt1BlockPrescaler_32 = 2, /**< \brief fGPT/32 */
130  IfxGpt12_Gpt1BlockPrescaler_16 = 3 /**< \brief fGPT/16 */
132 
133 /** \brief Gpt2 block prescaler Selection\n
134  * Definition in IfxGPT12.T6CON.B.BPS2
135  */
136 typedef enum
137 {
138  IfxGpt12_Gpt2BlockPrescaler_4 = 0, /**< \brief fGPT/4 */
139  IfxGpt12_Gpt2BlockPrescaler_2 = 1, /**< \brief fGPT/2 */
140  IfxGpt12_Gpt2BlockPrescaler_16 = 2, /**< \brief fGPT/16 */
141  IfxGpt12_Gpt2BlockPrescaler_8 = 3 /**< \brief fGPT/8 */
143 
144 /** \brief Input Edge Selection for Incremental Interface mode\n
145  * Definition in IfxGPT12.TxCON.B.TxI (x=2, 3 and 4)
146  */
147 typedef enum
148 {
149  IfxGpt12_IncrementalInterfaceInputMode_stopCounterTx = 0, /**< \brief Counter Tx Stop */
150  IfxGpt12_IncrementalInterfaceInputMode_bothEdgesTxIN = 1, /**< \brief (rising or falling edge) on TxIN */
151  IfxGpt12_IncrementalInterfaceInputMode_bothEdgesTxEUD = 2, /**< \brief (rising or falling edge) on TxEUD */
152  IfxGpt12_IncrementalInterfaceInputMode_bothEdgesTxINOrTxEUD = 3 /**< \brief (rising or falling edge) on any Tx input (TxIN or TxEUD) */
154 
155 /** \brief Input Select for TxIN \n
156  * Definition in IfxGPT12.PISEL.B.ISTxIN (x = 2 to 4)
157  */
158 typedef enum
159 {
160  IfxGpt12_Input_A = 0, /**< \brief signal TXINA selected */
161  IfxGpt12_Input_B = 1, /**< \brief signal TXINB selected */
162  IfxGpt12_Input_C = 2, /**< \brief signal TXINC selected */
163  IfxGpt12_Input_D = 3 /**< \brief signal TXIND selected */
165 
166 /** \brief Timer operating mode \n
167  * Definition in IfxGPT12.TxCON.B.TxM (x = 2 to 4)
168  */
169 typedef enum
170 {
171  IfxGpt12_Mode_timer = 0, /**< \brief Timer Mode selected */
172  IfxGpt12_Mode_counter = 1, /**< \brief Counter Mode selected */
173  IfxGpt12_Mode_lowGatedTimer = 2, /**< \brief Low Gated Timer Mode selected */
174  IfxGpt12_Mode_highGatedTimer = 3, /**< \brief High Gated Timer Mode selected */
175  IfxGpt12_Mode_reload = 4, /**< \brief Reload Mode selected */
176  IfxGpt12_Mode_capture = 5, /**< \brief Capture Mode selected */
177  IfxGpt12_Mode_incrementalInterfaceRotationDetection = 6, /**< \brief Incremental Interface Mode selected */
178  IfxGpt12_Mode_incrementalInterfaceEdgeDetection = 7 /**< \brief Incremental Interface Mode selected */
179 } IfxGpt12_Mode;
180 
181 /** \brief Input Edge Selection for reload mode\n
182  * Definition in IfxGPT12.TxCON.B.TxI (x = 2 and 4)
183  */
184 typedef enum
185 {
186  IfxGpt12_ReloadInputMode_counterDisabled = 0, /**< \brief Counter Tx is disabled */
187  IfxGpt12_ReloadInputMode_risingEdgeTxIN = 1, /**< \brief rising edge on TxIN */
188  IfxGpt12_ReloadInputMode_fallingEdgeTxIN = 2, /**< \brief falling edge on TxIN */
189  IfxGpt12_ReloadInputMode_bothEdgesTxIN = 3, /**< \brief rising or falling edge on TxIN */
190  IfxGpt12_ReloadInputMode_risingEdgeTxOTL = 5, /**< \brief rising edge of Tx toggle latch TxOTL */
191  IfxGpt12_ReloadInputMode_fallingEdgeTxOTL = 6, /**< \brief falling edge of Tx toggle latch TxOTL */
192  IfxGpt12_ReloadInputMode_bothEdgesTxOTL = 7 /**< \brief rising or falling edge of Tx toggle latch TxOTL */
194 
195 /** \brief Enable/disable the sensitivity of the module to sleep signal\n
196  * Definition in Ifx_GPT12.CLC.B.EDIS
197  */
198 typedef enum
199 {
200  IfxGpt12_SleepMode_enable = 0, /**< \brief enables sleep mode */
201  IfxGpt12_SleepMode_disable = 1 /**< \brief disables sleep mode */
203 
204 /** \brief Timer Count Direction\n
205  * Definition in IfxGPT12.TxCON.B.TxUD (x=2 to 6)
206  */
207 typedef enum
208 {
209  IfxGpt12_TimerDirection_up = 0, /**< \brief Timer Up Direction selected */
210  IfxGpt12_TimerDirection_down = 1 /**< \brief Timer Down Direction selected */
212 
213 /** \brief Timer count direction control source\n
214  * Definition in IfxGPT12.TxCON.B.TxUDE (x=2 to 6)
215  */
216 typedef enum
217 {
218  IfxGpt12_TimerDirectionSource_internal = 0, /**< \brief Timer Dir Control = TxUD (x=2,3,4) */
219  IfxGpt12_TimerDirectionSource_external = 1 /**< \brief Timer Dir Control = TxUD (x=2,3,4) */
221 
222 /** \brief Input prescaler Selection for the timer\n
223  * Definition in IfxGPT12.TxCON.B.TxI (x = 2 to 4)
224  */
225 typedef enum
226 {
236 
237 /** \brief Timer Remote Control enable choice \n
238  * Definition in IfxGPT12.TxCON.B.TxRC (x = 2 and 4)
239  */
240 typedef enum
241 {
242  IfxGpt12_TimerRemoteControl_off = 0, /**< \brief T2 RemoteControl Off */
243  IfxGpt12_TimerRemoteControl_on = 1 /**< \brief T2 RemoteControl On */
245 
246 /** \brief Timer Run / stop control choice (only if TxCON.B.TxRC = 0)\n
247  * Definition in IfxGPT12.TxCON.B.TxR (x = 2 to 6)
248  */
249 typedef enum
250 {
251  IfxGpt12_TimerRun_stop = 0, /**< \brief Timer x Stops */
252  IfxGpt12_TimerRun_start = 1 /**< \brief Timer X Run */
254 
255 /** \} */
256 
257 /** \addtogroup IfxLld_Gpt12_Std_InterruptFunctions
258  * \{ */
259 
260 /******************************************************************************/
261 /*-------------------------Inline Function Prototypes-------------------------*/
262 /******************************************************************************/
263 
264 /** \brief Returns the address of Timer 2 service request
265  * \param gpt12 Pointer to module base address
266  * \return address of timer 2 Interrupt
267  */
268 IFX_INLINE volatile Ifx_SRC_SRCR *IfxGpt12_T2_getSrc(Ifx_GPT12 *gpt12);
269 
270 /** \brief Returns the address of Timer 3 service request
271  * \param gpt12 Pointer to module base address
272  * \return address of Timer 3 Interrupt
273  */
274 IFX_INLINE volatile Ifx_SRC_SRCR *IfxGpt12_T3_getSrc(Ifx_GPT12 *gpt12);
275 
276 /** \brief Returns the address of Timer 4 service request
277  * \param gpt12 Pointer to module base address
278  * \return address of timer 4 interrupt
279  */
280 IFX_INLINE volatile Ifx_SRC_SRCR *IfxGpt12_T4_getSrc(Ifx_GPT12 *gpt12);
281 
282 /** \brief Returns the address of Timer 5 service request
283  * \param gpt12 Pointer to module base address
284  * \return address of Timer 5 Interrupt
285  */
286 IFX_INLINE volatile Ifx_SRC_SRCR *IfxGpt12_T5_getSrc(Ifx_GPT12 *gpt12);
287 
288 /** \brief Returns the address of Timer 6 service request
289  * \param gpt12 Pointer to module base address
290  * \return address of Timer 6 interrupt
291  */
292 IFX_INLINE volatile Ifx_SRC_SRCR *IfxGpt12_T6_getSrc(Ifx_GPT12 *gpt12);
293 
294 /** \brief Returns the address of capture service request
295  * \param gpt12 Pointer to module base address
296  * \return address of capture Interrupt
297  */
298 IFX_INLINE volatile Ifx_SRC_SRCR *IfxGpt12_getCaptureSrc(Ifx_GPT12 *gpt12);
299 
300 /** \} */
301 
302 /** \addtogroup IfxLld_Gpt12_Std_ConfigurationFunctions
303  * \{ */
304 
305 /******************************************************************************/
306 /*-------------------------Inline Function Prototypes-------------------------*/
307 /******************************************************************************/
308 
309 /** \brief Sets the input edge selection for the capture mode of the T2 timer
310  * \param gpt12 Pointer to module base address
311  * \param inputMode input prescaler value in capture mode
312  * \return None
313  */
315 
316 /** \brief Sets the input edge selection for the counter mode of the T2 timer
317  * \param gpt12 Pointer to module base address
318  * \param inputMode input edge selection in counter mode
319  * \return None
320  */
322 
323 /** \brief Sets the T2 timer count direction source internal / external
324  * \param gpt12 Pointer to module base address
325  * \param source direction source
326  * \return None
327  */
329 
330 /** \brief Sets the EUD input for the T2 timer
331  * \param gpt12 Pointer to module base address
332  * \param input Select the EUD input signal
333  * \return None
334  */
335 IFX_INLINE void IfxGpt12_T2_setEudInput(Ifx_GPT12 *gpt12, IfxGpt12_EudInput input);
336 
337 /** \brief Sets the input edge selection for the incremental interface mode of the T2 timer
338  * \param gpt12 Pointer to module base address
339  * \param inputMode input edge selection in IIM mode
340  * \return None
341  */
343 
344 /** \brief Sets the input for the T2 timer
345  * \param gpt12 Pointer to module base address
346  * \param input Select the Input signal
347  * \return None
348  */
349 IFX_INLINE void IfxGpt12_T2_setInput(Ifx_GPT12 *gpt12, IfxGpt12_Input input);
350 
351 /** \brief Enables / Disables the interrupt generation of the T2 timer
352  * \param gpt12 pointer to module base address
353  * \param enabled Enable/Disable choice
354  * \return None
355  */
356 IFX_INLINE void IfxGpt12_T2_setInterruptEnable(Ifx_GPT12 *gpt12, boolean enabled);
357 
358 /** \brief Sets the mode of operation od T2 timer
359  * \param gpt12 Pointer to module base address
360  * \param mode Select the mode of operation
361  * \return None
362  */
363 IFX_INLINE void IfxGpt12_T2_setMode(Ifx_GPT12 *gpt12, IfxGpt12_Mode mode);
364 
365 /** \brief Sets the input edge selection for the reload mode of the T2 timer
366  * \param gpt12 Pointer to module base address
367  * \param inputMode input prescaler value in reload mode
368  * \return None
369  */
370 IFX_INLINE void IfxGpt12_T2_setReloadInputMode(Ifx_GPT12 *gpt12, IfxGpt12_ReloadInputMode inputMode);
371 
372 /** \brief Sets the remote control of the T2 timer
373  * \param gpt12 pointer to module base address
374  * \param control enable the remote control
375  * \return None
376  */
378 
379 /** \brief Sets the T2 timer count direction
380  * \param gpt12 Pointer to module base address
381  * \param direction select the Timer direction
382  * \return None
383  */
384 IFX_INLINE void IfxGpt12_T2_setTimerDirection(Ifx_GPT12 *gpt12, IfxGpt12_TimerDirection direction);
385 
386 /** \brief Sets the input prescaler for the Timer mode and Gated timer mode of T2 timer
387  * \param gpt12 Pointer to module base address
388  * \param inputPrescaler input prescaler value in timer mode and gated timer mode
389  * \return None
390  */
391 IFX_INLINE void IfxGpt12_T2_setTimerPrescaler(Ifx_GPT12 *gpt12, IfxGpt12_TimerInputPrescaler inputPrescaler);
392 
393 /** \brief Enable / Disable the T3 Output on pin T3OUT
394  * \param gpt12 Pointer to module base address
395  * \param enable enable / disable choice for T3OE
396  * \return None
397  */
398 IFX_INLINE void IfxGpt12_T3_enableOutput(Ifx_GPT12 *gpt12, boolean enable);
399 
400 /** \brief Sets the input edge selection for the counter mode of the T3 timer
401  * \param gpt12 Pointer to module base address
402  * \param inputMode input edge selection in counter mode
403  * \return None
404  */
406 
407 /** \brief Sets the T3 timer count direction source internal / external
408  * \param gpt12 Pointer to module base address
409  * \param source direction source
410  * \return None
411  */
413 
414 /** \brief Sets the EUD input for the T3 timer
415  * \param gpt12 Pointer to module base address
416  * \param input Select the EUD input signal
417  * \return None
418  */
419 IFX_INLINE void IfxGpt12_T3_setEudInput(Ifx_GPT12 *gpt12, IfxGpt12_EudInput input);
420 
421 /** \brief Sets the input edge selection for the incremental interface mode of the T3 timer
422  * \param gpt12 Pointer to module base address
423  * \param inputMode input edge selection in IIM mode
424  * \return None
425  */
427 
428 /** \brief Sets the input for the T3 timer
429  * \param gpt12 Pointer to module base address
430  * \param input Select the Input signal
431  * \return None
432  */
433 IFX_INLINE void IfxGpt12_T3_setInput(Ifx_GPT12 *gpt12, IfxGpt12_Input input);
434 
435 /** \brief Sets the mode of operation od T3 timer
436  * \param gpt12 Pointer to module base address
437  * \param mode Select the mode of operation
438  * \return None
439  */
440 IFX_INLINE void IfxGpt12_T3_setMode(Ifx_GPT12 *gpt12, IfxGpt12_Mode mode);
441 
442 /** \brief Sets the T3 timer count direction
443  * \param gpt12 Pointer to module base address
444  * \param direction select the Timer direction
445  * \return None
446  */
447 IFX_INLINE void IfxGpt12_T3_setTimerDirection(Ifx_GPT12 *gpt12, IfxGpt12_TimerDirection direction);
448 
449 /** \brief Sets the input prescaler for the Timer mode and Gated timer mode of T3 timer
450  * \param gpt12 Pointer to module base address
451  * \param inputPrescaler input prescaler value in timer mode and gated timer mode
452  * \return None
453  */
454 IFX_INLINE void IfxGpt12_T3_setTimerPrescaler(Ifx_GPT12 *gpt12, IfxGpt12_TimerInputPrescaler inputPrescaler);
455 
456 /** \brief Enables / Disables the clear timer T2 bit of the T4 timer
457  * \param gpt12 pointer to module base address
458  * \param enabled Enable/Disable choice
459  * \return None
460  */
461 IFX_INLINE void IfxGpt12_T4_enableClearTimerT2(Ifx_GPT12 *gpt12, boolean enabled);
462 
463 /** \brief Enables / Disables the clear timer T3 bit of the T4 timer
464  * \param gpt12 pointer to module base address
465  * \param enabled Enable/Disable choice
466  * \return None
467  */
468 IFX_INLINE void IfxGpt12_T4_enableClearTimerT3(Ifx_GPT12 *gpt12, boolean enabled);
469 
470 /** \brief Sets the input edge selection for the capture mode of the T4 timer
471  * \param gpt12 Pointer to module base address
472  * \param inputMode input prescaler value in capture mode
473  * \return None
474  */
476 
477 /** \brief Sets the input edge selection for the counter mode of the T4 timer
478  * \param gpt12 Pointer to module base address
479  * \param inputMode input edge selection in counter mode
480  * \return None
481  */
483 
484 /** \brief Sets the T4 timer count direction source internal / external
485  * \param gpt12 Pointer to module base address
486  * \param source direction source
487  * \return None
488  */
490 
491 /** \brief Sets the EUD input for the T4 timer
492  * \param gpt12 Pointer to module base address
493  * \param input Select the EUD input signal
494  * \return None
495  */
496 IFX_INLINE void IfxGpt12_T4_setEudInput(Ifx_GPT12 *gpt12, IfxGpt12_EudInput input);
497 
498 /** \brief Sets the input edge selection for the incremental interface mode of the T4 timer
499  * \param gpt12 Pointer to module base address
500  * \param inputMode input edge selection in IIM mode
501  * \return None
502  */
504 
505 /** \brief Sets the input for the T4 timer
506  * \param gpt12 Pointer to module base address
507  * \param input Select the Input signal
508  * \return None
509  */
510 IFX_INLINE void IfxGpt12_T4_setInput(Ifx_GPT12 *gpt12, IfxGpt12_Input input);
511 
512 /** \brief Enables / Disables the interrupt generation of the T4 timer
513  * \param gpt12 pointer to module base address
514  * \param enabled Enable/Disable choice
515  * \return None
516  */
517 IFX_INLINE void IfxGpt12_T4_setInterruptEnable(Ifx_GPT12 *gpt12, boolean enabled);
518 
519 /** \brief Sets the mode of operation od T4 timer
520  * \param gpt12 Pointer to module base address
521  * \param mode Select the mode of operation
522  * \return None
523  */
524 IFX_INLINE void IfxGpt12_T4_setMode(Ifx_GPT12 *gpt12, IfxGpt12_Mode mode);
525 
526 /** \brief Sets the input edge selection for the reload mode of the T4 timer
527  * \param gpt12 Pointer to module base address
528  * \param inputMode input prescaler value in reload mode
529  * \return None
530  */
531 IFX_INLINE void IfxGpt12_T4_setReloadInputMode(Ifx_GPT12 *gpt12, IfxGpt12_ReloadInputMode inputMode);
532 
533 /** \brief Sets the remote control of the T4 timer
534  * \param gpt12 pointer to module base address
535  * \param control enable the remote control
536  * \return None
537  */
539 
540 /** \brief Sets the T4 timer count direction
541  * \param gpt12 Pointer to module base address
542  * \param direction select the Timer direction
543  * \return None
544  */
545 IFX_INLINE void IfxGpt12_T4_setTimerDirection(Ifx_GPT12 *gpt12, IfxGpt12_TimerDirection direction);
546 
547 /** \brief Sets the input prescaler for the Timer mode and Gated timer mode of T4 timer
548  * \param gpt12 Pointer to module base address
549  * \param inputPrescaler input prescaler value in timer mode and gated timer mode
550  * \return None
551  */
552 IFX_INLINE void IfxGpt12_T4_setTimerPrescaler(Ifx_GPT12 *gpt12, IfxGpt12_TimerInputPrescaler inputPrescaler);
553 
554 /** \brief Enables / Disables the clear timer bit of the T5 timer
555  * \param gpt12 pointer to module base address
556  * \param enabled Enable/Disable choice
557  * \return None
558  */
559 IFX_INLINE void IfxGpt12_T5_enableClearTimer(Ifx_GPT12 *gpt12, boolean enabled);
560 
561 /** \brief Sets the capture trigger of teh T5 timer
562  * \param gpt12 Pointer to Module base address
563  * \param trigger Capture trigger
564  * \return None
565  */
567 
568 /** \brief Enables / Disables the capture trigger of the T5 timer
569  * \param gpt12 pointer to module base address
570  * \param enabled Enable/Disable choice
571  * \return None
572  */
573 IFX_INLINE void IfxGpt12_T5_setCaptureTriggerEnable(Ifx_GPT12 *gpt12, boolean enabled);
574 
575 /** \brief Sets the capture trigger mode of the T5 timer
576  * \param gpt12 Pointer to module base address
577  * \param mode Select the capture trigger mode
578  * \return None
579  */
581 
582 /** \brief Sets the input edge selection for the counter mode of the T5 timer
583  * \param gpt12 Pointer to module base address
584  * \param inputMode input edge selection in counter mode
585  * \return None
586  */
588 
589 /** \brief Sets the T5 timer count direction source internal / external
590  * \param gpt12 Pointer to module base address
591  * \param source direction source
592  * \return None
593  */
595 
596 /** \brief Sets the EUD input for the T5 timer
597  * \param gpt12 Pointer to module base address
598  * \param input Select the EUD input signal
599  * \return None
600  */
601 IFX_INLINE void IfxGpt12_T5_setEudInput(Ifx_GPT12 *gpt12, IfxGpt12_EudInput input);
602 
603 /** \brief Sets the input for the T5 timer
604  * \param gpt12 Pointer to module base address
605  * \param input Select the Input signal
606  * \return None
607  */
608 IFX_INLINE void IfxGpt12_T5_setInput(Ifx_GPT12 *gpt12, IfxGpt12_Input input);
609 
610 /** \brief Sets the mode of operation od T5 timer
611  * \param gpt12 Pointer to module base address
612  * \param mode Select the mode of operation
613  * \return None
614  */
615 IFX_INLINE void IfxGpt12_T5_setMode(Ifx_GPT12 *gpt12, IfxGpt12_Mode mode);
616 
617 /** \brief Sets the remote control of the T5 timer
618  * \param gpt12 pointer to module base address
619  * \param control enable the remote control
620  * \return None
621  */
623 
624 /** \brief Sets the T5 timer count direction
625  * \param gpt12 Pointer to module base address
626  * \param direction select the Timer direction
627  * \return None
628  */
629 IFX_INLINE void IfxGpt12_T5_setTimerDirection(Ifx_GPT12 *gpt12, IfxGpt12_TimerDirection direction);
630 
631 /** \brief Sets the input prescaler for the Timer mode and Gated timer mode of T5 timer
632  * \param gpt12 Pointer to module base address
633  * \param inputPrescaler input prescaler value in timer mode and gated timer mode
634  * \return None
635  */
636 IFX_INLINE void IfxGpt12_T5_setTimerPrescaler(Ifx_GPT12 *gpt12, IfxGpt12_TimerInputPrescaler inputPrescaler);
637 
638 /** \brief Enables / Disables the clear timer bit of the T6 timer
639  * \param gpt12 pointer to module base address
640  * \param enabled Enable/Disable choice
641  * \return None
642  */
643 IFX_INLINE void IfxGpt12_T6_enableClearTimer(Ifx_GPT12 *gpt12, boolean enabled);
644 
645 /** \brief Sets the input edge selection for the counter mode of the T6 timer
646  * \param gpt12 Pointer to module base address
647  * \param inputMode input edge selection in counter mode
648  * \return None
649  */
651 
652 /** \brief sets the T6 timer count direction source internal / external
653  * \param gpt12 Pointer to module base address
654  * \param source direction source
655  * \return None
656  */
658 
659 /** \brief Sets the EUD input for the T6 timer
660  * \param gpt12 Pointer to module base address
661  * \param input Select the EUD input signal
662  * \return None
663  */
664 IFX_INLINE void IfxGpt12_T6_setEudInput(Ifx_GPT12 *gpt12, IfxGpt12_EudInput input);
665 
666 /** \brief Sets the input for the T6 timer
667  * \param gpt12 Pointer to module base address
668  * \param input Select the Input signal
669  * \return None
670  */
671 IFX_INLINE void IfxGpt12_T6_setInput(Ifx_GPT12 *gpt12, IfxGpt12_Input input);
672 
673 /** \brief Sets the mode of operation od T6 timer
674  * \param gpt12 Pointer to module base address
675  * \param mode Select the mode of operation
676  * \return None
677  */
678 IFX_INLINE void IfxGpt12_T6_setMode(Ifx_GPT12 *gpt12, IfxGpt12_Mode mode);
679 
680 /** \brief sets the T6 timer count direction
681  * \param gpt12 Pointer to module base address
682  * \param direction select the Timer direction
683  * \return None
684  */
685 IFX_INLINE void IfxGpt12_T6_setTimerDirection(Ifx_GPT12 *gpt12, IfxGpt12_TimerDirection direction);
686 
687 /** \brief Sets the input prescaler for the Timer mode and Gated timer mode of T6 timer
688  * \param gpt12 Pointer to module base address
689  * \param inputPrescaler input prescaler value in timer mode and gated timer mode
690  * \return None
691  */
692 IFX_INLINE void IfxGpt12_T6_setTimerPrescaler(Ifx_GPT12 *gpt12, IfxGpt12_TimerInputPrescaler inputPrescaler);
693 
694 /** \brief Initializes a Capin_In input
695  * \param capIn the TxIn Pin which should be configured
696  * \param inputMode the pin input mode which should be configured
697  * \return None
698  */
700 
701 /** \brief Initializes a SLSO output
702  * \param txOut the TxOUT Pin which should be configured
703  * \param outputMode the pin output mode which should be configured
704  * \param padDriver the pad driver mode which should be configured
705  * \return None
706  */
708 
709 /** \brief Sets the capture input
710  * \param gpt12 Pointer to Module base address
711  * \param input Select the capture input signal
712  * \return None
713  */
714 IFX_INLINE void IfxGpt12_setCaptureInput(Ifx_GPT12 *gpt12, IfxGpt12_CaptureInput input);
715 
716 /** \brief Sets the GPT1 block prescaler
717  * \param gpt12 Pointer to module base address
718  * \param bps1 Select the GPT1 block Prescaler
719  * \return None
720  */
722 
723 /** \brief Sets the GPT2 block prescaler
724  * \param gpt12 Pointer to module base address
725  * \param bps2 Select the GPT2 block Prescaler
726  * \return None
727  */
729 
730 /******************************************************************************/
731 /*-------------------------Global Function Prototypes-------------------------*/
732 /******************************************************************************/
733 
734 /** \brief Enables the module
735  * \param gpt12 Pointer to module base address
736  * \return None
737  */
738 IFX_EXTERN void IfxGpt12_enableModule(Ifx_GPT12 *gpt12);
739 
740 /** \brief Initializes a TxEUDIn_IN input
741  * \param txEudIn the TxEUD_IN Pin which should be configured
742  * \param inputMode the pin input mode which should be configured
743  * \return None
744  */
746 
747 /** \brief Initializes a TxIn input
748  * \param txIn the TxIn Pin which should be configured
749  * \param inputMode the pin input mode which should be configured
750  * \return None
751  */
753 
754 /** \} */
755 
756 /** \addtogroup IfxLld_Gpt12_Std_UtilityFunctions
757  * \{ */
758 
759 /******************************************************************************/
760 /*-------------------------Inline Function Prototypes-------------------------*/
761 /******************************************************************************/
762 
763 /** \brief Returns the operating mode of the T2 timer
764  * \param gpt12 Pointer to module base address
765  * \return mode of operation
766  */
768 
769 /** \brief Returns the timer value of the T2 timer
770  * \param gpt12 Pointer to module base address
771  * \return timer current value
772  */
774 
775 /** \brief Returns the operating mode of the T3 timer
776  * \param gpt12 Pointer to module base address
777  * \return mode of operation
778  */
780 
781 /** \brief Returns the timer value of the T3 timer
782  * \param gpt12 Pointer to module base address
783  * \return timer current value
784  */
786 
787 /** \brief Returns the operating mode of the T4 timer
788  * \param gpt12 Pointer to module base address
789  * \return mode of operation
790  */
792 
793 /** \brief Returns the timer value of the T4 timer
794  * \param gpt12 Pointer to module base address
795  * \return timer current value
796  */
798 
799 /** \brief Returns the operating mode of the T5 timer
800  * \param gpt12 Pointer to module base address
801  * \return mode of operation
802  */
804 
805 /** \brief Returns the timer value of the T5 timer
806  * \param gpt12 Pointer to module base address
807  * \return timer current value
808  */
810 
811 /** \brief Returns the operating mode of the T6 timer
812  * \param gpt12 Pointer to module base address
813  * \return mode of operation
814  */
816 
817 /** \brief Returns the timer value of the T6 timer
818  * \param gpt12 Pointer to module base address
819  * \return timer current value
820  */
822 
823 /** \brief Returns the gpt12 module frequency
824  * \param gpt12 Pointer to module base address
825  * \return gpt12 module frequency
826  */
828 
829 /******************************************************************************/
830 /*-------------------------Global Function Prototypes-------------------------*/
831 /******************************************************************************/
832 
833 /** \brief Returns the frequency of the T2 timer
834  * \param gpt12 Pointer to Module base address
835  * \return frequency
836  */
838 
839 /** \brief Returns the frequency of the T3 timer
840  * \param gpt12 Pointer to Module base address
841  * \return frequency
842  */
844 
845 /** \brief Returns the frequency of the T4 timer
846  * \param gpt12 Pointer to Module base address
847  * \return frequency
848  */
850 
851 /** \brief Returns the frequency of the T5 timer
852  * \param gpt12 Pointer to Module base address
853  * \return frequency
854  */
856 
857 /** \brief Returns the frequency of the T6 timer
858  * \param gpt12 Pointer to Module base address
859  * \return frequency
860  */
862 
863 /** \} */
864 
865 /** \addtogroup IfxLld_Gpt12_Std_OperativeFunctions
866  * \{ */
867 
868 /******************************************************************************/
869 /*-------------------------Inline Function Prototypes-------------------------*/
870 /******************************************************************************/
871 
872 /** \brief Starts / stops the T2 Timer
873  * \param gpt12 Pointer to Module base address
874  * \param runTimer Start/stop Timer 2
875  * \return None
876  */
877 IFX_INLINE void IfxGpt12_T2_run(Ifx_GPT12 *gpt12, IfxGpt12_TimerRun runTimer);
878 
879 /** \brief Sets value for the T2 timer
880  * \param gpt12 pointer to module base address
881  * \param value Timer Value
882  * \return None
883  */
884 IFX_INLINE void IfxGpt12_T2_setTimerValue(Ifx_GPT12 *gpt12, uint16 value);
885 
886 /** \brief Starts / stops the T3 Timer
887  * \param gpt12 Pointer to module base address
888  * \param runTimer start/stop Timer 3
889  * \return None
890  */
891 IFX_INLINE void IfxGpt12_T3_run(Ifx_GPT12 *gpt12, IfxGpt12_TimerRun runTimer);
892 
893 /** \brief Sets value for the T3 Timer
894  * \param gpt12 pointer to module base address
895  * \param value Timer Value
896  * \return None
897  */
898 IFX_INLINE void IfxGpt12_T3_setTimerValue(Ifx_GPT12 *gpt12, uint16 value);
899 
900 /** \brief Starts / stops the T4 Timer
901  * \param gpt12 Pointer to module base address
902  * \param runTimer Start/stop Timer 4
903  * \return None
904  */
905 IFX_INLINE void IfxGpt12_T4_run(Ifx_GPT12 *gpt12, IfxGpt12_TimerRun runTimer);
906 
907 /** \brief Sets value for the T4 timer
908  * \param gpt12 pointer to module base address
909  * \param value Timer Value
910  * \return None
911  */
912 IFX_INLINE void IfxGpt12_T4_setTimerValue(Ifx_GPT12 *gpt12, uint16 value);
913 
914 /** \brief Starts / stops the T5 Timer
915  * \param gpt12 Pointer to module base address
916  * \param runTimer Start/stop Timer 5
917  * \return None
918  */
919 IFX_INLINE void IfxGpt12_T5_run(Ifx_GPT12 *gpt12, IfxGpt12_TimerRun runTimer);
920 
921 /** \brief Sets value for the T5 timer
922  * \param gpt12 pointer to module base address
923  * \param value Timer Value
924  * \return None
925  */
926 IFX_INLINE void IfxGpt12_T5_setTimerValue(Ifx_GPT12 *gpt12, uint16 value);
927 
928 /** \brief Starts / stops the T6 Timer
929  * \param gpt12 Pointer to module base address
930  * \param runTimer Start/stop Timer 6
931  * \return None
932  */
933 IFX_INLINE void IfxGpt12_T6_run(Ifx_GPT12 *gpt12, IfxGpt12_TimerRun runTimer);
934 
935 /** \brief Sets value for the T6 timer
936  * \param gpt12 pointer to module base address
937  * \param value Timer Value
938  * \return None
939  */
940 IFX_INLINE void IfxGpt12_T6_setTimerValue(Ifx_GPT12 *gpt12, uint16 value);
941 
942 /** \brief Sets the sensitivity of the module to sleep signal
943  * \param gpt12 pointer to GPT12 registers
944  * \param mode mode selection (enable/disable)
945  * \return None
946  */
947 IFX_INLINE void IfxGpt12_setSleepMode(Ifx_GPT12 *gpt12, IfxGpt12_SleepMode mode);
948 
949 /******************************************************************************/
950 /*-------------------------Global Function Prototypes-------------------------*/
951 /******************************************************************************/
952 
953 /** \brief resets GPT12 kernel
954  * \param gpt12 pointer to GPT12 registers
955  * \return None
956  */
957 IFX_EXTERN void IfxGpt12_resetModule(Ifx_GPT12 *gpt12);
958 
959 /** \} */
960 
961 /******************************************************************************/
962 /*---------------------Inline Function Implementations------------------------*/
963 /******************************************************************************/
964 
966 {
967  return (IfxGpt12_Mode)gpt12->T2CON.B.T2M;
968 }
969 
970 
971 IFX_INLINE volatile Ifx_SRC_SRCR *IfxGpt12_T2_getSrc(Ifx_GPT12 *gpt12)
972 {
973  return &MODULE_SRC.GPT12.GPT12[0].T2;
974 }
975 
976 
978 {
979  return (uint16)gpt12->T2.U;
980 }
981 
982 
983 IFX_INLINE void IfxGpt12_T2_run(Ifx_GPT12 *gpt12, IfxGpt12_TimerRun runTimer)
984 {
985  gpt12->T2CON.B.T2R = runTimer;
986 }
987 
988 
990 {
991  gpt12->T2CON.B.T2I = inputMode;
992 }
993 
994 
996 {
997  gpt12->T2CON.B.T2I = inputMode;
998 }
999 
1000 
1002 {
1003  gpt12->T2CON.B.T2UDE = source;
1004 }
1005 
1006 
1008 {
1009  IFX_ASSERT(IFX_VERBOSE_LEVEL_ERROR, input <= 1); /* wrong selection */
1010  gpt12->PISEL.B.IST2EUD = input;
1011 }
1012 
1013 
1015 {
1016  gpt12->T2CON.B.T2I = inputMode;
1017 }
1018 
1019 
1020 IFX_INLINE void IfxGpt12_T2_setInput(Ifx_GPT12 *gpt12, IfxGpt12_Input input)
1021 {
1022  IFX_ASSERT(IFX_VERBOSE_LEVEL_ERROR, input <= 1); /* wrong selection */
1023  gpt12->PISEL.B.IST2IN = input;
1024 }
1025 
1026 
1027 IFX_INLINE void IfxGpt12_T2_setInterruptEnable(Ifx_GPT12 *gpt12, boolean enabled)
1028 {
1029  gpt12->T2CON.B.T2IRDIS = enabled ? 0 : 1;
1030 }
1031 
1032 
1033 IFX_INLINE void IfxGpt12_T2_setMode(Ifx_GPT12 *gpt12, IfxGpt12_Mode mode)
1034 {
1035  gpt12->T2CON.B.T2M = mode;
1036 }
1037 
1038 
1040 {
1041  gpt12->T2CON.B.T2I = inputMode;
1042 }
1043 
1044 
1046 {
1047  gpt12->T2CON.B.T2RC = control;
1048 }
1049 
1050 
1052 {
1053  gpt12->T2CON.B.T2UD = direction;
1054 }
1055 
1056 
1058 {
1059  gpt12->T2CON.B.T2I = inputPrescaler;
1060 }
1061 
1062 
1063 IFX_INLINE void IfxGpt12_T2_setTimerValue(Ifx_GPT12 *gpt12, uint16 value)
1064 {
1065  gpt12->T2.U = value;
1066 }
1067 
1068 
1069 IFX_INLINE void IfxGpt12_T3_enableOutput(Ifx_GPT12 *gpt12, boolean enable)
1070 {
1071  gpt12->T3CON.B.T3OE = enable ? 1 : 0;
1072 }
1073 
1074 
1076 {
1077  return (IfxGpt12_Mode)gpt12->T3CON.B.T3M;
1078 }
1079 
1080 
1081 IFX_INLINE volatile Ifx_SRC_SRCR *IfxGpt12_T3_getSrc(Ifx_GPT12 *gpt12)
1082 {
1083  return &MODULE_SRC.GPT12.GPT12[0].T3;
1084 }
1085 
1086 
1088 {
1089  return (uint16)gpt12->T3.U;
1090 }
1091 
1092 
1093 IFX_INLINE void IfxGpt12_T3_run(Ifx_GPT12 *gpt12, IfxGpt12_TimerRun runTimer)
1094 {
1095  gpt12->T3CON.B.T3R = runTimer;
1096 }
1097 
1098 
1100 {
1101  IFX_ASSERT(IFX_VERBOSE_LEVEL_ERROR, inputMode <= IfxGpt12_CounterInputMode_bothEdgesTxIN); /* wrong selection */
1102  gpt12->T3CON.B.T3I = inputMode;
1103 }
1104 
1105 
1107 {
1108  gpt12->T3CON.B.T3UDE = source;
1109 }
1110 
1111 
1113 {
1114  gpt12->PISEL.B.IST3EUD = input;
1115 }
1116 
1117 
1119 {
1120  gpt12->T3CON.B.T3I = inputMode;
1121 }
1122 
1123 
1124 IFX_INLINE void IfxGpt12_T3_setInput(Ifx_GPT12 *gpt12, IfxGpt12_Input input)
1125 {
1126  gpt12->PISEL.B.IST3IN = input;
1127 }
1128 
1129 
1130 IFX_INLINE void IfxGpt12_T3_setMode(Ifx_GPT12 *gpt12, IfxGpt12_Mode mode)
1131 {
1132  IFX_ASSERT(IFX_VERBOSE_LEVEL_ERROR, ((mode != IfxGpt12_Mode_reload) && (mode != IfxGpt12_Mode_capture))); /* wrong selection */
1133  gpt12->T3CON.B.T3M = mode;
1134 }
1135 
1136 
1138 {
1139  gpt12->T3CON.B.T3UD = direction;
1140 }
1141 
1142 
1144 {
1145  gpt12->T3CON.B.T3I = inputPrescaler;
1146 }
1147 
1148 
1149 IFX_INLINE void IfxGpt12_T3_setTimerValue(Ifx_GPT12 *gpt12, uint16 value)
1150 {
1151  gpt12->T3.U = value;
1152 }
1153 
1154 
1155 IFX_INLINE void IfxGpt12_T4_enableClearTimerT2(Ifx_GPT12 *gpt12, boolean enabled)
1156 {
1157  gpt12->T4CON.B.CLRT2EN = enabled ? 1 : 0;
1158 }
1159 
1160 
1161 IFX_INLINE void IfxGpt12_T4_enableClearTimerT3(Ifx_GPT12 *gpt12, boolean enabled)
1162 {
1163  gpt12->T4CON.B.CLRT3EN = enabled ? 1 : 0;
1164 }
1165 
1166 
1168 {
1169  return (IfxGpt12_Mode)gpt12->T4CON.B.T4M;
1170 }
1171 
1172 
1173 IFX_INLINE volatile Ifx_SRC_SRCR *IfxGpt12_T4_getSrc(Ifx_GPT12 *gpt12)
1174 {
1175  return &MODULE_SRC.GPT12.GPT12[0].T4;
1176 }
1177 
1178 
1180 {
1181  return (uint16)gpt12->T4.U;
1182 }
1183 
1184 
1185 IFX_INLINE void IfxGpt12_T4_run(Ifx_GPT12 *gpt12, IfxGpt12_TimerRun runTimer)
1186 {
1187  gpt12->T4CON.B.T4R = runTimer;
1188 }
1189 
1190 
1192 {
1193  gpt12->T4CON.B.T4I = inputMode;
1194 }
1195 
1196 
1198 {
1199  gpt12->T4CON.B.T4I = inputMode;
1200 }
1201 
1202 
1204 {
1205  gpt12->T4CON.B.T4UDE = source;
1206 }
1207 
1208 
1210 {
1211  gpt12->PISEL.B.IST4EUD = input;
1212 }
1213 
1214 
1216 {
1217  gpt12->T4CON.B.T4I = inputMode;
1218 }
1219 
1220 
1221 IFX_INLINE void IfxGpt12_T4_setInput(Ifx_GPT12 *gpt12, IfxGpt12_Input input)
1222 {
1223  gpt12->PISEL.B.IST4IN = input;
1224 }
1225 
1226 
1227 IFX_INLINE void IfxGpt12_T4_setInterruptEnable(Ifx_GPT12 *gpt12, boolean enabled)
1228 {
1229  gpt12->T4CON.B.T4IRDIS = enabled ? 0 : 1;
1230 }
1231 
1232 
1233 IFX_INLINE void IfxGpt12_T4_setMode(Ifx_GPT12 *gpt12, IfxGpt12_Mode mode)
1234 {
1235  gpt12->T4CON.B.T4M = mode;
1236 }
1237 
1238 
1240 {
1241  gpt12->T4CON.B.T4I = inputMode;
1242 }
1243 
1244 
1246 {
1247  gpt12->T4CON.B.T4RC = control;
1248 }
1249 
1250 
1252 {
1253  gpt12->T4CON.B.T4UD = direction;
1254 }
1255 
1256 
1258 {
1259  gpt12->T4CON.B.T4I = inputPrescaler;
1260 }
1261 
1262 
1263 IFX_INLINE void IfxGpt12_T4_setTimerValue(Ifx_GPT12 *gpt12, uint16 value)
1264 {
1265  gpt12->T4.U = value;
1266 }
1267 
1268 
1269 IFX_INLINE void IfxGpt12_T5_enableClearTimer(Ifx_GPT12 *gpt12, boolean enabled)
1270 {
1271  gpt12->T5CON.B.T5CLR = enabled ? 1 : 0;
1272 }
1273 
1274 
1276 {
1277  return (IfxGpt12_Mode)gpt12->T5CON.B.T5M;
1278 }
1279 
1280 
1281 IFX_INLINE volatile Ifx_SRC_SRCR *IfxGpt12_T5_getSrc(Ifx_GPT12 *gpt12)
1282 {
1283  return &MODULE_SRC.GPT12.GPT12[0].T5;
1284 }
1285 
1286 
1288 {
1289  return (uint16)gpt12->T5.U;
1290 }
1291 
1292 
1293 IFX_INLINE void IfxGpt12_T5_run(Ifx_GPT12 *gpt12, IfxGpt12_TimerRun runTimer)
1294 {
1295  gpt12->T5CON.B.T5R = runTimer;
1296 }
1297 
1298 
1300 {
1301  gpt12->T5CON.B.CT3 = trigger;
1302 }
1303 
1304 
1305 IFX_INLINE void IfxGpt12_T5_setCaptureTriggerEnable(Ifx_GPT12 *gpt12, boolean enabled)
1306 {
1307  gpt12->T5CON.B.T5SC = enabled;
1308 }
1309 
1310 
1312 {
1313  gpt12->T5CON.B.CI = mode;
1314 }
1315 
1316 
1318 {
1319  gpt12->T5CON.B.T5I = inputMode;
1320 }
1321 
1322 
1324 {
1325  gpt12->T5CON.B.T5UDE = source;
1326 }
1327 
1328 
1330 {
1331  IFX_ASSERT(IFX_VERBOSE_LEVEL_ERROR, input <= 1); /* wrong selection */
1332  gpt12->PISEL.B.IST5EUD = input;
1333 }
1334 
1335 
1336 IFX_INLINE void IfxGpt12_T5_setInput(Ifx_GPT12 *gpt12, IfxGpt12_Input input)
1337 {
1338  IFX_ASSERT(IFX_VERBOSE_LEVEL_ERROR, input <= 1); /* wrong selection */
1339  gpt12->PISEL.B.IST5IN = input;
1340 }
1341 
1342 
1343 IFX_INLINE void IfxGpt12_T5_setMode(Ifx_GPT12 *gpt12, IfxGpt12_Mode mode)
1344 {
1345  IFX_ASSERT(IFX_VERBOSE_LEVEL_ERROR, mode <= IfxGpt12_Mode_highGatedTimer); /* wrong selection */
1346  gpt12->T5CON.B.T5M = mode;
1347 }
1348 
1349 
1351 {
1352  gpt12->T5CON.B.T5RC = control;
1353 }
1354 
1355 
1357 {
1358  gpt12->T5CON.B.T5UD = direction;
1359 }
1360 
1361 
1363 {
1364  gpt12->T5CON.B.T5I = inputPrescaler;
1365 }
1366 
1367 
1368 IFX_INLINE void IfxGpt12_T5_setTimerValue(Ifx_GPT12 *gpt12, uint16 value)
1369 {
1370  gpt12->T5.U = value;
1371 }
1372 
1373 
1374 IFX_INLINE void IfxGpt12_T6_enableClearTimer(Ifx_GPT12 *gpt12, boolean enabled)
1375 {
1376  gpt12->T6CON.B.T6CLR = enabled ? 1 : 0;
1377 }
1378 
1379 
1381 {
1382  return (IfxGpt12_Mode)gpt12->T6CON.B.T6M;
1383 }
1384 
1385 
1386 IFX_INLINE volatile Ifx_SRC_SRCR *IfxGpt12_T6_getSrc(Ifx_GPT12 *gpt12)
1387 {
1388  return &MODULE_SRC.GPT12.GPT12[0].T6;
1389 }
1390 
1391 
1393 {
1394  return (uint16)gpt12->T6.U;
1395 }
1396 
1397 
1398 IFX_INLINE void IfxGpt12_T6_run(Ifx_GPT12 *gpt12, IfxGpt12_TimerRun runTimer)
1399 {
1400  gpt12->T6CON.B.T6R = runTimer;
1401 }
1402 
1403 
1405 {
1406  IFX_ASSERT(IFX_VERBOSE_LEVEL_ERROR, inputMode <= IfxGpt12_CounterInputMode_bothEdgesTxIN); /* wrong selection */
1407  gpt12->T6CON.B.T6I = inputMode;
1408 }
1409 
1410 
1412 {
1413  gpt12->T6CON.B.T6UDE = source;
1414 }
1415 
1416 
1418 {
1419  IFX_ASSERT(IFX_VERBOSE_LEVEL_ERROR, input <= 1); /* wrong selection */
1420  gpt12->PISEL.B.IST6EUD = input;
1421 }
1422 
1423 
1424 IFX_INLINE void IfxGpt12_T6_setInput(Ifx_GPT12 *gpt12, IfxGpt12_Input input)
1425 {
1426  IFX_ASSERT(IFX_VERBOSE_LEVEL_ERROR, input <= 1); /* wrong selection */
1427  gpt12->PISEL.B.IST6IN = input;
1428 }
1429 
1430 
1431 IFX_INLINE void IfxGpt12_T6_setMode(Ifx_GPT12 *gpt12, IfxGpt12_Mode mode)
1432 {
1433  IFX_ASSERT(IFX_VERBOSE_LEVEL_ERROR, mode <= IfxGpt12_Mode_highGatedTimer); /* wrong selection */
1434  gpt12->T6CON.B.T6M = mode;
1435 }
1436 
1437 
1439 {
1440  gpt12->T6CON.B.T6UD = direction;
1441 }
1442 
1443 
1445 {
1446  gpt12->T6CON.B.T6I = inputPrescaler;
1447 }
1448 
1449 
1450 IFX_INLINE void IfxGpt12_T6_setTimerValue(Ifx_GPT12 *gpt12, uint16 value)
1451 {
1452  gpt12->T6.U = value;
1453 }
1454 
1455 
1456 IFX_INLINE volatile Ifx_SRC_SRCR *IfxGpt12_getCaptureSrc(Ifx_GPT12 *gpt12)
1457 {
1458  return &MODULE_SRC.GPT12.GPT12[0].CIRQ;
1459 }
1460 
1461 
1463 {
1464  return IfxScuCcu_getSpbFrequency();
1465 }
1466 
1467 
1469 {
1470  IfxPort_setPinModeInput(capIn->pin.port, capIn->pin.pinIndex, inputMode);
1472 }
1473 
1474 
1476 {
1477  IfxPort_setPinModeOutput(txOut->pin.port, txOut->pin.pinIndex, outputMode, txOut->select);
1478  IfxPort_setPinPadDriver(txOut->pin.port, txOut->pin.pinIndex, padDriver);
1479 }
1480 
1481 
1483 {
1484  gpt12->PISEL.B.ISCAPIN = input;
1485 }
1486 
1487 
1489 {
1490  gpt12->T3CON.B.BPS1 = bps1;
1491 }
1492 
1493 
1495 {
1496  gpt12->T6CON.B.BPS2 = bps2;
1497 }
1498 
1499 
1501 {
1503  IfxScuWdt_clearCpuEndinit(passwd);
1504  gpt12->CLC.B.EDIS = mode;
1505  IfxScuWdt_setCpuEndinit(passwd);
1506 }
1507 
1508 
1509 #endif /* IFXGPT12_H */