source: rtems/cpukit/score/cpu/avr/avr/iotnx4.h @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 9.7 KB
Line 
1/* Copyright (c) 2005, 2007, 2009 Anatoly Sokolov
2   All rights reserved.
3
4   Redistribution and use in source and binary forms, with or without
5   modification, are permitted provided that the following conditions are met:
6
7   * Redistributions of source code must retain the above copyright
8     notice, this list of conditions and the following disclaimer.
9
10   * Redistributions in binary form must reproduce the above copyright
11     notice, this list of conditions and the following disclaimer in
12     the documentation and/or other materials provided with the
13     distribution.
14
15   * Neither the name of the copyright holders nor the names of
16     contributors may be used to endorse or promote products derived
17     from this software without specific prior written permission.
18
19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  POSSIBILITY OF SUCH DAMAGE. */
30
31
32/* avr/iotnx4.h - definitions for ATtiny24, ATtiny44 and ATtiny84 */
33
34#ifndef _AVR_IOTNX4_H_
35#define _AVR_IOTNX4_H_ 1
36
37/* This file should only be included from <avr/io.h>, never directly. */
38
39#ifndef _AVR_IO_H_
40#  error "Include <avr/io.h> instead of this file."
41#endif
42
43#ifndef _AVR_IOXXX_H_
44#  define _AVR_IOXXX_H_ "iotnx4.h"
45#else
46#  error "Attempt to include more than one <avr/ioXXX.h> file."
47#endif
48
49/* I/O registers */
50
51#define PRR     _SFR_IO8 (0x00)
52#define PRTIM1  3
53#define PRTIM0  2
54#define PRUSI   1
55#define PRADC   0
56
57#define DIDR0    _SFR_IO8(0x01)
58#define ADC7D   7
59#define ADC6D   6
60#define ADC5D   5
61#define ADC4D   4
62#define ADC3D   3
63#define ADC2D   2
64#define ADC1D   1
65#define ADC0D   0
66
67/* Reserved [0x02] */
68
69#define ADCSRB  _SFR_IO8 (0x03)
70#define BIN     7
71#define ACME    6
72#define ADLAR   4
73#define ADTS2   2
74#define ADTS1   1
75#define ADTS0   0
76
77#ifndef __ASSEMBLER__
78#define ADC     _SFR_IO16(0x04)
79#endif
80#define ADCW    _SFR_IO16(0x04)
81#define ADCL    _SFR_IO8(0x04)
82#define ADCH    _SFR_IO8(0x05)
83
84#define ADCSRA  _SFR_IO8 (0x06)
85#define ADEN    7
86#define ADSC    6
87#define ADATE   5
88#define ADIF    4
89#define ADIE    3
90#define ADPS2   2
91#define ADPS1   1
92#define ADPS0   0
93
94#define ADMUX   _SFR_IO8(0x07)
95#define REFS1   7
96#define REFS0   6
97#define MUX5    5
98#define MUX4    4
99#define MUX3    3
100#define MUX2    2
101#define MUX1    1
102#define MUX0    0
103
104#define ACSR    _SFR_IO8(0x08)
105#define ACD     7
106#define ACBG    6
107#define ACO     5
108#define ACI     4
109#define ACIE    3
110#define ACIC    2
111#define ACIS1   1
112#define ACIS0   0
113
114/* Reserved [0x09..0x0A] */
115
116#define TIFR1   _SFR_IO8(0x0B)
117#define ICF1    5
118#define OCF1B   2
119#define OCF1A   1
120#define TOV1    0
121
122#define TIMSK1   _SFR_IO8(0x0C)
123#define ICIE1   5
124#define OCIE1B  2
125#define OCIE1A  1
126#define TOIE1   0
127
128#define USICR   _SFR_IO8(0x0D)
129#define USISIE  7
130#define USIOIE  6
131#define USIWM1  5
132#define USIWM0  4
133#define USICS1  3
134#define USICS0  2
135#define USICLK  1
136#define USITC   0
137
138#define USISR   _SFR_IO8(0x0E)
139#define USISIF  7
140#define USIOIF  6
141#define USIPF   5
142#define USIDC   4
143#define USICNT3 3
144#define USICNT2 2
145#define USICNT1 1
146#define USICNT0 0
147
148#define USIDR   _SFR_IO8(0x0F)
149
150#define USIBR   _SFR_IO8(0x10)
151
152/* Reserved [0x11] */
153
154#define PCMSK0  _SFR_IO8(0x12)
155#define PCINT7  7
156#define PCINT6  6
157#define PCINT5  5
158#define PCINT4  4
159#define PCINT3  3
160#define PCINT2  2
161#define PCINT1  1
162#define PCINT0  0
163
164#define GPIOR0  _SFR_IO8(0x13)
165
166#define GPIOR1  _SFR_IO8(0x14)
167
168#define GPIOR2  _SFR_IO8(0x15)
169
170#define PINB    _SFR_IO8(0x16)
171#define PINB3   3
172#define PINB2   2
173#define PINB1   1
174#define PINB0   0
175
176#define DDRB    _SFR_IO8(0x17)
177#define DDB3    3
178#define DDB2    2
179#define DDB1    1
180#define DDB0    0
181
182#define PORTB   _SFR_IO8(0x18)
183#define PB3     3
184#define PB2     2
185#define PB1     1
186#define PB0     0
187
188#define PINA    _SFR_IO8(0x19)
189#define PINA7   7
190#define PINA6   6
191#define PINA5   5
192#define PINA4   4
193#define PINA3   3
194#define PINA2   2
195#define PINA1   1
196#define PINA0   0
197
198#define DDRA    _SFR_IO8(0x1A)
199#define DDA7    7
200#define DDA6    6
201#define DDA5    5
202#define DDA4    4
203#define DDA3    3
204#define DDA2    2
205#define DDA1    1
206#define DDA0    0
207
208#define PORTA   _SFR_IO8(0x1B)
209#define PA7     7
210#define PA6     6
211#define PA5     5
212#define PA4     4
213#define PA3     3
214#define PA2     2
215#define PA1     1
216#define PA0     0
217
218/* EEPROM Control Register EECR */
219#define EECR    _SFR_IO8(0x1C)
220#define EEPM1   5
221#define EEPM0   4
222#define EERIE   3
223#define EEMPE   2
224#define EEPE    1
225#define EERE    0
226
227/* EEPROM Data Register */
228#define EEDR    _SFR_IO8(0x1D)
229
230/* EEPROM Address Register */
231#define EEAR    _SFR_IO16(0x1E)
232#define EEARL   _SFR_IO8(0x1E)
233#define EEARH   _SFR_IO8(0x1F)
234
235#define PCMSK1  _SFR_IO8(0x20)
236#define PCINT11 3
237#define PCINT10 2
238#define PCINT9  1
239#define PCINT8  0
240
241#define WDTCSR _SFR_IO8(0x21)
242#define WDIF    7
243#define WDIE    6
244#define WDP3    5
245#define WDCE    4
246#define WDE     3
247#define WDP2    2
248#define WDP1    1
249#define WDP0    0
250
251#define TCCR1C  _SFR_IO8(0x22)
252#define FOC1A   7
253#define FOC1B   6
254
255#define GTCCR   _SFR_IO8(0x23)
256#define TSM     7
257#define PSR10   0
258
259#define ICR1    _SFR_IO16(0x24)
260#define ICR1L   _SFR_IO8(0x24)
261#define ICR1H   _SFR_IO8(0x25)
262
263#define CLKPR   _SFR_IO8(0x26)
264#define CLKPCE  7
265#define CLKPS3  3
266#define CLKPS2  2
267#define CLKPS1  1
268#define CLKPS0  0
269
270#define DWDR    _SFR_IO8(0x27)
271
272#define OCR1B   _SFR_IO16(0x28)
273#define OCR1BL  _SFR_IO8(0x28)
274#define OCR1BH  _SFR_IO8(0x29)
275
276#define OCR1A   _SFR_IO16(0x2A)
277#define OCR1AL  _SFR_IO8(0x2A)
278#define OCR1AH  _SFR_IO8(0x2B)
279
280/* keep misspelled names from avr-libc 1.4.[0..1] for compatibility */
281#define OCRB1   _SFR_IO16(0x28)
282#define OCRB1L  _SFR_IO8(0x28)
283#define OCRB1H  _SFR_IO8(0x29)
284
285#define OCRA1   _SFR_IO16(0x2A)
286#define OCRA1L  _SFR_IO8(0x2A)
287#define OCRA1H  _SFR_IO8(0x2B)
288
289#define TCNT1   _SFR_IO16(0x2C)
290#define TCNT1L  _SFR_IO8(0x2C)
291#define TCNT1H  _SFR_IO8(0x2D)
292
293#define TCCR1B  _SFR_IO8(0x2E)
294#define ICNC1   7
295#define ICES1   6
296#define WGM13   4
297#define WGM12   3
298#define CS12    2
299#define CS11    1
300#define CS10    0
301
302#define TCCR1A  _SFR_IO8(0x2F)
303#define COM1A1  7
304#define COM1A0  6
305#define COM1B1  5
306#define COM1B0  4
307#define WGM11   1
308#define WGM10   0
309
310#define TCCR0A  _SFR_IO8(0x30)
311#define COM0A1  7
312#define COM0A0  6
313#define COM0B1  5
314#define COM0B0  4
315#define WGM01   1
316#define WGM00   0
317
318#define OSCCAL  _SFR_IO8(0x31)
319
320#define TCNT0   _SFR_IO8(0x32)
321
322#define TCCR0B  _SFR_IO8(0x33)
323#define FOC0A   7
324#define FOC0B   6
325#define WGM02   3
326#define CS02    2
327#define CS01    1
328#define CS00    0
329
330#define MCUSR   _SFR_IO8(0x34)
331#define WDRF    3
332#define BORF    2
333#define EXTRF   1
334#define PORF    0
335
336#define MCUCR   _SFR_IO8(0x35)
337#define BODS    7
338#define PUD     6
339#define SE      5
340#define SM1     4
341#define SM0     3
342#define BODSE   2
343#define ISC01   1
344#define ISC00   0
345
346#define OCR0A   _SFR_IO8(0x36)
347
348#define SPMCSR  _SFR_IO8(0x37)
349#define RSIG    5
350#define CTPB    4
351#define RFLB    3
352#define PGWRT   2
353#define PGERS   1
354#define SPMEN   0
355
356#define TIFR0   _SFR_IO8(0x38)
357#define OCF0B   2
358#define OCF0A   1
359#define TOV0    0
360
361#define TIMSK0  _SFR_IO8(0x39)
362#define OCIE0B  2
363#define OCIE0A  1
364#define TOIE0   0
365
366#define GIFR    _SFR_IO8(0x3A)
367#define INTF0   6
368#define PCIF1   5
369#define PCIF0   4
370
371#define GIMSK   _SFR_IO8(0x3B)
372#define INT0    6
373#define PCIE1   5
374#define PCIE0   4
375
376#define OCR0B   _SFR_IO8(0x3C)
377
378/* 0x3D..0x3E SP  [defined in <avr/io.h>] */
379/* 0x3F SREG      [defined in <avr/io.h>] */
380
381///---
382
383/* Interrupt vectors */
384/* Interrupt vector 0 is the reset vector. */
385/* External Interrupt Request 0 */
386#define INT0_vect                       _VECTOR(1)
387#define EXT_INT0_vect                   _VECTOR(1)
388#define SIG_INTERRUPT0                  _VECTOR(1)
389
390/* Pin Change Interrupt Request 0 */
391#define PCINT0_vect                     _VECTOR(2)
392#define SIG_PIN_CHANGE0                 _VECTOR(2)
393
394/* Pin Change Interrupt Request 1 */
395#define PCINT1_vect                     _VECTOR(3)
396#define SIG_PIN_CHANGE1                 _VECTOR(3)
397
398/* Watchdog Time-out */
399#define WDT_vect                        _VECTOR(4)
400#define WATCHDOG_vect                   _VECTOR(4)
401#define SIG_WATCHDOG_TIMEOUT            _VECTOR(4)
402
403/* Timer/Counter1 Capture Event */
404#define TIMER1_CAPT_vect                _VECTOR(5)
405#define TIM1_CAPT_vect                  _VECTOR(5)
406#define SIG_INPUT_CAPTURE1              _VECTOR(5)
407
408/* Timer/Counter1 Compare Match A */
409#define TIM1_COMPA_vect                 _VECTOR(6)
410#define SIG_OUTPUT_COMPARE1A            _VECTOR(6)
411
412/* Timer/Counter1 Compare Match B */
413#define TIM1_COMPB_vect                 _VECTOR(7)
414#define SIG_OUTPUT_COMPARE1B            _VECTOR(7)
415
416/* Timer/Counter1 Overflow */
417#define TIM1_OVF_vect                   _VECTOR(8)
418#define SIG_OVERFLOW1                   _VECTOR(8)
419
420/* Timer/Counter0 Compare Match A */
421#define TIM0_COMPA_vect                 _VECTOR(9)
422#define SIG_OUTPUT_COMPARE0A            _VECTOR(9)
423
424/* Timer/Counter0 Compare Match B */
425#define TIM0_COMPB_vect                 _VECTOR(10)
426#define SIG_OUTPUT_COMPARE0B            _VECTOR(10)
427
428/* Timer/Counter0 Overflow */
429#define TIM0_OVF_vect                   _VECTOR(11)
430#define SIG_OVERFLOW0                   _VECTOR(11)
431
432/* Analog Comparator */
433#define ANA_COMP_vect                   _VECTOR(12)
434#define SIG_COMPARATOR                  _VECTOR(12)
435
436/* ADC Conversion Complete */
437#define ADC_vect                        _VECTOR(13)
438#define SIG_ADC                         _VECTOR(13)
439
440/* EEPROM Ready */
441#define EE_RDY_vect                     _VECTOR(14)
442#define SIG_EEPROM_READY                _VECTOR(14)
443
444/* USI START */
445#define USI_START_vect                  _VECTOR(15)
446#define USI_STR_vect                    _VECTOR(15)
447#define SIG_USI_START                   _VECTOR(15)
448
449/* USI Overflow */
450#define USI_OVF_vect                    _VECTOR(16)
451#define SIG_USI_OVERFLOW                _VECTOR(16)
452
453#define _VECTORS_SIZE 34
454
455#endif /* _AVR_IOTNX4_H_ */
Note: See TracBrowser for help on using the repository browser.