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

4.115
Last change on this file since b697bc6 was b697bc6, checked in by Joel Sherrill <joel.sherrill@…>, on 01/10/13 at 21:06:42

cpukit: Use Consistent Beginning of Doxygen Group Notation

This is the result of a sed script which converts all uses
of @{ into a consistent form.

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