Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

# port128.h

Go to the documentation of this file.

    00001 /*! \file port128.h \brief Additional include for Mega128 to define individual port pins. */
    00002 //*****************************************************************************
    00003 //
    00004 // File Name    : 'port128.h'
    00005 // Title        : Additional include for Mega128 to define individual port pins
    00006 // Author       : Pascal Stang
    00007 // Created      : 11/18/2002
    00008 // Revised      : 11/18/2002
    00009 // Version      : 1.1
    00010 // Target MCU   : Atmel AVR series
    00011 // Editor Tabs  : 4
    00012 //
    00013 //  Description : This include file contains additional port and pin defines
    00014 //      to help make code transparently compatible with the mega128.  As in
    00015 //      the other AVR processors, using defines like PD2 to denote PORTD, pin2
    00016 //      is not absolutely necessary but enhances readability.  The mega128 io.h
    00017 //      no longer defines individual pins of ports (like PD2 or PA5, for
    00018 //      example).  Instead, port pins are defines universally for all ports as
    00019 //      PORT0 through PORT7.  However, this renaming causes a code-portability
    00020 //      issue from non-mega128 AVRs to the mega128.  Including this file will
    00021 //      replace the missing defines.
    00022 //
    00023 // This code is distributed under the GNU Public License
    00024 //      which can be found at http://www.gnu.org/licenses/gpl.txt
    00025 //
    00026 //*****************************************************************************
    00027
    00028 #ifndef PORT128_H
    00029 #define PORT128_H
    00030
    00031 // Mega128 individual port defines
    00032 // (using these is technically unnecessary but improves code compatibility to
    00033 //  the mega128 from other AVR processors where these values were still defined
    00034 //  in the io.h for that processor)
    00035
    00036 // PORTA
    00037 #define PA0     PORT0
    00038 #define PA1     PORT1
    00039 #define PA2     PORT2
    00040 #define PA3     PORT3
    00041 #define PA4     PORT4
    00042 #define PA5     PORT5
    00043 #define PA6     PORT6
    00044 #define PA7     PORT7
    00045 // PORTB
    00046 #define PB0     PORT0
    00047 #define PB1     PORT1
    00048 #define PB2     PORT2
    00049 #define PB3     PORT3
    00050 #define PB4     PORT4
    00051 #define PB5     PORT5
    00052 #define PB6     PORT6
    00053 #define PB7     PORT7
    00054 // PORTC
    00055 #define PC0     PORT0
    00056 #define PC1     PORT1
    00057 #define PC2     PORT2
    00058 #define PC3     PORT3
    00059 #define PC4     PORT4
    00060 #define PC5     PORT5
    00061 #define PC6     PORT6
    00062 #define PC7     PORT7
    00063 // PORTD
    00064 #define PD0     PORT0
    00065 #define PD1     PORT1
    00066 #define PD2     PORT2
    00067 #define PD3     PORT3
    00068 #define PD4     PORT4
    00069 #define PD5     PORT5
    00070 #define PD6     PORT6
    00071 #define PD7     PORT7
    00072 // PORTE
    00073 #define PE0     PORT0
    00074 #define PE1     PORT1
    00075 #define PE2     PORT2
    00076 #define PE3     PORT3
    00077 #define PE4     PORT4
    00078 #define PE5     PORT5
    00079 #define PE6     PORT6
    00080 #define PE7     PORT7
    00081 // PORTF
    00082 #define PF0     PORT0
    00083 #define PF1     PORT1
    00084 #define PF2     PORT2
    00085 #define PF3     PORT3
    00086 #define PF4     PORT4
    00087 #define PF5     PORT5
    00088 #define PF6     PORT6
    00089 #define PF7     PORT7
    00090 // PORTG
    00091 #define PG0     PORT0
    00092 #define PG1     PORT1
    00093 #define PG2     PORT2
    00094 #define PG3     PORT3
    00095 #define PG4     PORT4
    00096 #define PG5     PORT5
    00097
    00098 #endif