source: rtems/cpukit/score/cpu/avr/avr/ioat94k.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: 13.8 KB
Line 
1/* Copyright (c) 2002, Marek Michalkiewicz
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/ioat94k.h - definitions for AT94K series FPSLIC(tm) */
33
34#ifndef _AVR_IOAT94K_H_
35#define _AVR_IOAT94K_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_ "ioat94k.h"
45#else
46#  error "Attempt to include more than one <avr/ioXXX.h> file."
47#endif
48
49/* I/O registers */
50
51/* UART1 Baud Rate Register */
52#define UBRR1   _SFR_IO8(0x00)
53
54/* UART1 Control and Status Registers */
55#define UCSR1B  _SFR_IO8(0x01)
56#define UCSR1A  _SFR_IO8(0x02)
57
58/* UART1 I/O Data Register */
59#define UDR1    _SFR_IO8(0x03)
60
61/* 0x04 reserved */
62
63/* Input Pins, Port E */
64#define PINE    _SFR_IO8(0x05)
65
66/* Data Direction Register, Port E */
67#define DDRE    _SFR_IO8(0x06)
68
69/* Data Register, Port E */
70#define PORTE   _SFR_IO8(0x07)
71
72/* On Chip Debug Register (reserved) */
73#define OCDR    _SFR_IO8(0x08)
74
75/* UART0 Baud Rate Register */
76#define UBRR0   _SFR_IO8(0x09)
77
78/* UART0 Control and Status Registers */
79#define UCSR0B  _SFR_IO8(0x0A)
80#define UCSR0A  _SFR_IO8(0x0B)
81
82/* UART0 I/O Data Register */
83#define UDR0    _SFR_IO8(0x0C)
84
85/* 0x0D..0x0F reserved */
86
87/* Input Pins, Port D */
88#define PIND    _SFR_IO8(0x10)
89
90/* Data Direction Register, Port D */
91#define DDRD    _SFR_IO8(0x11)
92
93/* Data Register, Port D */
94#define PORTD   _SFR_IO8(0x12)
95
96/* FPGA I/O Select Control Register */
97#define FISCR   _SFR_IO8(0x13)
98
99/* FPGA I/O Select Registers A, B, C, D */
100#define FISUA   _SFR_IO8(0x14)
101#define FISUB   _SFR_IO8(0x15)
102#define FISUC   _SFR_IO8(0x16)
103#define FISUD   _SFR_IO8(0x17)
104
105/* FPGA Cache Logic(R) registers (top secret, under NDA) */
106#define FPGAX   _SFR_IO8(0x18)
107#define FPGAY   _SFR_IO8(0x19)
108#define FPGAZ   _SFR_IO8(0x1A)
109#define FPGAD   _SFR_IO8(0x1B)
110
111/* TWI stands for "Two Wire Interface" or "TWI Was I2C(tm)" */
112
113/* 2-wire Serial Bit Rate Register */
114#define TWBR    _SFR_IO8(0x1C)
115
116/* 2-wire Serial Status Register */
117#define TWSR    _SFR_IO8(0x1D)
118
119/* 2-wire Serial (Slave) Address Register */
120#define TWAR    _SFR_IO8(0x1E)
121
122/* 2-wire Serial Data Register */
123#define TWDR    _SFR_IO8(0x1F)
124
125/* UART Baud Register High */
126#define UBRRH   _SFR_IO8(0x20)
127#define UBRRHI  UBRRH           /* New name in datasheet (1138F-FPSLI-06/02) */
128
129/* Watchdog Timer Control Register */
130#define WDTCR   _SFR_IO8(0x21)
131
132/* Timer/Counter2 Output Compare Register */
133#define OCR2    _SFR_IO8(0x22)
134
135/* Timer/Counter2 (8-bit) */
136#define TCNT2   _SFR_IO8(0x23)
137
138/* Timer/Counter1 Input Capture Register */
139#define ICR1    _SFR_IO16(0x24)
140#define ICR1L   _SFR_IO8(0x24)
141#define ICR1H   _SFR_IO8(0x25)
142
143/* Asynchronous mode StatuS Register */
144#define ASSR    _SFR_IO8(0x26)
145
146/* Timer/Counter2 Control Register */
147#define TCCR2   _SFR_IO8(0x27)
148
149/* Timer/Counter1 Output Compare RegisterB */
150#define OCR1B   _SFR_IO16(0x28)
151#define OCR1BL  _SFR_IO8(0x28)
152#define OCR1BH  _SFR_IO8(0x29)
153
154/* Timer/Counter1 Output Compare RegisterA */
155#define OCR1A   _SFR_IO16(0x2A)
156#define OCR1AL  _SFR_IO8(0x2A)
157#define OCR1AH  _SFR_IO8(0x2B)
158
159/* Timer/Counter1 */
160#define TCNT1   _SFR_IO16(0x2C)
161#define TCNT1L  _SFR_IO8(0x2C)
162#define TCNT1H  _SFR_IO8(0x2D)
163
164/* Timer/Counter1 Control Register B */
165#define TCCR1B  _SFR_IO8(0x2E)
166
167/* Timer/Counter1 Control Register A */
168#define TCCR1A  _SFR_IO8(0x2F)
169
170/* Special Function IO Register */
171#define SFIOR   _SFR_IO8(0x30)
172
173/* Timer/Counter0 Output Compare Register */
174#define OCR0    _SFR_IO8(0x31)
175
176/* Timer/Counter0 (8-bit) */
177#define TCNT0   _SFR_IO8(0x32)
178
179/* Timer/Counter0 Control Register */
180#define TCCR0   _SFR_IO8(0x33)
181
182/* 0x34 reserved */
183
184/* MCU Control/Status Register */
185#define MCUR    _SFR_IO8(0x35)
186
187/* 2-wire Serial Control Register */
188#define TWCR    _SFR_IO8(0x36)
189
190/* 0x37 reserved */
191
192/* Timer/Counter Interrupt Flag Register */
193#define TIFR    _SFR_IO8(0x38)
194
195/* Timer/Counter Interrupt MaSK Register */
196#define TIMSK   _SFR_IO8(0x39)
197
198/* Software Control Register */
199#define SFTCR   _SFR_IO8(0x3A)
200
201/* External Interrupt Mask/Flag Register */
202#define EIMF    _SFR_IO8(0x3B)
203
204/* 0x3C reserved */
205
206/* 0x3D..0x3E SP */
207
208/* 0x3F SREG */
209
210/* Interrupt vectors */
211
212#define SIG_FPGA_INTERRUPT0     _VECTOR(1)   /* FPGA_INT0  */       
213#define SIG_INTERRUPT0          _VECTOR(2)   /* EXT_INT0   */
214#define SIG_FPGA_INTERRUPT1     _VECTOR(3)   /* FPGA_INT1  */       
215#define SIG_INTERRUPT1          _VECTOR(4)   /* EXT_INT1   */
216#define SIG_FPGA_INTERRUPT2     _VECTOR(5)   /* FPGA_INT2  */       
217#define SIG_INTERRUPT2          _VECTOR(6)   /* EXT_INT2   */
218#define SIG_FPGA_INTERRUPT3     _VECTOR(7)   /* FPGA_INT3  */       
219#define SIG_INTERRUPT3          _VECTOR(8)   /* EXT_INT3   */
220#define SIG_OUTPUT_COMPARE2     _VECTOR(9)   /* TIM2_COMP  */       
221#define SIG_OVERFLOW2           _VECTOR(10)  /* TIM2_OVF   */       
222#define SIG_INPUT_CAPTURE1      _VECTOR(11)  /* TIM1_CAPT  */       
223#define SIG_OUTPUT_COMPARE1A    _VECTOR(12)  /* TIM1_COMPA */       
224#define SIG_OUTPUT_COMPARE1B    _VECTOR(13)  /* TIM1_COMPB */       
225#define SIG_OVERFLOW1           _VECTOR(14)  /* TIM1_OVF   */       
226#define SIG_OUTPUT_COMPARE0     _VECTOR(15)  /* TIM0_COMP  */       
227#define SIG_OVERFLOW0           _VECTOR(16)  /* TIM0_OVF   */       
228#define SIG_FPGA_INTERRUPT4     _VECTOR(17)  /* FPGA_INT4  */       
229#define SIG_FPGA_INTERRUPT5     _VECTOR(18)  /* FPGA_INT5  */       
230#define SIG_FPGA_INTERRUPT6     _VECTOR(19)  /* FPGA_INT6  */       
231#define SIG_FPGA_INTERRUPT7     _VECTOR(20)  /* FPGA_INT7  */       
232#define SIG_UART0_RECV          _VECTOR(21)  /* UART0_RXC  */
233#define SIG_UART0_DATA          _VECTOR(22)  /* UART0_DRE  */
234#define SIG_UART0_TRANS         _VECTOR(23)  /* UART0_TXC  */
235#define SIG_FPGA_INTERRUPT8     _VECTOR(24)  /* FPGA_INT8  */       
236#define SIG_FPGA_INTERRUPT9     _VECTOR(25)  /* FPGA_INT9  */       
237#define SIG_FPGA_INTERRUPT10    _VECTOR(26)  /* FPGA_INT10 */       
238#define SIG_FPGA_INTERRUPT11    _VECTOR(27)  /* FPGA_INT11 */       
239#define SIG_UART1_RECV          _VECTOR(28)  /* UART1_RXC  */
240#define SIG_UART1_DATA          _VECTOR(29)  /* UART1_DRE  */
241#define SIG_UART1_TRANS         _VECTOR(30)  /* UART1_TXC  */
242#define SIG_FPGA_INTERRUPT12    _VECTOR(31)  /* FPGA_INT12 */
243#define SIG_FPGA_INTERRUPT13    _VECTOR(32)  /* FPGA_INT13 */
244#define SIG_FPGA_INTERRUPT14    _VECTOR(33)  /* FPGA_INT14 */
245#define SIG_FPGA_INTERRUPT15    _VECTOR(34)  /* FPGA_INT15 */
246#define SIG_2WIRE_SERIAL        _VECTOR(35)  /* TWS_INT    */
247
248#define _VECTORS_SIZE 144
249
250/* Bit numbers (SFRs alphabetically sorted) */
251
252/* ASSR */
253#define AS2           3
254#define TCN2UB        2
255#define OCR2UB        1
256#define TCR2UB        0
257
258/* DDRD */
259#define DDD7          7
260#define DDD6          6
261#define DDD5          5
262#define DDD4          4
263#define DDD3          3
264#define DDD2          2
265#define DDD1          1
266#define DDD0          0
267
268/* DDRE */
269#define DDE7          7
270#define DDE6          6
271#define DDE5          5
272#define DDE4          4
273#define DDE3          3
274#define DDE2          2
275#define DDE1          1
276#define DDE0          0
277
278/* EIMF */
279#define INTF3         7
280#define INTF2         6
281#define INTF1         5
282#define INTF0         4
283#define INT3          3
284#define INT2          2
285#define INT1          1
286#define INT0          0
287
288/* FISCR */
289#define FIADR         7
290#define XFIS1         1
291#define XFIS0         0
292
293/* FISUA */
294#define FIF3          7
295#define FIF2          6
296#define FIF1          5
297#define FIF0          4
298#define FINT3         3
299#define FINT2         2
300#define FINT1         1
301#define FINT0         0
302
303/* FISUB */
304#define FIF7          7
305#define FIF6          6
306#define FIF5          5
307#define FIF4          4
308#define FINT7         3
309#define FINT6         2
310#define FINT5         1
311#define FINT4         0
312
313/* FISUC */
314#define FIF11         7
315#define FIF10         6
316#define FIF9          5
317#define FIF8          4
318#define FINT11        3
319#define FINT10        2
320#define FINT9         1
321#define FINT8         0
322
323/* FISUD */
324#define FIF15         7
325#define FIF14         6
326#define FIF13         5
327#define FIF12         4
328#define FINT15        3
329#define FINT14        2
330#define FINT13        1
331#define FINT12        0
332
333/* MCUR */
334#define JTRF          7
335#define JTD           6
336#define SE            5
337#define SM1           4
338#define SM0           3
339#define PORF          2
340#define WDRF          1
341#define EXTRF         0
342
343/* OCDR (reserved) */
344#define IDRD          7
345
346/* PIND */
347#define PIND7         7
348#define PIND6         6
349#define PIND5         5
350#define PIND4         4
351#define PIND3         3
352#define PIND2         2
353#define PIND1         1
354#define PIND0         0
355
356/* PINE */
357#define PINE7         7
358#define PINE6         6
359#define PINE5         5
360#define PINE4         4
361#define PINE3         3
362#define PINE2         2
363#define PINE1         1
364#define PINE0         0
365
366/* PORTD */
367#define PD7        7
368#define PD6        6
369#define PD5        5
370#define PD4        4
371#define PD3        3
372#define PD2        2
373#define PD1        1
374#define PD0        0
375
376/* PORTE */
377/*
378   PE7 = IC1  / INT3 (alternate)
379   PE6 = OC1A / INT2 (alternate)
380   PE5 = OC1B / INT1 (alternate)
381   PE4 = ET11 / INT0 (alternate)
382   PE3 = OC2  / RX1  (alternate)
383   PE2 =      / TX1  (alternate)
384   PE1 = OC0  / RX0  (alternate)
385   PE0 = ET0  / TX0  (alternate)
386 */
387#define PE7        7
388#define PE6        6
389#define PE5        5
390#define PE4        4
391#define PE3        3
392#define PE2        2
393#define PE1        1
394#define PE0        0
395
396/* SFIOR */
397#define PSR2          1
398#define PSR10         0
399
400/* SFTCR */
401#define FMXOR         3
402#define WDTS          2
403#define DBG           1
404#define SRST          0
405
406/* TCCR0 */
407#define FOC0          7
408#define PWM0          6
409#define COM01         5
410#define COM00         4
411#define CTC0          3
412#define CS02          2
413#define CS01          1
414#define CS00          0
415
416/* TCCR1A */
417#define COM1A1        7
418#define COM1A0        6
419#define COM1B1        5
420#define COM1B0        4
421#define FOC1A         3
422#define FOC1B         2
423#define PWM11         1
424#define PWM10         0
425
426/* TCCR1B */
427#define ICNC1         7
428#define ICES1         6
429#define ICPE          5
430#define CTC1          3
431#define CS12          2
432#define CS11          1
433#define CS10          0
434
435/* TCCR2 */
436#define FOC2          7
437#define PWM2          6
438#define COM21         5
439#define COM20         4
440#define CTC2          3
441#define CS22          2
442#define CS21          1
443#define CS20          0
444
445/* TIFR */
446#define TOV1          7
447#define OCF1A         6
448#define OCF1B         5
449#define TOV2          4
450#define ICF1          3
451#define OCF2          2
452#define TOV0          1
453#define OCF0          0
454
455/* TIMSK */
456#define TOIE1         7
457#define OCIE1A        6
458#define OCIE1B        5
459#define TOIE2         4
460#define TICIE1        3
461#define OCIE2         2
462#define TOIE0         1
463#define OCIE0         0
464
465/* TWAR */
466/* #define TWA           1 */ /* TWA is bits 7:1 */
467#define TWGCE         0
468
469/* TWCR */
470#define TWINT         7
471#define TWEA          6
472#define TWSTA         5
473#define TWSTO         4
474#define TWWC          3
475#define TWEN          2
476#define TWIE          0
477
478/* TWSR */
479#define TWS7          7
480#define TWS6          6
481#define TWS5          5
482#define TWS4          4
483#define TWS3          3
484
485/* UBRRHI
486   Bits 11..8 of UART1 are bits 7..4 of UBRRHI.
487   Bits 11..8 of UART0 are bits 3..0 of UBRRHI. */
488/* #define UBRRHI1       4 */
489/* #define UBRRHI0       0 */
490
491/* UCSR0A */
492#define RXC0          7
493#define TXC0          6
494#define UDRE0         5
495#define FE0           4
496#define OR0           3
497#define U2X0          1
498#define MPCM0         0
499
500/* UCSR0B */
501#define RXCIE0        7
502#define TXCIE0        6
503#define UDRIE0        5
504#define RXEN0         4
505#define TXEN0         3
506#define CHR90         2
507#define RXB80         1
508#define TXB80         0
509
510/* UCSR1A */
511#define RXC1          7
512#define TXC1          6
513#define UDRE1         5
514#define FE1           4
515#define OR1           3
516#define U2X1          1
517#define MPCM1         0
518
519/* UCSR1B */
520#define RXCIE1        7
521#define TXCIE1        6
522#define UDRIE1        5
523#define RXEN1         4
524#define TXEN1         3
525#define CHR91         2
526#define RXB81         1
527#define TXB81         0
528
529/* WDTCR */
530#define WDTOE         4
531#define WDE           3
532#define WDP2          2
533#define WDP1          1
534#define WDP0          0
535
536/*
537   Last memory addresses - depending on configuration, it is possible
538   to have 20K-32K of program memory and 4K-16K of data memory
539   (all in the same 36K total of SRAM, loaded from external EEPROM).
540 */
541
542#ifndef RAMEND
543#define RAMEND 0x0FFF
544#endif
545
546#ifndef XRAMEND
547#define XRAMEND RAMEND
548#endif
549
550#define E2END 0
551
552#ifndef FLASHEND
553#define FLASHEND 0x7FFF
554#endif
555
556#endif /* _AVR_IOAT94K_H_ */
Note: See TracBrowser for help on using the repository browser.