-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaux_timer.h
482 lines (457 loc) · 21.2 KB
/
aux_timer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
/******************************************************************************
* Filename: aux_timer.h
* Revised: 2017-06-05 12:13:49 +0200 (Mon, 05 Jun 2017)
* Revision: 49096
*
* Description: Defines and prototypes for the AUX Timer
*
* Copyright (c) 2015 - 2017, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1) Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2) Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3) Neither the name of the ORGANIZATION nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************/
//*****************************************************************************
//
//! \addtogroup aux_group
//! @{
//! \addtogroup auxtimer_api
//! @{
//
//*****************************************************************************
#ifndef __AUX_TIMER_H__
#define __AUX_TIMER_H__
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdbool.h>
#include <stdint.h>
#include "../inc/hw_types.h"
#include "../inc/hw_ints.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_aux_timer.h"
#include "debug.h"
#include "interrupt.h"
//*****************************************************************************
//
// Support for DriverLib in ROM:
// This section renames all functions that are not "static inline", so that
// calling these functions will default to implementation in flash. At the end
// of this file a second renaming will change the defaults to implementation in
// ROM for available functions.
//
// To force use of the implementation in flash, e.g. for debugging:
// - Globally: Define DRIVERLIB_NOROM at project level
// - Per function: Use prefix "NOROM_" when calling the function
//
//*****************************************************************************
#if !defined(DOXYGEN)
#define AUXTimerConfigure NOROM_AUXTimerConfigure
#define AUXTimerStart NOROM_AUXTimerStart
#define AUXTimerStop NOROM_AUXTimerStop
#define AUXTimerPrescaleSet NOROM_AUXTimerPrescaleSet
#define AUXTimerPrescaleGet NOROM_AUXTimerPrescaleGet
#endif
//*****************************************************************************
//
// Values that can be passed to AUXTimerConfigure().
//
//*****************************************************************************
#define AUX_TIMER_CFG_ONE_SHOT (AUX_TIMER_T0CFG_RELOAD_MAN) // One-shot timer mode
#define AUX_TIMER_CFG_PERIODIC (AUX_TIMER_T0CFG_RELOAD_CONT) // Period timer mode
#define AUX_TIMER_CFG_ONE_SHOT_EDGE_COUNT ((AUX_TIMER_T0CFG_RELOAD_MAN) | (AUX_TIMER_T0CFG_MODE_TICK)) // One-shot timer with edge count
#define AUX_TIMER_CFG_PERIODIC_EDGE_COUNT ((AUX_TIMER_T0CFG_RELOAD_CONT) | (AUX_TIMER_T0CFG_MODE_TICK)) // Periodic timer with edge count
#define AUX_TIMER_CFG_RISING_EDGE (AUX_TIMER_T0CFG_TICK_SRC_POL_RISE) // Count rising edges (used with edge count mode)
#define AUX_TIMER_CFG_FALLING_EDGE (AUX_TIMER_T0CFG_TICK_SRC_POL_FALL) // Count falling edges (used with edge count mode)
#define AUX_TIMER_CFG_TICK_SRC_RTC_EVENT (AUX_TIMER_T0CFG_TICK_SRC_RTC_CH2_EV) // AON wake-up event
#define AUX_TIMER_CFG_TICK_SRC_CMP_A (AUX_TIMER_T0CFG_TICK_SRC_AUX_COMPA) // Comparator A
#define AUX_TIMER_CFG_TICK_SRC_CMP_B (AUX_TIMER_T0CFG_TICK_SRC_AUX_COMPB) // Comparator B
#define AUX_TIMER_CFG_TICK_SRC_TDCDONE (AUX_TIMER_T0CFG_TICK_SRC_TDC_DONE) // TDC Done
#define AUX_TIMER_CFG_TICK_SRC_TIMER0_EVENT (AUX_TIMER_T1CFG_TICK_SRC_TIMER0_EV) // Timer 0 event
#define AUX_TIMER_CFG_TICK_SRC_TIMER1_EVENT (AUX_TIMER_T0CFG_TICK_SRC_TIMER1_EV) // Timer 1 event
#define AUX_TIMER_CFG_TICK_SRC_SMPH_RELEASE (AUX_TIMER_T0CFG_TICK_SRC_SMPH_AUTOTAKE_DONE) // Semaphore release
#define AUX_TIMER_CFG_TICK_SRC_ADC_DONE (AUX_TIMER_T0CFG_TICK_SRC_ADC_DONE) // ADC done
#define AUX_TIMER_CFG_TICK_SRC_RTC_4KHZ (AUX_TIMER_T0CFG_TICK_SRC_RTC_4KHZ)
#define AUX_TIMER_CFG_TICK_SRC_OBSMUX0 (AUX_TIMER_T0CFG_TICK_SRC_OBSMUX0)
#define AUX_TIMER_CFG_TICK_SRC_OBSMUX1 (AUX_TIMER_T0CFG_TICK_SRC_OBSMUX1)
#define AUX_TIMER_CFG_TICK_SRC_AON_SW (AUX_TIMER_T0CFG_TICK_SRC_AON_SW)
#define AUX_TIMER_CFG_TICK_SRC_AON_PROG_WU (AUX_TIMER_T0CFG_TICK_SRC_AON_PROG_WU)
#define AUX_TIMER_CFG_TICK_SRC_AIO0 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO0) // AIO_DAT[ 0]
#define AUX_TIMER_CFG_TICK_SRC_AIO1 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO1) // AIO_DAT[ 1]
#define AUX_TIMER_CFG_TICK_SRC_AIO2 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO2) // AIO_DAT[ 2]
#define AUX_TIMER_CFG_TICK_SRC_AIO3 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO3) // AIO_DAT[ 3]
#define AUX_TIMER_CFG_TICK_SRC_AIO4 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO4) // AIO_DAT[ 4]
#define AUX_TIMER_CFG_TICK_SRC_AIO5 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO5) // AIO_DAT[ 5]
#define AUX_TIMER_CFG_TICK_SRC_AIO6 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO6) // AIO_DAT[ 6]
#define AUX_TIMER_CFG_TICK_SRC_AIO7 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO7) // AIO_DAT[ 7]
#define AUX_TIMER_CFG_TICK_SRC_AIO8 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO8) // AIO_DAT[ 8]
#define AUX_TIMER_CFG_TICK_SRC_AIO9 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO9) // AIO_DAT[ 9]
#define AUX_TIMER_CFG_TICK_SRC_AIO10 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO10) // AIO_DAT[10]
#define AUX_TIMER_CFG_TICK_SRC_AIO11 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO11) // AIO_DAT[11]
#define AUX_TIMER_CFG_TICK_SRC_AIO12 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO12) // AIO_DAT[12]
#define AUX_TIMER_CFG_TICK_SRC_AIO13 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO13) // AIO_DAT[13]
#define AUX_TIMER_CFG_TICK_SRC_AIO14 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO14) // AIO_DAT[14]
#define AUX_TIMER_CFG_TICK_SRC_AIO15 (AUX_TIMER_T0CFG_TICK_SRC_AUXIO15) // AIO_DAT[15]
#define AUX_TIMER_CFG_TICK_SRC_ACLK_REF (AUX_TIMER_T0CFG_TICK_SRC_ACLK_REF) // ACLK_REF_i
#define AUX_TIMER_CFG_TICK_SRC_MCU_EVENT (AUX_TIMER_T0CFG_TICK_SRC_MCU_EVENT) // MCU event
#define AUX_TIMER_CFG_TICK_SRC_ADC_IRQ (AUX_TIMER_T0CFG_TICK_SRC_ADC_IRQ) // DMA done
//*****************************************************************************
//
// Values that can be passed to most of the timer APIs as the ui32Timer
// parameter.
//
//*****************************************************************************
#define AUX_TIMER_0 0x0000FFFF // AUX Timer 0
#define AUX_TIMER_1 0x00FF0000 // AUX Timer 1
#define AUX_TIMER_BOTH 0x00FFFFFF // AUX Timer Both 0 and 1
//*****************************************************************************
//
// Values that can be passed to AUXTimerPrescaleSet and returned from
// AUXTimerPrescaleGet.
//
//*****************************************************************************
#define AUX_TIMER_PRESCALE_DIV_1 0x00000000 // Prescale division ratio 1
#define AUX_TIMER_PRESCALE_DIV_2 0x00000001 // Prescale division ratio 2
#define AUX_TIMER_PRESCALE_DIV_4 0x00000002 // Prescale division ratio 4
#define AUX_TIMER_PRESCALE_DIV_8 0x00000003 // Prescale division ratio 8
#define AUX_TIMER_PRESCALE_DIV_16 0x00000004 // Prescale division ratio 16
#define AUX_TIMER_PRESCALE_DIV_32 0x00000005 // Prescale division ratio 32
#define AUX_TIMER_PRESCALE_DIV_64 0x00000006 // Prescale division ratio 64
#define AUX_TIMER_PRESCALE_DIV_128 0x00000007 // Prescale division ratio 128
#define AUX_TIMER_PRESCALE_DIV_256 0x00000008 // Prescale division ratio 256
#define AUX_TIMER_PRESCALE_DIV_512 0x00000009 // Prescale division ratio 512
#define AUX_TIMER_PRESCALE_DIV_1028 0x0000000A // Prescale div. ratio 1028
#define AUX_TIMER_PRESCALE_DIV_2048 0x0000000B // Prescale div. ratio 2048
#define AUX_TIMER_PRESCALE_DIV_4096 0x0000000C // Prescale div. ratio 4096
#define AUX_TIMER_PRESCALE_DIV_8192 0x0000000D // Prescale div. ratio 8192
#define AUX_TIMER_PRESCALE_DIV_16384 0x0000000E // Prescale div. ratio 16384
#define AUX_TIMER_PRESCALE_DIV_32768 0x0000000F // Prescale div. ratio 32768
//*****************************************************************************
//
// API Functions and prototypes
//
//*****************************************************************************
//*****************************************************************************
//
//! \brief Configure AUX timer.
//!
//! This call configures the AUX timer selected by the \c ui32Timer.
//! The timer module is disabled before being configured and is left in the
//! disabled state.
//!
//! The configuration is specified in \c ui32Config as one of the following
//! values:
//! - \ref AUX_TIMER_CFG_ONE_SHOT : One-shot timer.
//! - \ref AUX_TIMER_CFG_PERIODIC : Periodic timer.
//! - \ref AUX_TIMER_CFG_ONE_SHOT_EDGE_COUNT : One-shot edge counter.
//! - \ref AUX_TIMER_CFG_PERIODIC_EDGE_COUNT : Periodic edge counter.
//!
//! When configured as timer, the counter is incremented based on the AUX clock
//! after the prescaler. The prescale division ratio is set
//! using \ref AUXTimerPrescaleSet().
//!
//! When configured as an edge counter the counter is incremented only on edges
//! of the selected event.
//! The polarity of the event is selected by:
//! - \ref AUX_TIMER_CFG_RISING_EDGE : rising edge trigger
//! - \ref AUX_TIMER_CFG_FALLING_EDGE : falling edge trigger
//!
//! The event source is selected as one of the following defines:
//! - \ref AUX_TIMER_CFG_TICK_SRC_RTC_EVENT
//! - \ref AUX_TIMER_CFG_TICK_SRC_CMP_A
//! - \ref AUX_TIMER_CFG_TICK_SRC_CMP_B
//! - \ref AUX_TIMER_CFG_TICK_SRC_TDCDONE
//! - \ref AUX_TIMER_CFG_TICK_SRC_TIMER0_EVENT
//! - \ref AUX_TIMER_CFG_TICK_SRC_TIMER1_EVENT
//! - \ref AUX_TIMER_CFG_TICK_SRC_SMPH_RELEASE
//! - \ref AUX_TIMER_CFG_TICK_SRC_ADC_DONE
//! - \ref AUX_TIMER_CFG_TICK_SRC_RTC_4KHZ
//! - \ref AUX_TIMER_CFG_TICK_SRC_OBSMUX0
//! - \ref AUX_TIMER_CFG_TICK_SRC_OBSMUX1
//! - \ref AUX_TIMER_CFG_TICK_SRC_AON_SW
//! - \ref AUX_TIMER_CFG_TICK_SRC_AON_PROG_WU
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO0
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO1
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO2
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO3
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO4
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO5
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO6
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO7
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO8
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO9
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO10
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO11
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO12
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO13
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO14
//! - \ref AUX_TIMER_CFG_TICK_SRC_AIO15
//! - \ref AUX_TIMER_CFG_TICK_SRC_ACLK_REF
//! - \ref AUX_TIMER_CFG_TICK_SRC_MCU_EVENT
//! - \ref AUX_TIMER_CFG_TICK_SRC_ADC_IRQ
//!
//! The mode, event polarity and event source are configured by setting the
//! \c ui32Config parameter as the bitwise OR of the various settings.
//! Example: (\ref AUX_TIMER_CFG_ONE_SHOT_EDGE_COUNT |
//! \ref AUX_TIMER_CFG_RISING_EDGE |
//! \ref AUX_TIMER_CFG_TICK_SRC_RTC_EVENT).
//!
//! \note When used as an edge counter the prescaler should be set to
//! \ref AUX_TIMER_PRESCALE_DIV_1.
//!
//! \note A timer can not trigger itself thus timer 0 can \b not use
//! \ref AUX_TIMER_CFG_TICK_SRC_TIMER0_EVENT and timer 1 can \b not use
//! \ref AUX_TIMER_CFG_TICK_SRC_TIMER1_EVENT.
//!
//! \param ui32Timer is the timer to configure.
//! - \ref AUX_TIMER_0
//! - \ref AUX_TIMER_1
//! - \ref AUX_TIMER_BOTH
//! \param ui32Config is the timer configuration.
//!
//! \return None
//!
//! \sa \ref AUXTimerPrescaleSet()
//
//*****************************************************************************
extern void AUXTimerConfigure(uint32_t ui32Timer, uint32_t ui32Config);
//*****************************************************************************
//
//! \brief Start AUX timer(s).
//!
//! This call starts the selected AUX timer(s).
//!
//! \note The counter will start counting up from zero.
//!
//! \param ui32Timer is the timer to start.
//! - \ref AUX_TIMER_0
//! - \ref AUX_TIMER_1
//! - \ref AUX_TIMER_BOTH
//!
//! \return None
//!
//! \sa \ref AUXTimerStop()
//
//*****************************************************************************
extern void AUXTimerStart(uint32_t ui32Timer);
//*****************************************************************************
//
//! \brief Stop AUX timer(s).
//!
//! This call stops the selected AUX timer(s).
//!
//! \param ui32Timer is the timer to stop.
//! - \ref AUX_TIMER_0
//! - \ref AUX_TIMER_1
//! - \ref AUX_TIMER_BOTH
//!
//! \return None
//!
//! \sa \ref AUXTimerStart()
//
//*****************************************************************************
extern void AUXTimerStop(uint32_t ui32Timer);
//*****************************************************************************
//
//! \brief Set AUX timer target value.
//!
//! The timer counts from zero to the target value. When target value is
//! reached an event is generated.
//!
//! \param ui32Timer is the timer to set the target value for.
//! - \ref AUX_TIMER_0
//! - \ref AUX_TIMER_1
//! \param ui32Target is the timer target value.
//! - For \ref AUX_TIMER_0 the target value must be an integer in the range 0..65535 (16 bit).
//! - For \ref AUX_TIMER_1 the target value must be an integer in the range 0..255 (8 bit).
//!
//! \return None
//!
//! \sa \ref AUXTimerTargetValGet()
//
//*****************************************************************************
__STATIC_INLINE void
AUXTimerTargetValSet(uint32_t ui32Timer, uint32_t ui32Target)
{
uint32_t ui32Addr;
// Check the arguments.
ASSERT((ui32Timer == AUX_TIMER_0) || (ui32Timer == AUX_TIMER_1));
ASSERT(((ui32Timer & AUX_TIMER_0) && (ui32Target <= 65535)) ||
((ui32Timer & AUX_TIMER_1) && (ui32Target <= 255)));
ui32Addr = (ui32Timer & AUX_TIMER_0) ?
(AUX_TIMER_BASE + AUX_TIMER_O_T0TARGET) :
(AUX_TIMER_BASE + AUX_TIMER_O_T1TARGET);
HWREG(ui32Addr) = ui32Target;
}
//*****************************************************************************
//
//! \brief Get AUX timer target value.
//!
//! The timer counts from zero to the target value. When target value is
//! reached an event is generated. This function returns the programmed target
//! value for the specified timer.
//!
//! \param ui32Timer is the timer to get the target value from.
//! - \ref AUX_TIMER_0
//! - \ref AUX_TIMER_1
//!
//! \return Returns target value for the specified timer
//!
//! \sa \ref AUXTimerTargetValSet()
//
//*****************************************************************************
__STATIC_INLINE uint32_t
AUXTimerTargetValGet(uint32_t ui32Timer)
{
// Check the arguments.
ASSERT((ui32Timer == AUX_TIMER_0) || (ui32Timer == AUX_TIMER_1));
return(HWREG((ui32Timer & AUX_TIMER_0) ?
(AUX_TIMER_BASE + AUX_TIMER_O_T0TARGET) :
(AUX_TIMER_BASE + AUX_TIMER_O_T1TARGET)));
}
//*****************************************************************************
//
//! \brief Set AUX timer prescale value.
//!
//! When configured as timer, the counter is incremented based on the AUX clock
//! after the prescaler.
//!
//! \note Setting prescale value is \b not advised when the timer is running.
//!
//! \note When timer is used as an edge counter the prescaler should be
//! set to \ref AUX_TIMER_PRESCALE_DIV_1.
//!
//! \param ui32Timer is the timer to set the prescale on.
//! - \ref AUX_TIMER_0
//! - \ref AUX_TIMER_1
//! - \ref AUX_TIMER_BOTH
//! \param ui32PrescaleDiv is the prescaler division ratio.
//! - \ref AUX_TIMER_PRESCALE_DIV_1 : Prescale division ratio 1
//! - \ref AUX_TIMER_PRESCALE_DIV_2 : Prescale division ratio 2
//! - \ref AUX_TIMER_PRESCALE_DIV_4 : Prescale division ratio 4
//! - \ref AUX_TIMER_PRESCALE_DIV_16 : Prescale division ratio 16
//! - \ref AUX_TIMER_PRESCALE_DIV_32 : Prescale division ratio 32
//! - \ref AUX_TIMER_PRESCALE_DIV_64 : Prescale division ratio 64
//! - \ref AUX_TIMER_PRESCALE_DIV_128 : Prescale division ratio 128
//! - \ref AUX_TIMER_PRESCALE_DIV_256 : Prescale division ratio 256
//! - \ref AUX_TIMER_PRESCALE_DIV_1028 : Prescale division ratio 1028
//! - \ref AUX_TIMER_PRESCALE_DIV_2048 : Prescale division ratio 2048
//! - \ref AUX_TIMER_PRESCALE_DIV_4096 : Prescale division ratio 4096
//! - \ref AUX_TIMER_PRESCALE_DIV_8192 : Prescale division ratio 8192
//! - \ref AUX_TIMER_PRESCALE_DIV_16384 : Prescale division ratio 16384
//! - \ref AUX_TIMER_PRESCALE_DIV_32768 : Prescale division ratio 32768
//!
//! \return None
//!
//! \sa \ref AUXTimerPrescaleGet()
//
//*****************************************************************************
extern void AUXTimerPrescaleSet(uint32_t ui32Timer, uint32_t ui32PrescaleDiv);
//*****************************************************************************
//
//! \brief Get AUX timer prescale value.
//!
//! When configured as timer, the counter is incremented based on the AUX clock
//! after the prescaler. This call returns the setting of the prescale divide
//! ratio for the specified timer.
//!
//! \param ui32Timer is the timer to get the prescale value from.
//! - \ref AUX_TIMER_0
//! - \ref AUX_TIMER_1
//!
//! \return Returns the prescaler division ratio as one of the following values:
//! - \ref AUX_TIMER_PRESCALE_DIV_1 : Prescale division ratio 1
//! - \ref AUX_TIMER_PRESCALE_DIV_2 : Prescale division ratio 2
//! - \ref AUX_TIMER_PRESCALE_DIV_4 : Prescale division ratio 4
//! - \ref AUX_TIMER_PRESCALE_DIV_16 : Prescale division ratio 16
//! - \ref AUX_TIMER_PRESCALE_DIV_32 : Prescale division ratio 32
//! - \ref AUX_TIMER_PRESCALE_DIV_64 : Prescale division ratio 64
//! - \ref AUX_TIMER_PRESCALE_DIV_128 : Prescale division ratio 128
//! - \ref AUX_TIMER_PRESCALE_DIV_256 : Prescale division ratio 256
//! - \ref AUX_TIMER_PRESCALE_DIV_1028 : Prescale division ratio 1028
//! - \ref AUX_TIMER_PRESCALE_DIV_2048 : Prescale division ratio 2048
//! - \ref AUX_TIMER_PRESCALE_DIV_4096 : Prescale division ratio 4096
//! - \ref AUX_TIMER_PRESCALE_DIV_8192 : Prescale division ratio 8192
//! - \ref AUX_TIMER_PRESCALE_DIV_16384 : Prescale division ratio 16384
//! - \ref AUX_TIMER_PRESCALE_DIV_32768 : Prescale division ratio 32768
//!
//! \sa \ref AUXTimerPrescaleSet()
//
//*****************************************************************************
extern uint32_t AUXTimerPrescaleGet(uint32_t ui32Timer);
//*****************************************************************************
//
// Support for DriverLib in ROM:
// Redirect to implementation in ROM when available.
//
//*****************************************************************************
#if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
#include "../driverlib/rom.h"
#ifdef ROM_AUXTimerConfigure
#undef AUXTimerConfigure
#define AUXTimerConfigure ROM_AUXTimerConfigure
#endif
#ifdef ROM_AUXTimerStart
#undef AUXTimerStart
#define AUXTimerStart ROM_AUXTimerStart
#endif
#ifdef ROM_AUXTimerStop
#undef AUXTimerStop
#define AUXTimerStop ROM_AUXTimerStop
#endif
#ifdef ROM_AUXTimerPrescaleSet
#undef AUXTimerPrescaleSet
#define AUXTimerPrescaleSet ROM_AUXTimerPrescaleSet
#endif
#ifdef ROM_AUXTimerPrescaleGet
#undef AUXTimerPrescaleGet
#define AUXTimerPrescaleGet ROM_AUXTimerPrescaleGet
#endif
#endif
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif
#endif // __AUX_TIMER_H__
//*****************************************************************************
//
//! Close the Doxygen group.
//! @}
//! @}
//
//*****************************************************************************