38 #ifndef __DRIVERLIB_TIMER_H__ 39 #define __DRIVERLIB_TIMER_H__ 60 #define TIMER_CFG_ONE_SHOT 0x00000021 // Full-width one-shot timer 61 #define TIMER_CFG_ONE_SHOT_UP 0x00000031 // Full-width one-shot up-count 63 #define TIMER_CFG_PERIODIC 0x00000022 // Full-width periodic timer 64 #define TIMER_CFG_PERIODIC_UP 0x00000032 // Full-width periodic up-count 66 #define TIMER_CFG_RTC 0x01000000 // Full-width RTC timer 67 #define TIMER_CFG_SPLIT_PAIR 0x04000000 // Two half-width timers 68 #define TIMER_CFG_A_ONE_SHOT 0x00000021 // Timer A one-shot timer 69 #define TIMER_CFG_A_ONE_SHOT_UP 0x00000031 // Timer A one-shot up-count timer 70 #define TIMER_CFG_A_PERIODIC 0x00000022 // Timer A periodic timer 71 #define TIMER_CFG_A_PERIODIC_UP 0x00000032 // Timer A periodic up-count timer 72 #define TIMER_CFG_A_CAP_COUNT 0x00000003 // Timer A event counter 73 #define TIMER_CFG_A_CAP_COUNT_UP 0x00000013 // Timer A event up-counter 74 #define TIMER_CFG_A_CAP_TIME 0x00000007 // Timer A event timer 75 #define TIMER_CFG_A_CAP_TIME_UP 0x00000017 // Timer A event up-count timer 76 #define TIMER_CFG_A_PWM 0x0000000A // Timer A PWM output 77 #define TIMER_CFG_B_ONE_SHOT 0x00002100 // Timer B one-shot timer 78 #define TIMER_CFG_B_ONE_SHOT_UP 0x00003100 // Timer B one-shot up-count timer 79 #define TIMER_CFG_B_PERIODIC 0x00002200 // Timer B periodic timer 80 #define TIMER_CFG_B_PERIODIC_UP 0x00003200 // Timer B periodic up-count timer 81 #define TIMER_CFG_B_CAP_COUNT 0x00000300 // Timer B event counter 82 #define TIMER_CFG_B_CAP_COUNT_UP 0x00001300 // Timer B event up-counter 83 #define TIMER_CFG_B_CAP_TIME 0x00000700 // Timer B event timer 84 #define TIMER_CFG_B_CAP_TIME_UP 0x00001700 // Timer B event up-count timer 85 #define TIMER_CFG_B_PWM 0x00000A00 // Timer B PWM output 86 #define TIMER_CFG_A_ACT_TOINTD 0x00010000 // Timer A compare action disable 88 #define TIMER_CFG_A_ACT_NONE 0x00000000 // Timer A compare action none. 89 #define TIMER_CFG_A_ACT_TOGGLE 0x00020000 // Timer A compare action toggle. 90 #define TIMER_CFG_A_ACT_CLRTO 0x00040000 // Timer A compare action CCP 92 #define TIMER_CFG_A_ACT_SETTO 0x00060000 // Timer A compare action CCP set 94 #define TIMER_CFG_A_ACT_SETTOGTO 0x00080000 // Timer A compare action set CCP 96 #define TIMER_CFG_A_ACT_CLRTOGTO 0x000A0000 // Timer A compare action clear 98 #define TIMER_CFG_A_ACT_SETCLRTO 0x000C0000 // Timer A compare action set CCP 100 #define TIMER_CFG_A_ACT_CLRSETTO 0x000E0000 // Timer A compare action clear 102 #define TIMER_CFG_B_ACT_TOINTD 0x00100000 // Timer B compare action disable 104 #define TIMER_CFG_B_ACT_NONE 0x00000000 // Timer A compare action none. 105 #define TIMER_CFG_B_ACT_TOGGLE 0x00200000 // Timer A compare action toggle. 106 #define TIMER_CFG_B_ACT_CLRTO 0x00400000 // Timer A compare action CCP 108 #define TIMER_CFG_B_ACT_SETTO 0x00600000 // Timer A compare action CCP set 110 #define TIMER_CFG_B_ACT_SETTOGTO 0x00800000 // Timer A compare action set CCP 112 #define TIMER_CFG_B_ACT_CLRTOGTO 0x00A00000 // Timer A compare action clear 114 #define TIMER_CFG_B_ACT_SETCLRTO 0x00C00000 // Timer A compare action set CCP 116 #define TIMER_CFG_B_ACT_CLRSETTO 0x0000E000 // Timer A compare action clear 126 #define TIMER_TIMB_DMA 0x00002000 // TimerB DMA Complete Interrupt. 127 #define TIMER_TIMB_MATCH 0x00000800 // TimerB match interrupt 128 #define TIMER_CAPB_EVENT 0x00000400 // CaptureB event interrupt 129 #define TIMER_CAPB_MATCH 0x00000200 // CaptureB match interrupt 130 #define TIMER_TIMB_TIMEOUT 0x00000100 // TimerB time out interrupt 131 #define TIMER_TIMA_DMA 0x00000020 // TimerA DMA Complete Interrupt. 132 #define TIMER_TIMA_MATCH 0x00000010 // TimerA match interrupt 133 #define TIMER_RTC_MATCH 0x00000008 // RTC interrupt mask 134 #define TIMER_CAPA_EVENT 0x00000004 // CaptureA event interrupt 135 #define TIMER_CAPA_MATCH 0x00000002 // CaptureA match interrupt 136 #define TIMER_TIMA_TIMEOUT 0x00000001 // TimerA time out interrupt 143 #define TIMER_EVENT_POS_EDGE 0x00000000 // Count positive edges 144 #define TIMER_EVENT_NEG_EDGE 0x00000404 // Count negative edges 145 #define TIMER_EVENT_BOTH_EDGES 0x00000C0C // Count both edges 153 #define TIMER_A 0x000000ff // Timer A 154 #define TIMER_B 0x0000ff00 // Timer B 155 #define TIMER_BOTH 0x0000ffff // Timer Both 162 #define TIMER_0A_SYNC 0x00000001 // Synchronize Timer 0A 163 #define TIMER_0B_SYNC 0x00000002 // Synchronize Timer 0B 164 #define TIMER_1A_SYNC 0x00000004 // Synchronize Timer 1A 165 #define TIMER_1B_SYNC 0x00000008 // Synchronize Timer 1B 166 #define TIMER_2A_SYNC 0x00000010 // Synchronize Timer 2A 167 #define TIMER_2B_SYNC 0x00000020 // Synchronize Timer 2B 168 #define TIMER_3A_SYNC 0x00000040 // Synchronize Timer 3A 169 #define TIMER_3B_SYNC 0x00000080 // Synchronize Timer 3B 170 #define TIMER_4A_SYNC 0x00000100 // Synchronize Timer 4A 171 #define TIMER_4B_SYNC 0x00000200 // Synchronize Timer 4B 172 #define TIMER_5A_SYNC 0x00000400 // Synchronize Timer 5A 173 #define TIMER_5B_SYNC 0x00000800 // Synchronize Timer 5B 174 #define TIMER_6A_SYNC 0x00001000 // Synchronize Timer 6A 175 #define TIMER_6B_SYNC 0x00002000 // Synchronize Timer 6B 176 #define TIMER_7A_SYNC 0x00004000 // Synchronize Timer 7A 177 #define TIMER_7B_SYNC 0x00008000 // Synchronize Timer 7B 185 #define TIMER_CLOCK_SYSTEM 0x00000000 186 #define TIMER_CLOCK_PIOSC 0x00000001 194 #define TIMER_DMA_MODEMATCH_B 0x00000800 195 #define TIMER_DMA_CAPEVENT_B 0x00000400 196 #define TIMER_DMA_CAPMATCH_B 0x00000200 197 #define TIMER_DMA_TIMEOUT_B 0x00000100 198 #define TIMER_DMA_MODEMATCH_A 0x00000010 199 #define TIMER_DMA_RTC_A 0x00000008 200 #define TIMER_DMA_CAPEVENT_A 0x00000004 201 #define TIMER_DMA_CAPMATCH_A 0x00000002 202 #define TIMER_DMA_TIMEOUT_A 0x00000001 210 #define TIMER_ADC_MODEMATCH_B 0x00000800 211 #define TIMER_ADC_CAPEVENT_B 0x00000400 212 #define TIMER_ADC_CAPMATCH_B 0x00000200 213 #define TIMER_ADC_TIMEOUT_B 0x00000100 214 #define TIMER_ADC_MODEMATCH_A 0x00000010 215 #define TIMER_ADC_RTC_A 0x00000008 216 #define TIMER_ADC_CAPEVENT_A 0x00000004 217 #define TIMER_ADC_CAPMATCH_A 0x00000002 218 #define TIMER_ADC_TIMEOUT_A 0x00000001 225 #define TIMER_UP_LOAD_IMMEDIATE 0x00000000 226 #define TIMER_UP_LOAD_TIMEOUT 0x00000100 227 #define TIMER_UP_MATCH_IMMEDIATE \ 229 #define TIMER_UP_MATCH_TIMEOUT 0x00000400 236 extern void TimerEnable(uint32_t ui32Base, uint32_t ui32Timer);
237 extern void TimerDisable(uint32_t ui32Base, uint32_t ui32Timer);
238 extern void TimerConfigure(uint32_t ui32Base, uint32_t ui32Config);
257 extern void TimerLoadSet(uint32_t ui32Base, uint32_t ui32Timer,
259 extern uint32_t
TimerLoadGet(uint32_t ui32Base, uint32_t ui32Timer);
260 extern uint32_t
TimerValueGet(uint32_t ui32Base, uint32_t ui32Timer);
261 extern void TimerMatchSet(uint32_t ui32Base, uint32_t ui32Timer,
263 extern uint32_t
TimerMatchGet(uint32_t ui32Base, uint32_t ui32Timer);
265 void (*pfnHandler)(
void));
267 extern void TimerIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags);
270 extern void TimerIntClear(uint32_t ui32Base, uint32_t ui32IntFlags);
279 uint32_t ui32Config);
289 #endif // __DRIVERLIB_TIMER_H__ uint32_t TimerMatchGet(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:1047
void TimerIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: timer.c:1189
void TimerDisable(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:202
void TimerMatchSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value)
Definition: timer.c:1002
void TimerPrescaleSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value)
Definition: timer.c:722
void TimerControlLevel(uint32_t ui32Base, uint32_t ui32Timer, bool bInvert)
Definition: timer.c:377
uint32_t TimerPrescaleGet(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:767
uint32_t TimerADCEventGet(uint32_t ui32Base)
Definition: timer.c:1431
void TimerDMAEventSet(uint32_t ui32Base, uint32_t ui32DMAEvent)
Definition: timer.c:1475
void TimerControlWaitOnTrigger(uint32_t ui32Base, uint32_t ui32Timer, bool bWait)
Definition: timer.c:552
void TimerIntRegister(uint32_t ui32Base, uint32_t ui32Timer, void(*pfnHandler)(void))
Definition: timer.c:1085
void TimerConfigure(uint32_t ui32Base, uint32_t ui32Config)
Definition: timer.c:305
void TimerControlStall(uint32_t ui32Base, uint32_t ui32Timer, bool bStall)
Definition: timer.c:511
uint32_t TimerDMAEventGet(uint32_t ui32Base)
Definition: timer.c:1518
void TimerPrescaleMatchSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value)
Definition: timer.c:804
void TimerIntClear(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: timer.c:1293
void TimerIntUnregister(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:1134
void TimerControlTrigger(uint32_t ui32Base, uint32_t ui32Timer, bool bEnable)
Definition: timer.c:414
void TimerControlEvent(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Event)
Definition: timer.c:475
void TimerSynchronize(uint32_t ui32Base, uint32_t ui32Timers)
Definition: timer.c:1344
void TimerRTCDisable(uint32_t ui32Base)
Definition: timer.c:631
void TimerClockSourceSet(uint32_t ui32Base, uint32_t ui32Source)
Definition: timer.c:660
uint32_t TimerIntStatus(uint32_t ui32Base, bool bMasked)
Definition: timer.c:1251
void TimerEnable(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:172
void TimerUpdateMode(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Config)
Definition: timer.c:1570
void TimerRTCEnable(uint32_t ui32Base)
Definition: timer.c:606
void TimerLoadSet(uint32_t ui32Base, uint32_t ui32Timer, uint32_t ui32Value)
Definition: timer.c:887
uint32_t TimerClockSourceGet(uint32_t ui32Base)
Definition: timer.c:689
void TimerADCEventSet(uint32_t ui32Base, uint32_t ui32ADCEvent)
Definition: timer.c:1389
uint32_t TimerValueGet(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:965
uint32_t TimerPrescaleMatchGet(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:851
void TimerIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags)
Definition: timer.c:1221
uint32_t TimerLoadGet(uint32_t ui32Base, uint32_t ui32Timer)
Definition: timer.c:932