40 #ifndef __DRIVERLIB_TIMER_H__
41 #define __DRIVERLIB_TIMER_H__
59 #define TIMER_CFG_ONE_SHOT 0x00000021 // Full-width one-shot timer
60 #define TIMER_CFG_ONE_SHOT_UP 0x00000031 // Full-width one-shot up-count
62 #define TIMER_CFG_PERIODIC 0x00000022 // Full-width periodic timer
63 #define TIMER_CFG_PERIODIC_UP 0x00000032 // Full-width periodic up-count
65 #define TIMER_CFG_RTC 0x01000000 // Full-width RTC timer
66 #define TIMER_CFG_SPLIT_PAIR 0x04000000 // Two half-width timers
67 #define TIMER_CFG_A_ONE_SHOT 0x00000021 // Timer A one-shot timer
68 #define TIMER_CFG_A_ONE_SHOT_UP 0x00000031 // Timer A one-shot up-count timer
69 #define TIMER_CFG_A_PERIODIC 0x00000022 // Timer A periodic timer
70 #define TIMER_CFG_A_PERIODIC_UP 0x00000032 // Timer A periodic up-count timer
71 #define TIMER_CFG_A_CAP_COUNT 0x00000003 // Timer A event counter
72 #define TIMER_CFG_A_CAP_COUNT_UP 0x00000013 // Timer A event up-counter
73 #define TIMER_CFG_A_CAP_TIME 0x00000007 // Timer A event timer
74 #define TIMER_CFG_A_CAP_TIME_UP 0x00000017 // Timer A event up-count timer
75 #define TIMER_CFG_A_PWM 0x0000000A // Timer A PWM output
76 #define TIMER_CFG_B_ONE_SHOT 0x00002100 // Timer B one-shot timer
77 #define TIMER_CFG_B_ONE_SHOT_UP 0x00003100 // Timer B one-shot up-count timer
78 #define TIMER_CFG_B_PERIODIC 0x00002200 // Timer B periodic timer
79 #define TIMER_CFG_B_PERIODIC_UP 0x00003200 // Timer B periodic up-count timer
80 #define TIMER_CFG_B_CAP_COUNT 0x00000300 // Timer B event counter
81 #define TIMER_CFG_B_CAP_COUNT_UP 0x00001300 // Timer B event up-counter
82 #define TIMER_CFG_B_CAP_TIME 0x00000700 // Timer B event timer
83 #define TIMER_CFG_B_CAP_TIME_UP 0x00001700 // Timer B event up-count timer
84 #define TIMER_CFG_B_PWM 0x00000A00 // Timer B PWM output
93 #define TIMER_TIMB_MATCH 0x00000800 // TimerB match interrupt
94 #define TIMER_CAPB_EVENT 0x00000400 // CaptureB event interrupt
95 #define TIMER_CAPB_MATCH 0x00000200 // CaptureB match interrupt
96 #define TIMER_TIMB_TIMEOUT 0x00000100 // TimerB time out interrupt
97 #define TIMER_TIMA_MATCH 0x00000010 // TimerA match interrupt
98 #define TIMER_RTC_MATCH 0x00000008 // RTC interrupt mask
99 #define TIMER_CAPA_EVENT 0x00000004 // CaptureA event interrupt
100 #define TIMER_CAPA_MATCH 0x00000002 // CaptureA match interrupt
101 #define TIMER_TIMA_TIMEOUT 0x00000001 // TimerA time out interrupt
108 #define TIMER_EVENT_POS_EDGE 0x00000000 // Count positive edges
109 #define TIMER_EVENT_NEG_EDGE 0x00000404 // Count negative edges
110 #define TIMER_EVENT_BOTH_EDGES 0x00000C0C // Count both edges
118 #define TIMER_A 0x000000ff // Timer A
119 #define TIMER_B 0x0000ff00 // Timer B
120 #define TIMER_BOTH 0x0000ffff // Timer Both
127 #define TIMER_0A_SYNC 0x00000001 // Synchronize Timer 0A
128 #define TIMER_0B_SYNC 0x00000002 // Synchronize Timer 0B
129 #define TIMER_1A_SYNC 0x00000004 // Synchronize Timer 1A
130 #define TIMER_1B_SYNC 0x00000008 // Synchronize Timer 1B
131 #define TIMER_2A_SYNC 0x00000010 // Synchronize Timer 2A
132 #define TIMER_2B_SYNC 0x00000020 // Synchronize Timer 2B
133 #define TIMER_3A_SYNC 0x00000040 // Synchronize Timer 3A
134 #define TIMER_3B_SYNC 0x00000080 // Synchronize Timer 3B
135 #define TIMER_4A_SYNC 0x00000100 // Synchronize Timer 4A
136 #define TIMER_4B_SYNC 0x00000200 // Synchronize Timer 4B
137 #define TIMER_5A_SYNC 0x00000400 // Synchronize Timer 5A
138 #define TIMER_5B_SYNC 0x00000800 // Synchronize Timer 5B
139 #define WTIMER_0A_SYNC 0x00001000 // Synchronize Wide Timer 0A
140 #define WTIMER_0B_SYNC 0x00002000 // Synchronize Wide Timer 0B
141 #define WTIMER_1A_SYNC 0x00004000 // Synchronize Wide Timer 1A
142 #define WTIMER_1B_SYNC 0x00008000 // Synchronize Wide Timer 1B
143 #define WTIMER_2A_SYNC 0x00010000 // Synchronize Wide Timer 2A
144 #define WTIMER_2B_SYNC 0x00020000 // Synchronize Wide Timer 2B
145 #define WTIMER_3A_SYNC 0x00040000 // Synchronize Wide Timer 3A
146 #define WTIMER_3B_SYNC 0x00080000 // Synchronize Wide Timer 3B
147 #define WTIMER_4A_SYNC 0x00100000 // Synchronize Wide Timer 4A
148 #define WTIMER_4B_SYNC 0x00200000 // Synchronize Wide Timer 4B
149 #define WTIMER_5A_SYNC 0x00400000 // Synchronize Wide Timer 5A
150 #define WTIMER_5B_SYNC 0x00800000 // Synchronize Wide Timer 5B
157 extern void TimerEnable(uint32_t ui32Base, uint32_t ui32Timer);
158 extern void TimerDisable(uint32_t ui32Base, uint32_t ui32Timer);
159 extern void TimerConfigure(uint32_t ui32Base, uint32_t ui32Config);
178 extern void TimerLoadSet(uint32_t ui32Base, uint32_t ui32Timer,
180 extern uint32_t
TimerLoadGet(uint32_t ui32Base, uint32_t ui32Timer);
181 extern void TimerLoadSet64(uint32_t ui32Base, uint64_t ui64Value);
183 extern uint32_t
TimerValueGet(uint32_t ui32Base, uint32_t ui32Timer);
185 extern void TimerMatchSet(uint32_t ui32Base, uint32_t ui32Timer,
187 extern uint32_t
TimerMatchGet(uint32_t ui32Base, uint32_t ui32Timer);
191 void (*pfnHandler)(
void));
193 extern void TimerIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags);
196 extern void TimerIntClear(uint32_t ui32Base, uint32_t ui32IntFlags);
208 #endif // __DRIVERLIB_TIMER_H__
uint32_t TimerMatchGet(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:1078
void TimerIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: timer.c:1291
void TimerDisable(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:211
void TimerLoadSet64(uint32_t ui32Base, uint64_t ui64Value)
Definition: timer.c:873
void TimerMatchSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value)
Definition: timer.c:1032
void TimerPrescaleSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value)
Definition: timer.c:619
void TimerControlLevel(uint32_t ui32Base, uint32_t ui32Timer, bool bInvert)
Definition: timer.c:347
uint32_t TimerPrescaleGet(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:668
void TimerMatchSet64(uint32_t ui32Base, uint64_t ui64Value)
Definition: timer.c:1108
void TimerControlWaitOnTrigger(uint32_t ui32Base, uint32_t ui32Timer, bool bWait)
Definition: timer.c:502
void TimerIntRegister(uint32_t ui32Base, uint32_t ui32Timer, void(*pfnHandler)(void))
Definition: timer.c:1189
void TimerConfigure(uint32_t ui32Base, uint32_t ui32Config)
Definition: timer.c:280
void TimerControlStall(uint32_t ui32Base, uint32_t ui32Timer, bool bStall)
Definition: timer.c:460
uint64_t TimerLoadGet64(uint32_t ui32Base)
Definition: timer.c:902
void TimerPrescaleMatchSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value)
Definition: timer.c:710
void TimerIntClear(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: timer.c:1395
void TimerIntUnregister(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:1238
void TimerControlTrigger(uint32_t ui32Base, uint32_t ui32Timer, bool bEnable)
Definition: timer.c:384
void TimerControlEvent(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Event)
Definition: timer.c:424
void TimerSynchronize(uint32_t ui32Base, uint32_t ui32Timers)
Definition: timer.c:1456
void TimerRTCDisable(uint32_t ui32Base)
Definition: timer.c:581
uint64_t TimerValueGet64(uint32_t ui32Base)
Definition: timer.c:978
uint32_t TimerIntStatus(uint32_t ui32Base, bool bMasked)
Definition: timer.c:1353
void TimerEnable(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:181
void TimerRTCEnable(uint32_t ui32Base)
Definition: timer.c:556
void TimerLoadSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value)
Definition: timer.c:798
uint64_t TimerMatchGet64(uint32_t ui32Base)
Definition: timer.c:1136
uint32_t TimerValueGet(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:951
uint32_t TimerPrescaleMatchGet(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:761
void TimerIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: timer.c:1323
uint32_t TimerLoadGet(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:844