source: rtems/cpukit/score/cpu/avr/avr/iotnx61.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: 10.6 KB
Line 
1/* Copyright (c) 2006, 2007 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/iotnx61.h - definitions for ATtiny261, ATtiny461 and ATtiny861 */
33
34/* This file should only be included from <avr/io.h>, never directly. */
35
36#ifndef _AVR_IO_H_
37#  error "Include <avr/io.h> instead of this file."
38#endif
39
40#ifndef _AVR_IOXXX_H_
41#  define _AVR_IOXXX_H_ "iotnx61.h"
42#else
43#  error "Attempt to include more than one <avr/ioXXX.h> file."
44#endif
45
46#ifndef _AVR_IOTNx61_H_
47#define _AVR_IOTNx61_H_ 1
48
49/* Registers and associated bit numbers */
50
51#define TCCR1E  _SFR_IO8(0x00)
52#define OC1OE0  0
53#define OC1OE1  1
54#define OC1OE2  2
55#define OC1OE3  3
56#define OC1OE4  4
57#define OC1OE5  5
58
59#define DIDR0   _SFR_IO8(0x01)
60#define ADC0D   0
61#define ADC1D   1
62#define ADC2D   2
63#define AREFD   3
64#define ADC3D   4
65#define ADC4D   5
66#define ADC5D   6
67#define ADC6D   7
68
69#define DIDR1   _SFR_IO8(0x02)
70#define ADC7D   4
71#define ADC8D   5
72#define ADC9D   6
73#define ADC10D  7
74
75#define ADCSRB  _SFR_IO8(0x03)
76#define ADTS0   0
77#define ADTS1   1
78#define ADTS2   2
79#define MUX5    3
80#define REFS2   4
81#define IRP     5
82#define GSEL    6
83#define BIN     7
84
85#define ADCW    _SFR_IO16(0x04)
86#ifndef __ASSEMBLER__
87#define ADC     _SFR_IO16(0x04)
88#endif
89
90#define ADCL    _SFR_IO8(0x04)
91#define ADCH    _SFR_IO8(0x05)
92
93#define ADCSRA  _SFR_IO8(0x06)
94#define ADPS0   0
95#define ADPS1   1
96#define ADPS2   2
97#define ADIE    3
98#define ADIF    4
99#define ADATE   5
100#define ADSC    6
101#define ADEN    7
102
103#define ADMUX   _SFR_IO8(0x07)
104#define MUX0    0
105#define MUX1    1
106#define MUX2    2
107#define MUX3    3
108#define MUX4    4
109#define ADLAR   5
110#define REFS0   6
111#define REFS1   7
112
113#define ACSRA   _SFR_IO8(0x08)
114#define ACIS0   0
115#define ACIS1   1
116#define ACME    2
117#define ACIE    3
118#define ACI     4
119#define ACO     5
120#define ACBG    6
121#define ACD     7
122
123#define ACSRB   _SFR_IO8(0x09)
124#define ACM0    0
125#define ACM1    1
126#define ACM2    2
127#define HLEV    6
128#define HSEL    7
129
130#define GPIOR0  _SFR_IO8(0x0A)
131
132#define GPIOR1  _SFR_IO8(0x0B)
133
134#define GPIOR2  _SFR_IO8(0x0C)
135
136#define USICR   _SFR_IO8(0x0D)
137#define USITC   0
138#define USICLK  1
139#define USICS0  2
140#define USICS1  3
141#define USIWM0  4
142#define USIWM1  5
143#define USIOIE  6
144#define USISIE  7
145
146#define USISR   _SFR_IO8(0x0E)
147#define USICNT0 0
148#define USICNT1 1
149#define USICNT2 2
150#define USICNT3 3
151#define USIDC   4
152#define USIPF   5
153#define USIOIF  6
154#define USISIF  7
155
156#define USIDR   _SFR_IO8(0x0F)
157
158#define USIBR   _SFR_IO8(0x10)
159
160#define USIPP   _SFR_IO8(0x11)
161#define USIPOS  0
162
163#define OCR0B   _SFR_IO8(0x12)
164
165#define OCR0A   _SFR_IO8(0x13)
166
167#define TCNT0H  _SFR_IO8(0x14)
168
169#define TCCR0A  _SFR_IO8(0x15)
170#define WGM00   0
171#define ACIC0   3
172#define ICES0   4
173#define ICNC0   5
174#define ICEN0   6
175#define TCW0    7
176
177#define PINB    _SFR_IO8(0x16)
178#define PINB0   0
179#define PINB1   1
180#define PINB2   2
181#define PINB3   3
182#define PINB4   4
183#define PINB5   5
184#define PINB6   6
185#define PINB7   7
186
187#define DDRB    _SFR_IO8(0x17)
188#define DDB0    0
189#define DDB1    1
190#define DDB2    2
191#define DDB3    3
192#define DDB4    4
193#define DDB5    5
194#define DDB6    6
195#define DDB7    7
196
197#define PORTB   _SFR_IO8(0x18)
198#define PB0     0
199#define PB1     1
200#define PB2     2
201#define PB3     3
202#define PB4     4
203#define PB5     5
204#define PB6     6
205#define PB7     7
206
207#define PINA    _SFR_IO8(0x19)
208#define PINA0   0
209#define PINA1   1
210#define PINA2   2
211#define PINA3   3
212#define PINA4   4
213#define PINA5   5
214#define PINA6   6
215#define PINA7   7
216
217#define DDRA    _SFR_IO8(0x1A)
218#define DDA0    0
219#define DDA1    1
220#define DDA2    2
221#define DDA3    3
222#define DDA4    4
223#define DDA5    5
224#define DDA6    6
225#define DDA7    7
226
227#define PORTA   _SFR_IO8(0x1B)
228#define PA0     0
229#define PA1     1
230#define PA2     2
231#define PA3     3
232#define PA4     4
233#define PA5     5
234#define PA6     6
235#define PA7     7
236
237/* EEPROM Control Register */
238#define EECR    _SFR_IO8(0x1C)
239#define EERE    0
240#define EEPE    1
241#define EEMPE   2
242#define EERIE   3
243#define EEPM0   4
244#define EEPM1   5
245
246/* EEPROM Data Register */
247#define EEDR    _SFR_IO8(0x1D)
248
249/* EEPROM Address Register */
250#define EEAR    _SFR_IO16(0x1E)
251#define EEARL   _SFR_IO8(0x1E)
252#define EEARH   _SFR_IO8(0x1F)
253
254#define DWDR    _SFR_IO8(0x20)
255
256#define WDTCR   _SFR_IO8(0x21)
257#define WDP0    0
258#define WDP1    1
259#define WDP2    2
260#define WDE     3
261#define WDCE    4
262#define WDP3    5
263#define WDIE    6
264#define WDIF    7
265
266#define PCMSK1  _SFR_IO8(0x22)
267#define PCINT8  0
268#define PCINT9  1
269#define PCINT10 2
270#define PCINT11 3
271#define PCINT12 4
272#define PCINT13 5
273#define PCINT14 6
274#define PCINT15 7
275
276#define PCMSK0  _SFR_IO8(0x23)
277#define PCINT0  0
278#define PCINT1  1
279#define PCINT2  2
280#define PCINT3  3
281#define PCINT4  4
282#define PCINT5  5
283#define PCINT6  6
284#define PCINT7  7
285
286#define DT1     _SFR_IO8(0x24)
287#define DT1L0   0
288#define DT1L1   1
289#define DT1L2   2
290#define DT1L3   3
291#define DT1H0   4
292#define DT1H1   5
293#define DT1H2   6
294#define DT1H3   7
295
296#define TC1H    _SFR_IO8(0x25)
297#define TC18    0
298#define TC19    1
299
300#define TCCR1D  _SFR_IO8(0x26)
301#define WGM10   0
302#define WGM11   1
303#define FPF1    2
304#define FPAC1   3
305#define FPES1   4
306#define FPNC1   5
307#define FPEN1   6
308#define FPIE1   7
309
310#define TCCR1C  _SFR_IO8(0x27)
311#define PWM1D   0
312#define FOC1D   1
313#define COM1D0  2
314#define COM1D1  3
315#define COM1B0S 4
316#define COM1B1S 5
317#define COM1A0S 6
318#define COM1A1S 7
319
320#define CLKPR   _SFR_IO8(0x28)
321#define CLKPS0  0
322#define CLKPS1  1
323#define CLKPS2  2
324#define CLKPS3  3
325#define CLKPCE  7
326
327#define PLLCSR  _SFR_IO8(0x29)
328#define PLOCK   0
329#define PLLE    1
330#define PCKE    2
331#define LSM     7
332
333#define OCR1D   _SFR_IO8(0x2A)
334
335#define OCR1C   _SFR_IO8(0x2B)
336
337#define OCR1B   _SFR_IO8(0x2C)
338
339#define OCR1A   _SFR_IO8(0x2D)
340
341#define TCNT1   _SFR_IO8(0x2E)
342
343#define TCCR1B  _SFR_IO8(0x2F)
344#define CS10    0
345#define CS11    1
346#define CS12    2
347#define CS13    3
348#define DTPS10  4
349#define DTPS11  5
350#define PSR1    6
351#define PWM1X   7
352
353#define TCCR1A  _SFR_IO8(0x30)
354#define PWM1B   0
355#define PWM1A   1
356#define FOC1B   2
357#define FOC1A   3
358#define COM1B0  4
359#define COM1B1  5
360#define COM1A0  6
361#define COM1A1  7
362
363#define OSCCAL  _SFR_IO8(0x31)
364
365#define TCNT0L  _SFR_IO8(0x32)
366
367#define TCCR0B  _SFR_IO8(0x33)
368#define CS00    0
369#define CS01    1
370#define CS02    2
371#define PSR0    3
372#define TSM     4
373
374#define MCUSR   _SFR_IO8(0x34)
375#define PORF    0
376#define EXTRF   1
377#define BORF    2
378#define WDRF    3
379
380#define MCUCR   _SFR_IO8(0x35)
381#define ISC00   0
382#define ISC01   1
383#define SM0     3
384#define SM1     4
385#define SE      5
386#define PUD     6
387
388#define PRR     _SFR_IO8(0x36)
389#define PRADC   0
390#define PRUSI   1
391#define PRTIM0  2
392#define PRTIM1  3
393
394#define SPMCSR  _SFR_IO8(0x37)
395#define SPMEN   0
396#define PGERS   1
397#define PGWRT 2
398#define RFLB 3
399#define CTPB 4
400
401#define TIFR    _SFR_IO8(0x38)
402#define ICF0    0
403#define TOV0    1
404#define TOV1    2
405#define OCF0B   3
406#define OCF0A   4
407#define OCF1B   5
408#define OCF1A   6
409#define OCF1D   7
410
411#define TIMSK   _SFR_IO8(0x39)
412#define TICIE0  0
413#define TOIE0   1
414#define TOIE1   2
415#define OCIE0B  3
416#define OCIE0A  4
417#define OCIE1B  5
418#define OCIE1A  6
419#define OCIE1D  7
420
421#define GIFR    _SFR_IO8(0x3A)
422#define PCIF    5
423#define INTF0   6
424#define INTF1   7
425
426#define GIMSK   _SFR_IO8(0x3B)
427#define PCIE0   4
428#define PCIE1   5
429#define INT0    6
430#define INT1    7
431
432/* Reserved [0x3C] */
433
434/* 0x3D..0x3E SP  [defined in <avr/io.h>] */
435/* 0x3F SREG      [defined in <avr/io.h>] */
436
437
438/* Interrupt vectors */
439/* Interrupt vector 0 is the reset vector. */
440/* External Interrupt 0 */
441#define INT0_vect                       _VECTOR(1)
442#define SIG_INTERRUPT0                  _VECTOR(1)
443
444/* Pin Change Interrupt */
445#define PCINT_vect                      _VECTOR(2)
446#define SIG_PIN_CHANGE                  _VECTOR(2)
447
448/* Timer/Counter1 Compare Match 1A */
449#define TIMER1_COMPA_vect               _VECTOR(3)
450#define SIG_OUTPUT_COMPARE1A            _VECTOR(3)
451
452/* Timer/Counter1 Compare Match 1B */
453#define TIMER1_COMPB_vect               _VECTOR(4)
454#define SIG_OUTPUT_COMPARE1B            _VECTOR(4)
455
456/* Timer/Counter1 Overflow */
457#define TIMER1_OVF_vect                 _VECTOR(5)
458#define SIG_OVERFLOW1                   _VECTOR(5)
459
460/* Timer/Counter0 Overflow */
461#define TIMER0_OVF_vect                 _VECTOR(6)
462#define SIG_OVERFLOW0                   _VECTOR(6)
463
464/* USI Start */
465#define USI_START_vect                  _VECTOR(7)
466#define SIG_USI_START                   _VECTOR(7)
467
468/* USI Overflow */
469#define USI_OVF_vect                    _VECTOR(8)
470#define SIG_USI_OVERFLOW                _VECTOR(8)
471
472/* EEPROM Ready */
473#define EE_RDY_vect                     _VECTOR(9)
474#define SIG_EEPROM_READY                _VECTOR(9)
475
476/* Analog Comparator */
477#define ANA_COMP_vect                   _VECTOR(10)
478#define SIG_ANA_COMP                    _VECTOR(10)
479#define SIG_COMPARATOR                  _VECTOR(10)
480
481/* ADC Conversion Complete */
482#define ADC_vect                        _VECTOR(11)
483#define SIG_ADC                         _VECTOR(11)
484
485/* Watchdog Time-Out */
486#define WDT_vect                        _VECTOR(12)
487#define SIG_WDT                         _VECTOR(12)
488
489/* External Interrupt 1 */
490#define INT1_vect                       _VECTOR(13)
491#define SIG_INTERRUPT1                  _VECTOR(13)
492
493/* Timer/Counter0 Compare Match A */
494#define TIMER0_COMPA_vect               _VECTOR(14)
495#define SIG_OUTPUT_COMPARE0A            _VECTOR(14)
496
497/* Timer/Counter0 Compare Match B */
498#define TIMER0_COMPB_vect               _VECTOR(15)
499#define SIG_OUTPUT_COMPARE0B            _VECTOR(15)
500
501/* ADC Conversion Complete */
502#define TIMER0_CAPT_vect                _VECTOR(16)
503#define SIG_INPUT_CAPTURE0              _VECTOR(16)
504
505/* Timer/Counter1 Compare Match D */
506#define TIMER1_COMPD_vect               _VECTOR(17)
507#define SIG_OUTPUT_COMPARE0D            _VECTOR(17)
508
509/* Timer/Counter1 Fault Protection */
510#define FAULT_PROTECTION_vect           _VECTOR(18)
511
512#define _VECTORS_SIZE 38
513
514#endif  /* _AVR_IOTNx61_H_ */
Note: See TracBrowser for help on using the repository browser.