1269 |
kakl |
1 |
/*! \file port128.h \brief Additional include for Mega128 to define individual port pins. */ |
|
|
2 |
//***************************************************************************** |
|
|
3 |
// |
|
|
4 |
// File Name : 'port128.h' |
|
|
5 |
// Title : Additional include for Mega128 to define individual port pins |
|
|
6 |
// Author : Pascal Stang |
|
|
7 |
// Created : 11/18/2002 |
|
|
8 |
// Revised : 11/18/2002 |
|
|
9 |
// Version : 1.1 |
|
|
10 |
// Target MCU : Atmel AVR series |
|
|
11 |
// Editor Tabs : 4 |
|
|
12 |
// |
|
|
13 |
// Description : This include file contains additional port and pin defines |
|
|
14 |
// to help make code transparently compatible with the mega128. As in |
|
|
15 |
// the other AVR processors, using defines like PD2 to denote PORTD, pin2 |
|
|
16 |
// is not absolutely necessary but enhances readability. The mega128 io.h |
|
|
17 |
// no longer defines individual pins of ports (like PD2 or PA5, for |
|
|
18 |
// example). Instead, port pins are defines universally for all ports as |
|
|
19 |
// PORT0 through PORT7. However, this renaming causes a code-portability |
|
|
20 |
// issue from non-mega128 AVRs to the mega128. Including this file will |
|
|
21 |
// replace the missing defines. |
|
|
22 |
// |
|
|
23 |
// This code is distributed under the GNU Public License |
|
|
24 |
// which can be found at http://www.gnu.org/licenses/gpl.txt |
|
|
25 |
// |
|
|
26 |
//***************************************************************************** |
|
|
27 |
|
|
|
28 |
#ifndef PORT128_H |
|
|
29 |
#define PORT128_H |
|
|
30 |
|
|
|
31 |
// Mega128 individual port defines |
|
|
32 |
// (using these is technically unnecessary but improves code compatibility to |
|
|
33 |
// the mega128 from other AVR processors where these values were still defined |
|
|
34 |
// in the io.h for that processor) |
|
|
35 |
|
|
|
36 |
// PORTA |
|
|
37 |
#define PA0 PORT0 |
|
|
38 |
#define PA1 PORT1 |
|
|
39 |
#define PA2 PORT2 |
|
|
40 |
#define PA3 PORT3 |
|
|
41 |
#define PA4 PORT4 |
|
|
42 |
#define PA5 PORT5 |
|
|
43 |
#define PA6 PORT6 |
|
|
44 |
#define PA7 PORT7 |
|
|
45 |
// PORTB |
|
|
46 |
#define PB0 PORT0 |
|
|
47 |
#define PB1 PORT1 |
|
|
48 |
#define PB2 PORT2 |
|
|
49 |
#define PB3 PORT3 |
|
|
50 |
#define PB4 PORT4 |
|
|
51 |
#define PB5 PORT5 |
|
|
52 |
#define PB6 PORT6 |
|
|
53 |
#define PB7 PORT7 |
|
|
54 |
// PORTC |
|
|
55 |
#define PC0 PORT0 |
|
|
56 |
#define PC1 PORT1 |
|
|
57 |
#define PC2 PORT2 |
|
|
58 |
#define PC3 PORT3 |
|
|
59 |
#define PC4 PORT4 |
|
|
60 |
#define PC5 PORT5 |
|
|
61 |
#define PC6 PORT6 |
|
|
62 |
#define PC7 PORT7 |
|
|
63 |
// PORTD |
|
|
64 |
#define PD0 PORT0 |
|
|
65 |
#define PD1 PORT1 |
|
|
66 |
#define PD2 PORT2 |
|
|
67 |
#define PD3 PORT3 |
|
|
68 |
#define PD4 PORT4 |
|
|
69 |
#define PD5 PORT5 |
|
|
70 |
#define PD6 PORT6 |
|
|
71 |
#define PD7 PORT7 |
|
|
72 |
// PORTE |
|
|
73 |
#define PE0 PORT0 |
|
|
74 |
#define PE1 PORT1 |
|
|
75 |
#define PE2 PORT2 |
|
|
76 |
#define PE3 PORT3 |
|
|
77 |
#define PE4 PORT4 |
|
|
78 |
#define PE5 PORT5 |
|
|
79 |
#define PE6 PORT6 |
|
|
80 |
#define PE7 PORT7 |
|
|
81 |
// PORTF |
|
|
82 |
#define PF0 PORT0 |
|
|
83 |
#define PF1 PORT1 |
|
|
84 |
#define PF2 PORT2 |
|
|
85 |
#define PF3 PORT3 |
|
|
86 |
#define PF4 PORT4 |
|
|
87 |
#define PF5 PORT5 |
|
|
88 |
#define PF6 PORT6 |
|
|
89 |
#define PF7 PORT7 |
|
|
90 |
// PORTG |
|
|
91 |
#define PG0 PORT0 |
|
|
92 |
#define PG1 PORT1 |
|
|
93 |
#define PG2 PORT2 |
|
|
94 |
#define PG3 PORT3 |
|
|
95 |
#define PG4 PORT4 |
|
|
96 |
#define PG5 PORT5 |
|
|
97 |
|
|
|
98 |
#endif |