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_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 94 #define TIMER_TIMB_DMA 0x00002000 // TimerB DMA Done interrupt 95 #define TIMER_TIMB_MATCH 0x00000800 // TimerB match interrupt 96 #define TIMER_CAPB_EVENT 0x00000400 // CaptureB event interrupt 97 #define TIMER_CAPB_MATCH 0x00000200 // CaptureB match interrupt 98 #define TIMER_TIMB_TIMEOUT 0x00000100 // TimerB time out interrupt 99 #define TIMER_TIMA_DMA 0x00000020 // TimerA DMA Done interrupt 100 #define TIMER_TIMA_MATCH 0x00000010 // TimerA match interrupt 101 #define TIMER_CAPA_EVENT 0x00000004 // CaptureA event interrupt 102 #define TIMER_CAPA_MATCH 0x00000002 // CaptureA match interrupt 103 #define TIMER_TIMA_TIMEOUT 0x00000001 // TimerA time out interrupt 110 #define TIMER_EVENT_POS_EDGE 0x00000000 // Count positive edges 111 #define TIMER_EVENT_NEG_EDGE 0x00000404 // Count negative edges 112 #define TIMER_EVENT_BOTH_EDGES 0x00000C0C // Count both edges 120 #define TIMER_A 0x000000ff // Timer A 121 #define TIMER_B 0x0000ff00 // Timer B 122 #define TIMER_BOTH 0x0000ffff // Timer Both 130 #define TIMER_0A_SYNC 0x00000001 // Synchronize Timer 0A 131 #define TIMER_0B_SYNC 0x00000002 // Synchronize Timer 0B 132 #define TIMER_1A_SYNC 0x00000004 // Synchronize Timer 1A 133 #define TIMER_1B_SYNC 0x00000008 // Synchronize Timer 1B 134 #define TIMER_2A_SYNC 0x00000010 // Synchronize Timer 2A 135 #define TIMER_2B_SYNC 0x00000020 // Synchronize Timer 2B 136 #define TIMER_3A_SYNC 0x00000040 // Synchronize Timer 3A 137 #define TIMER_3B_SYNC 0x00000080 // Synchronize Timer 3B 145 #define TIMER_DMA_MODEMATCH_B 0x00000800 146 #define TIMER_DMA_CAPEVENT_B 0x00000400 147 #define TIMER_DMA_CAPMATCH_B 0x00000200 148 #define TIMER_DMA_TIMEOUT_B 0x00000100 149 #define TIMER_DMA_MODEMATCH_A 0x00000010 150 #define TIMER_DMA_CAPEVENT_A 0x00000004 151 #define TIMER_DMA_CAPMATCH_A 0x00000002 152 #define TIMER_DMA_TIMEOUT_A 0x00000001 160 extern void TimerEnable(
unsigned long ulBase,
unsigned long ulTimer);
161 extern void TimerDisable(
unsigned long ulBase,
unsigned long ulTimer);
162 extern void TimerConfigure(
unsigned long ulBase,
unsigned long ulConfig);
166 unsigned long ulEvent);
170 unsigned long ulValue);
172 unsigned long ulTimer);
174 unsigned long ulValue);
176 unsigned long ulTimer);
177 extern void TimerLoadSet(
unsigned long ulBase,
unsigned long ulTimer,
178 unsigned long ulValue);
179 extern unsigned long TimerLoadGet(
unsigned long ulBase,
unsigned long ulTimer);
182 unsigned long ulTimer);
183 extern void TimerValueSet(
unsigned long ulBase,
unsigned long ulTimer,
184 unsigned long ulValue);
186 extern void TimerMatchSet(
unsigned long ulBase,
unsigned long ulTimer,
187 unsigned long ulValue);
189 unsigned long ulTimer);
191 void (*pfnHandler)(
void));
193 extern void TimerIntEnable(
unsigned long ulBase,
unsigned long ulIntFlags);
194 extern void TimerIntDisable(
unsigned long ulBase,
unsigned long ulIntFlags);
195 extern unsigned long TimerIntStatus(
unsigned long ulBase, tBoolean bMasked);
196 extern void TimerIntClear(
unsigned long ulBase,
unsigned long ulIntFlags);
197 extern void TimerDMAEventSet(
unsigned long ulBase,
unsigned long ulDMAEvent);
210 #endif // __TIMER_H__ unsigned long TimerMatchGet(unsigned long ulBase, unsigned long ulTimer)
Definition: timer.c:716
unsigned long TimerPrescaleMatchGet(unsigned long ulBase, unsigned long ulTimer)
Definition: timer.c:490
void TimerIntClear(unsigned long ulBase, unsigned long ulIntFlags)
Definition: timer.c:1001
void TimerDisable(unsigned long ulBase, unsigned long ulTimer)
Definition: timer.c:122
void TimerControlEvent(unsigned long ulBase, unsigned long ulTimer, unsigned long ulEvent)
Definition: timer.c:284
void TimerPrescaleSet(unsigned long ulBase, unsigned long ulTimer, unsigned long ulValue)
Definition: timer.c:358
void TimerConfigure(unsigned long ulBase, unsigned long ulConfig)
Definition: timer.c:184
void TimerIntEnable(unsigned long ulBase, unsigned long ulIntFlags)
Definition: timer.c:898
void TimerIntUnregister(unsigned long ulBase, unsigned long ulTimer)
Definition: timer.c:821
void TimerIntDisable(unsigned long ulBase, unsigned long ulIntFlags)
Definition: timer.c:929
void TimerLoadSet(unsigned long ulBase, unsigned long ulTimer, unsigned long ulValue)
Definition: timer.c:526
void TimerControlLevel(unsigned long ulBase, unsigned long ulTimer, tBoolean bInvert)
Definition: timer.c:247
void TimerPrescaleMatchSet(unsigned long ulBase, unsigned long ulTimer, unsigned long ulValue)
Definition: timer.c:442
void TimerControlStall(unsigned long ulBase, unsigned long ulTimer, tBoolean bStall)
Definition: timer.c:321
unsigned long TimerIntStatus(unsigned long ulBase, tBoolean bMasked)
Definition: timer.c:959
unsigned long TimerLoadGet(unsigned long ulBase, unsigned long ulTimer)
Definition: timer.c:572
unsigned long TimerValueGet(unsigned long ulBase, unsigned long ulTimer)
Definition: timer.c:602
void TimerDMAEventSet(unsigned long ulBase, unsigned long ulDMAEvent)
Definition: timer.c:1044
unsigned long TimerPrescaleGet(unsigned long ulBase, unsigned long ulTimer)
Definition: timer.c:404
void TimerMatchSet(unsigned long ulBase, unsigned long ulTimer, unsigned long ulValue)
Definition: timer.c:674
void TimerEnable(unsigned long ulBase, unsigned long ulTimer)
Definition: timer.c:93
void TimerIntRegister(unsigned long ulBase, unsigned long ulTimer, void(*pfnHandler)(void))
Definition: timer.c:755
unsigned long TimerDMAEventGet(unsigned long ulBase)
Definition: timer.c:1086
void TimerValueSet(unsigned long ulBase, unsigned long ulTimer, unsigned long ulValue)
Definition: timer.c:633