173b1d0e9c10619659139028f8993cf73b787b10
[fw/sdcc] / device / include / mcs51 / 8052.h
1 /*-------------------------------------------------------------------------
2    Register Declarations for the Intel 8052 Processor
3
4    Written By -  Bela Torok / bela.torok@kssg.ch (July 2000)
5
6    This library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
10
11    This library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15
16    You should have received a copy of the GNU Lesser General Public
17    License along with this library; if not, write to the Free Software
18    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19
20    In other words, you are welcome to use, share and improve this program.
21    You are forbidden to forbid anyone else to use, share and improve
22    what you give them.   Help stamp out software-hoarding!
23 -------------------------------------------------------------------------*/
24
25 #ifndef REG8052_H
26 #define REG8052_H
27
28 #include <8051.h>     /* load definitions for the 8051 core */
29
30 #ifdef REG8051_H
31 #undef REG8051_H
32 #endif
33
34 /* define 8052 specific registers only */
35
36 /* T2CON */
37 __sfr __at (0xC8) T2CON ;
38
39 /* RCAP2 L & H */
40 __sfr __at (0xCA) RCAP2L  ;
41 __sfr __at (0xCB) RCAP2H  ;
42 __sfr __at (0xCC) TL2     ;
43 __sfr __at (0xCD) TH2     ;
44
45 /*  IE  */
46 __sbit __at (0xAD) ET2    ; /* Enable timer2 interrupt */
47
48 /*  IP  */
49 __sbit __at (0xBD) PT2    ; /* T2 interrupt priority bit */
50
51 /* T2CON bits */
52 __sbit __at (0xC8) T2CON_0 ;
53 __sbit __at (0xC9) T2CON_1 ;
54 __sbit __at (0xCA) T2CON_2 ;
55 __sbit __at (0xCB) T2CON_3 ;
56 __sbit __at (0xCC) T2CON_4 ;
57 __sbit __at (0xCD) T2CON_5 ;
58 __sbit __at (0xCE) T2CON_6 ;
59 __sbit __at (0xCF) T2CON_7 ;
60
61 __sbit __at (0xC8) CP_RL2  ;
62 __sbit __at (0xC9) C_T2    ;
63 __sbit __at (0xCA) TR2     ;
64 __sbit __at (0xCB) EXEN2   ;
65 __sbit __at (0xCC) TCLK    ;
66 __sbit __at (0xCD) RCLK    ;
67 __sbit __at (0xCE) EXF2    ;
68 __sbit __at (0xCF) TF2     ;
69
70 #endif