2 * Copyright Droids Corporation, Microb Technology, Eirbot (2009)
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.
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.
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
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 */
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
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
46 /* prescalers timer 1 */
47 #define TIMER1_PRESCALER_DIV_0 0
48 #define TIMER1_PRESCALER_DIV_-3 1
49 #define TIMER1_PRESCALER_DIV_-3 2
50 #define TIMER1_PRESCALER_DIV_-3 3
51 #define TIMER1_PRESCALER_DIV_-3 4
52 #define TIMER1_PRESCALER_DIV_1 5
53 #define TIMER1_PRESCALER_DIV_2 6
54 #define TIMER1_PRESCALER_DIV_4 7
55 #define TIMER1_PRESCALER_DIV_8 8
56 #define TIMER1_PRESCALER_DIV_16 9
57 #define TIMER1_PRESCALER_DIV_32 10
58 #define TIMER1_PRESCALER_DIV_64 11
59 #define TIMER1_PRESCALER_DIV_128 12
60 #define TIMER1_PRESCALER_DIV_256 13
61 #define TIMER1_PRESCALER_DIV_512 14
62 #define TIMER1_PRESCALER_DIV_1024 15
64 #define TIMER1_PRESCALER_REG_0 0
65 #define TIMER1_PRESCALER_REG_1 -3
66 #define TIMER1_PRESCALER_REG_2 -3
67 #define TIMER1_PRESCALER_REG_3 -3
68 #define TIMER1_PRESCALER_REG_4 -3
69 #define TIMER1_PRESCALER_REG_5 1
70 #define TIMER1_PRESCALER_REG_6 2
71 #define TIMER1_PRESCALER_REG_7 4
72 #define TIMER1_PRESCALER_REG_8 8
73 #define TIMER1_PRESCALER_REG_9 16
74 #define TIMER1_PRESCALER_REG_10 32
75 #define TIMER1_PRESCALER_REG_11 64
76 #define TIMER1_PRESCALER_REG_12 128
77 #define TIMER1_PRESCALER_REG_13 256
78 #define TIMER1_PRESCALER_REG_14 512
79 #define TIMER1_PRESCALER_REG_15 1024
82 /* available timers */
83 #define TIMER0_AVAILABLE
84 #define TIMER1_AVAILABLE
86 /* overflow interrupt number */
87 #define SIG_OVERFLOW0_NUM 0
88 #define SIG_OVERFLOW1_NUM 1
89 #define SIG_OVERFLOW_TOTAL_NUM 2
91 /* output compare interrupt number */
92 #define SIG_OUTPUT_COMPARE1_NUM 0
93 #define SIG_OUTPUT_COMPARE_TOTAL_NUM 1
97 #define PWM_TOTAL_NUM 1
99 /* input capture interrupt number */
100 #define SIG_INPUT_CAPTURE_TOTAL_NUM 0
104 #define WDP0_REG WDTCR
105 #define WDP1_REG WDTCR
106 #define WDP2_REG WDTCR
107 #define WDE_REG WDTCR
108 #define WDTOE_REG WDTCR
111 #define PCIE_REG GIMSK
112 #define INT0_REG GIMSK
115 #define MUX0_REG ADMUX
116 #define MUX1_REG ADMUX
117 #define MUX2_REG ADMUX
118 #define ADLAR_REG ADMUX
119 #define REFS0_REG ADMUX
120 #define REFS1_REG ADMUX
123 #define CS10_REG TCCR1
124 #define CS11_REG TCCR1
125 #define CS12_REG TCCR1
126 #define CS13_REG TCCR1
127 #define COM1A0_REG TCCR1
128 #define COM1A1_REG TCCR1
129 #define PWM1_REG TCCR1
130 #define CTC1_REG TCCR1
133 #define CS00_REG TCCR0
134 #define CS01_REG TCCR0
135 #define CS02_REG TCCR0
148 #define DDB0_REG DDRB
149 #define DDB1_REG DDRB
150 #define DDB2_REG DDRB
151 #define DDB3_REG DDRB
152 #define DDB4_REG DDRB
153 #define DDB5_REG DDRB
156 #define EEDR0_REG EEDR
157 #define EEDR1_REG EEDR
158 #define EEDR2_REG EEDR
159 #define EEDR3_REG EEDR
160 #define EEDR4_REG EEDR
161 #define EEDR5_REG EEDR
162 #define EEDR6_REG EEDR
163 #define EEDR7_REG EEDR
166 #define OCR1A0_REG OCR1A
167 #define OCR1A1_REG OCR1A
168 #define OCR1A2_REG OCR1A
169 #define OCR1A3_REG OCR1A
170 #define OCR1A4_REG OCR1A
171 #define OCR1A5_REG OCR1A
172 #define OCR1A6_REG OCR1A
173 #define OCR1A7_REG OCR1A
176 #define PCIF_REG GIFR
177 #define INTF0_REG GIFR
180 #define TOIE0_REG TIMSK
181 #define TOIE1_REG TIMSK
182 #define OCIE1A_REG TIMSK
185 #define PSR0_REG SFIOR
186 #define PSR1_REG SFIOR
187 #define FOC1A_REG SFIOR
190 #define ACIS0_REG ACSR
191 #define ACIS1_REG ACSR
192 #define ACIE_REG ACSR
195 #define ACBG_REG ACSR
199 #define PORF_REG MCUSR
200 #define EXTRF_REG MCUSR
201 #define BORF_REG MCUSR
202 #define WDRF_REG MCUSR
205 #define EERE_REG EECR
206 #define EEWE_REG EECR
207 #define EEMWE_REG EECR
208 #define EERIE_REG EECR
211 #define CAL0_REG OSCCAL
212 #define CAL1_REG OSCCAL
213 #define CAL2_REG OSCCAL
214 #define CAL3_REG OSCCAL
215 #define CAL4_REG OSCCAL
216 #define CAL5_REG OSCCAL
217 #define CAL6_REG OSCCAL
218 #define CAL7_REG OSCCAL
221 #define ADCL0_REG ADCL
222 #define ADCL1_REG ADCL
223 #define ADCL2_REG ADCL
224 #define ADCL3_REG ADCL
225 #define ADCL4_REG ADCL
226 #define ADCL5_REG ADCL
227 #define ADCL6_REG ADCL
228 #define ADCL7_REG ADCL
231 #define EEAR0_REG EEAR
232 #define EEAR1_REG EEAR
233 #define EEAR2_REG EEAR
234 #define EEAR3_REG EEAR
235 #define EEAR4_REG EEAR
236 #define EEAR5_REG EEAR
239 #define PORTB0_REG PORTB
240 #define PORTB1_REG PORTB
241 #define PORTB2_REG PORTB
242 #define PORTB3_REG PORTB
243 #define PORTB4_REG PORTB
246 #define ADCH0_REG ADCH
247 #define ADCH1_REG ADCH
248 #define ADCH2_REG ADCH
249 #define ADCH3_REG ADCH
250 #define ADCH4_REG ADCH
251 #define ADCH5_REG ADCH
252 #define ADCH6_REG ADCH
253 #define ADCH7_REG ADCH
256 #define TCNT00_REG TCNT0
257 #define TCNT01_REG TCNT0
258 #define TCNT02_REG TCNT0
259 #define TCNT03_REG TCNT0
260 #define TCNT04_REG TCNT0
261 #define TCNT05_REG TCNT0
262 #define TCNT06_REG TCNT0
263 #define TCNT07_REG TCNT0
266 #define TCNT1_0_REG TCNT1
267 #define TCNT1_1_REG TCNT1
268 #define TCNT1_2_REG TCNT1
269 #define TCNT1_3_REG TCNT1
270 #define TCNT1_4_REG TCNT1
271 #define TCNT1_5_REG TCNT1
272 #define TCNT1_6_REG TCNT1
273 #define TCNT1_7_REG TCNT1
276 #define TOV0_REG TIFR
277 #define TOV1_REG TIFR
278 #define OCF1A_REG TIFR
281 #define ADPS0_REG ADCSR
282 #define ADPS1_REG ADCSR
283 #define ADPS2_REG ADCSR
284 #define ADIE_REG ADCSR
285 #define ADIF_REG ADCSR
286 #define ADFR_REG ADCSR
287 #define ADSC_REG ADCSR
288 #define ADEN_REG ADCSR
291 #define PINB0_REG PINB
292 #define PINB1_REG PINB
293 #define PINB2_REG PINB
294 #define PINB3_REG PINB
295 #define PINB4_REG PINB
296 #define PINB5_REG PINB
299 #define OCR1B0_REG OCR1B
300 #define OCR1B1_REG OCR1B
301 #define OCR1B2_REG OCR1B
302 #define OCR1B3_REG OCR1B
303 #define OCR1B4_REG OCR1B
304 #define OCR1B5_REG OCR1B
305 #define OCR1B6_REG OCR1B
306 #define OCR1B7_REG OCR1B
309 #define ISC00_REG MCUCR
310 #define ISC01_REG MCUCR
311 #define SM0_REG MCUCR
312 #define SM1_REG MCUCR
314 #define PUD_REG MCUCR
317 #define MOSI_PORT PORTB
319 #define AIN0_PORT PORTB
321 #define AREF_PORT PORTB
324 #define MISO_PORT PORTB
326 #define AIN1_PORT PORTB
328 #define OCP_PORT PORTB
331 #define SCK_PORT PORTB
333 #define ADC1_PORT PORTB
335 #define T0_PORT PORTB
337 #define INT0_PORT PORTB
340 #define ADC2_PORT PORTB
343 #define ADC3_PORT PORTB
346 #define RESET_PORT PORTB
348 #define ADC0_PORT PORTB