init
[protos/xbee-avr.git] / aversive / parts / ATtiny13.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
49 /* overflow interrupt number */
50 #define SIG_OVERFLOW_TOTAL_NUM 0
51
52 /* output compare interrupt number */
53 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 0
54
55 /* Pwm nums */
56 #define PWM_TOTAL_NUM 0
57
58 /* input capture interrupt number */
59 #define SIG_INPUT_CAPTURE_TOTAL_NUM 0
60
61
62 /* CLKPR */
63 #define CLKPS0_REG           CLKPR
64 #define CLKPS1_REG           CLKPR
65 #define CLKPS2_REG           CLKPR
66 #define CLKPS3_REG           CLKPR
67 #define CLKPCE_REG           CLKPR
68
69 /* WDTCR */
70 #define WDP0_REG             WDTCR
71 #define WDP1_REG             WDTCR
72 #define WDP2_REG             WDTCR
73 #define WDE_REG              WDTCR
74 #define WDCE_REG             WDTCR
75 #define WDP3_REG             WDTCR
76 #define WDTIE_REG            WDTCR
77 #define WDTIF_REG            WDTCR
78
79 /* GIMSK */
80 #define PCIE_REG             GIMSK
81 #define INT0_REG             GIMSK
82
83 /* ADMUX */
84 #define MUX0_REG             ADMUX
85 #define MUX1_REG             ADMUX
86 #define ADLAR_REG            ADMUX
87 #define REFS0_REG            ADMUX
88
89 /* SREG */
90 #define C_REG                SREG
91 #define Z_REG                SREG
92 #define N_REG                SREG
93 #define V_REG                SREG
94 #define S_REG                SREG
95 #define H_REG                SREG
96 #define T_REG                SREG
97 #define I_REG                SREG
98
99 /* DDRB */
100 #define DDB0_REG             DDRB
101 #define DDB1_REG             DDRB
102 #define DDB2_REG             DDRB
103 #define DDB3_REG             DDRB
104 #define DDB4_REG             DDRB
105 #define DDB5_REG             DDRB
106
107 /* EEDR */
108 #define EEDR0_REG            EEDR
109 #define EEDR1_REG            EEDR
110 #define EEDR2_REG            EEDR
111 #define EEDR3_REG            EEDR
112 #define EEDR4_REG            EEDR
113 #define EEDR5_REG            EEDR
114 #define EEDR6_REG            EEDR
115 #define EEDR7_REG            EEDR
116
117 /* ACSR */
118 #define ACIS0_REG            ACSR
119 #define ACIS1_REG            ACSR
120 #define ACIE_REG             ACSR
121 #define ACI_REG              ACSR
122 #define ACO_REG              ACSR
123 #define ACBG_REG             ACSR
124 #define ACD_REG              ACSR
125
126 /* GTCCR */
127 #define PSR10_REG            GTCCR
128 #define TSM_REG              GTCCR
129
130 /* GIFR */
131 #define PCIF_REG             GIFR
132 #define INTF0_REG            GIFR
133
134 /* OSCCAL */
135 #define CAL0_REG             OSCCAL
136 #define CAL1_REG             OSCCAL
137 #define CAL2_REG             OSCCAL
138 #define CAL3_REG             OSCCAL
139 #define CAL4_REG             OSCCAL
140 #define CAL5_REG             OSCCAL
141 #define CAL6_REG             OSCCAL
142
143 /* ADCSRA */
144 #define ADPS0_REG            ADCSRA
145 #define ADPS1_REG            ADCSRA
146 #define ADPS2_REG            ADCSRA
147 #define ADIE_REG             ADCSRA
148 #define ADIF_REG             ADCSRA
149 #define ADATE_REG            ADCSRA
150 #define ADSC_REG             ADCSRA
151 #define ADEN_REG             ADCSRA
152
153 /* ADCSRB */
154 #define ADTS0_REG            ADCSRB
155 #define ADTS1_REG            ADCSRB
156 #define ADTS2_REG            ADCSRB
157 #define ACME_REG             ADCSRB
158
159 /* OCR0A */
160 #define OCR0A_0_REG          OCR0A
161 #define OCR0A_1_REG          OCR0A
162 #define OCR0A_2_REG          OCR0A
163 #define OCR0A_3_REG          OCR0A
164 #define OCR0A_4_REG          OCR0A
165 #define OCR0A_5_REG          OCR0A
166 #define OCR0A_6_REG          OCR0A
167 #define OCR0A_7_REG          OCR0A
168
169 /* OCR0B */
170 #define OCR0B_0_REG          OCR0B
171 #define OCR0B_1_REG          OCR0B
172 #define OCR0B_2_REG          OCR0B
173 #define OCR0B_3_REG          OCR0B
174 #define OCR0B_4_REG          OCR0B
175 #define OCR0B_5_REG          OCR0B
176 #define OCR0B_6_REG          OCR0B
177 #define OCR0B_7_REG          OCR0B
178
179 /* SPL */
180 #define SP0_REG              SPL
181 #define SP1_REG              SPL
182 #define SP2_REG              SPL
183 #define SP3_REG              SPL
184 #define SP4_REG              SPL
185 #define SP5_REG              SPL
186 #define SP6_REG              SPL
187 #define SP7_REG              SPL
188
189 /* MCUSR */
190 #define PORF_REG             MCUSR
191 #define EXTRF_REG            MCUSR
192 #define BORF_REG             MCUSR
193 #define WDRF_REG             MCUSR
194
195 /* EECR */
196 #define EERE_REG             EECR
197 #define EEWE_REG             EECR
198 #define EEMWE_REG            EECR
199 #define EERIE_REG            EECR
200 #define EEPM0_REG            EECR
201 #define EEPM1_REG            EECR
202
203 /* PCMSK */
204 #define PCINT0_REG           PCMSK
205 #define PCINT1_REG           PCMSK
206 #define PCINT2_REG           PCMSK
207 #define PCINT3_REG           PCMSK
208 #define PCINT4_REG           PCMSK
209 #define PCINT5_REG           PCMSK
210
211 /* SPMCSR */
212 #define SPMEN_REG            SPMCSR
213 #define PGERS_REG            SPMCSR
214 #define PGWRT_REG            SPMCSR
215 #define RFLB_REG             SPMCSR
216 #define CTPB_REG             SPMCSR
217
218 /* ADCL */
219 #define ADCL0_REG            ADCL
220 #define ADCL1_REG            ADCL
221 #define ADCL2_REG            ADCL
222 #define ADCL3_REG            ADCL
223 #define ADCL4_REG            ADCL
224 #define ADCL5_REG            ADCL
225 #define ADCL6_REG            ADCL
226 #define ADCL7_REG            ADCL
227
228 /* EEAR */
229 #define EEAR0_REG            EEAR
230 #define EEAR1_REG            EEAR
231 #define EEAR2_REG            EEAR
232 #define EEAR3_REG            EEAR
233 #define EEAR4_REG            EEAR
234 #define EEAR5_REG            EEAR
235
236 /* PORTB */
237 #define PORTB0_REG           PORTB
238 #define PORTB1_REG           PORTB
239 #define PORTB2_REG           PORTB
240 #define PORTB3_REG           PORTB
241 #define PORTB4_REG           PORTB
242 #define PORTB5_REG           PORTB
243
244 /* ADCH */
245 #define ADCH0_REG            ADCH
246 #define ADCH1_REG            ADCH
247 #define ADCH2_REG            ADCH
248 #define ADCH3_REG            ADCH
249 #define ADCH4_REG            ADCH
250 #define ADCH5_REG            ADCH
251 #define ADCH6_REG            ADCH
252 #define ADCH7_REG            ADCH
253
254 /* TCNT0 */
255 #define TCNT0_0_REG          TCNT0
256 #define TCNT0_1_REG          TCNT0
257 #define TCNT0_2_REG          TCNT0
258 #define TCNT0_3_REG          TCNT0
259 #define TCNT0_4_REG          TCNT0
260 #define TCNT0_5_REG          TCNT0
261 #define TCNT0_6_REG          TCNT0
262 #define TCNT0_7_REG          TCNT0
263
264 /* TIMSK0 */
265 #define TOIE0_REG            TIMSK0
266 #define OCIE0A_REG           TIMSK0
267 #define OCIE0B_REG           TIMSK0
268
269 /* TCCR0B */
270 #define CS00_REG             TCCR0B
271 #define CS01_REG             TCCR0B
272 #define CS02_REG             TCCR0B
273 #define WGM02_REG            TCCR0B
274 #define FOC0B_REG            TCCR0B
275 #define FOC0A_REG            TCCR0B
276
277 /* TCCR0A */
278 #define WGM00_REG            TCCR0A
279 #define WGM01_REG            TCCR0A
280 #define COM0B0_REG           TCCR0A
281 #define COM0B1_REG           TCCR0A
282 #define COM0A0_REG           TCCR0A
283 #define COM0A1_REG           TCCR0A
284
285 /* DWDR */
286 #define DWDR0_REG            DWDR
287 #define DWDR1_REG            DWDR
288 #define DWDR2_REG            DWDR
289 #define DWDR3_REG            DWDR
290 #define DWDR4_REG            DWDR
291 #define DWDR5_REG            DWDR
292 #define DWDR6_REG            DWDR
293 #define DWDR7_REG            DWDR
294
295 /* DIDR0 */
296 #define ADC1D_REG            DIDR0
297 #define ADC3D_REG            DIDR0
298 #define ADC2D_REG            DIDR0
299 #define ADC0D_REG            DIDR0
300 #define AIN0D_REG            DIDR0
301 #define AIN1D_REG            DIDR0
302
303 /* MCUCR */
304 #define ISC00_REG            MCUCR
305 #define ISC01_REG            MCUCR
306 #define SM0_REG              MCUCR
307 #define SM1_REG              MCUCR
308 #define SE_REG               MCUCR
309 #define PUD_REG              MCUCR
310
311 /* PINB */
312 #define PINB0_REG            PINB
313 #define PINB1_REG            PINB
314 #define PINB2_REG            PINB
315 #define PINB3_REG            PINB
316 #define PINB4_REG            PINB
317 #define PINB5_REG            PINB
318
319 /* TIFR0 */
320 #define TOV0_REG             TIFR0
321 #define OCF0A_REG            TIFR0
322 #define OCF0B_REG            TIFR0
323
324 /* pins mapping */
325 #define MOSI_PORT PORTB
326 #define MOSI_BIT 0
327 #define AIN0_PORT PORTB
328 #define AIN0_BIT 0
329 #define OC0A_PORT PORTB
330 #define OC0A_BIT 0
331 #define TXD_PORT PORTB
332 #define TXD_BIT 0
333 #define PCINT0_PORT PORTB
334 #define PCINT0_BIT 0
335
336 #define MISO_PORT PORTB
337 #define MISO_BIT 1
338 #define INT0_PORT PORTB
339 #define INT0_BIT 1
340 #define AIN1_PORT PORTB
341 #define AIN1_BIT 1
342 #define OC0B_PORT PORTB
343 #define OC0B_BIT 1
344 #define INT0_PORT PORTB
345 #define INT0_BIT 1
346 #define RXD_PORT PORTB
347 #define RXD_BIT 1
348 #define PCINT1_PORT PORTB
349 #define PCINT1_BIT 1
350
351 #define SCK_PORT PORTB
352 #define SCK_BIT 2
353 #define ADC1_PORT PORTB
354 #define ADC1_BIT 2
355 #define T0_PORT PORTB
356 #define T0_BIT 2
357 #define PCINT2_PORT PORTB
358 #define PCINT2_BIT 2
359
360