control servo 0 with axis 0
[protos/xbee-avr.git] / aversive / parts / AT90S2343.h
1 /*  
2  *  Copyright Droids Corporation, Microb Technology, Eirbot (2009)
3  * 
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  *
18  *  Revision : $Id $
19  *
20  */
21
22 /* WARNING : this file is automatically generated by scripts.
23  * You should not edit it. If you find something wrong in it,
24  * write to zer0@droids-corp.org */
25
26
27 /* prescalers timer 0 */
28 #define TIMER0_PRESCALER_DIV_0          0
29 #define TIMER0_PRESCALER_DIV_1          1
30 #define TIMER0_PRESCALER_DIV_8          2
31 #define TIMER0_PRESCALER_DIV_64         3
32 #define TIMER0_PRESCALER_DIV_256        4
33 #define TIMER0_PRESCALER_DIV_1024       5
34 #define TIMER0_PRESCALER_DIV_FALL       6
35 #define TIMER0_PRESCALER_DIV_RISE       7
36
37 #define TIMER0_PRESCALER_REG_0          0
38 #define TIMER0_PRESCALER_REG_1          1
39 #define TIMER0_PRESCALER_REG_2          8
40 #define TIMER0_PRESCALER_REG_3          64
41 #define TIMER0_PRESCALER_REG_4          256
42 #define TIMER0_PRESCALER_REG_5          1024
43 #define TIMER0_PRESCALER_REG_6          -1
44 #define TIMER0_PRESCALER_REG_7          -2
45
46
47 /* available timers */
48 #define TIMER0_AVAILABLE
49
50 /* overflow interrupt number */
51 #define SIG_OVERFLOW0_NUM 0
52 #define SIG_OVERFLOW_TOTAL_NUM 1
53
54 /* output compare interrupt number */
55 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 0
56
57 /* Pwm nums */
58 #define PWM_TOTAL_NUM 0
59
60 /* input capture interrupt number */
61 #define SIG_INPUT_CAPTURE_TOTAL_NUM 0
62
63
64 /* GIFR */
65 #define INTF0_REG            GIFR
66
67 /* TIMSK */
68 #define TOIE0_REG            TIMSK
69
70 /* WDTCR */
71 #define WDP0_REG             WDTCR
72 #define WDP1_REG             WDTCR
73 #define WDP2_REG             WDTCR
74 #define WDE_REG              WDTCR
75 #define WDTOE_REG            WDTCR
76
77 /* GIMSK */
78 #define INT0_REG             GIMSK
79
80 /* EECR */
81 #define EERE_REG             EECR
82 #define EEWE_REG             EECR
83 #define EEMWE_REG            EECR
84
85 /* PINB */
86 #define PINB0_REG            PINB
87 #define PINB1_REG            PINB
88 #define PINB2_REG            PINB
89 #define PINB3_REG            PINB
90 #define PINB4_REG            PINB
91
92 /* EEAR */
93 #define EEAR0_REG            EEAR
94 #define EEAR1_REG            EEAR
95 #define EEAR2_REG            EEAR
96 #define EEAR3_REG            EEAR
97 #define EEAR4_REG            EEAR
98 #define EEAR5_REG            EEAR
99 #define EEAR6_REG            EEAR
100
101 /* PORTB */
102 #define PORTB0_REG           PORTB
103 #define PORTB1_REG           PORTB
104 #define PORTB2_REG           PORTB
105 #define PORTB3_REG           PORTB
106 #define PORTB4_REG           PORTB
107
108 /* TCCR0 */
109 #define CS00_REG             TCCR0
110 #define CS01_REG             TCCR0
111 #define CS02_REG             TCCR0
112
113 /* SREG */
114 #define C_REG                SREG
115 #define Z_REG                SREG
116 #define N_REG                SREG
117 #define V_REG                SREG
118 #define S_REG                SREG
119 #define H_REG                SREG
120 #define T_REG                SREG
121 #define I_REG                SREG
122
123 /* DDRB */
124 #define DDB0_REG             DDRB
125 #define DDB1_REG             DDRB
126 #define DDB2_REG             DDRB
127 #define DDB3_REG             DDRB
128 #define DDB4_REG             DDRB
129
130 /* TCNT0 */
131 #define TCNT00_REG           TCNT0
132 #define TCNT01_REG           TCNT0
133 #define TCNT02_REG           TCNT0
134 #define TCNT03_REG           TCNT0
135 #define TCNT04_REG           TCNT0
136 #define TCNT05_REG           TCNT0
137 #define TCNT06_REG           TCNT0
138 #define TCNT07_REG           TCNT0
139
140 /* SPL */
141 #define SP0_REG              SPL
142 #define SP1_REG              SPL
143 #define SP2_REG              SPL
144 #define SP3_REG              SPL
145 #define SP4_REG              SPL
146 #define SP5_REG              SPL
147 #define SP6_REG              SPL
148 #define SP7_REG              SPL
149
150 /* EEDR */
151 #define EEDR0_REG            EEDR
152 #define EEDR1_REG            EEDR
153 #define EEDR2_REG            EEDR
154 #define EEDR3_REG            EEDR
155 #define EEDR4_REG            EEDR
156 #define EEDR5_REG            EEDR
157 #define EEDR6_REG            EEDR
158 #define EEDR7_REG            EEDR
159
160 /* MCUCR */
161 #define ISC00_REG            MCUCR
162 #define ISC01_REG            MCUCR
163 #define SM_REG               MCUCR
164 #define SE_REG               MCUCR
165
166 /* TIFR */
167 #define TOV0_REG             TIFR
168
169 /* MCUSR */
170 #define PORF_REG             MCUSR
171 #define EXTRF_REG            MCUSR
172
173 /* pins mapping */
174 #define MOSI_PORT PORTB
175 #define MOSI_BIT 0
176
177 #define MISO_PORT PORTB
178 #define MISO_BIT 1
179 #define INT0_PORT PORTB
180 #define INT0_BIT 1
181
182 #define SCK_PORT PORTB
183 #define SCK_BIT 2
184 #define T0_PORT PORTB
185 #define T0_BIT 2
186
187 #define CLOCK_PORT PORTB
188 #define CLOCK_BIT 3
189
190
191