Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:04

0001 #ifndef __LPC_TIMER_H
0002 #define __LPC_TIMER_H
0003 
0004 /*************************************************************************
0005  *
0006  *    File name   : Timer.h
0007  *
0008  **************************************************************************/
0009 
0010 /* Timer Control register bit descriptions */
0011 #define TCR_ENABLE_BIT  0
0012 #define TCR_RESET_BIT   1
0013 
0014 // The channel name which is used in matching, in fact they represent
0015 // corresponding Match Register
0016 #define CH_MAXNUM       4
0017 #define CH0             0
0018 #define CH1             1
0019 #define CH2             2
0020 #define CH3             3
0021 
0022 // The channel name which is used in capturing, in fact they represent
0023 // corresponding Capture Register
0024 #define CPCH_MAXNUM     4
0025 #define CPCH0           0
0026 #define CPCH1           1
0027 #define CPCH2           2
0028 #define CPCH3           3
0029 
0030 //The actions when matching
0031 #define TimerAction_Interrupt   0x1
0032 #define TimerAction_ResetTimer  0x2
0033 #define TimerAction_StopTimer   0x4
0034 
0035 //Interrupt source type
0036 #define TIMERMR0Int     0x01
0037 #define TIMERMR1Int     0x02
0038 #define TIMERMR2Int     0x04
0039 #define TIMERMR3Int     0x08
0040 #define TIMERCR0Int     0x10
0041 #define TIMERCR1Int     0x20
0042 #define TIMERCR2Int     0x40
0043 #define TIMERCR3Int     0x80
0044 
0045 #define TIMERALLInt     0xFF
0046 
0047 #endif //__LPC_Timer_H
0048