AVRTools
A Library for the AVR ATmega328 and ATmega2560 Microcontrollers
AVRTools
ArduinoMegaPins.h
Go to the documentation of this file.
1
/*
2
ArduinoMegaPins.h - Macros naming the pins on the Arduino Mega.
3
For AVR ATMega328p (Arduino Uno) and ATMega2560 (Arduino Mega).
4
This is part of the AVRTools library.
5
Copyright (c) 2014 Igor Mikolic-Torreira. All right reserved.
6
7
This program is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
11
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
40
#ifndef ArduinoMegaPins_h
41
#define ArduinoMegaPins_h
42
43
#ifndef ArduinoPinsDefined
44
#define ArduinoPinsDefined
45
#else
46
#error "Only include one Arduino model pin definition file; more than one appears to be included"
47
#endif
48
49
50
51
#include "
GpioPinMacros.h
"
52
53
54
#define pPinA00 GpioPinAnalog( F, 0, 0 ) // PF0, ADC0
55
#define pPinA01 GpioPinAnalog( F, 1, 1 ) // PF1, ADC1
56
#define pPinA02 GpioPinAnalog( F, 2, 2 ) // PF2, ADC2
57
#define pPinA03 GpioPinAnalog( F, 3, 3 ) // PF3, ADC3
58
#define pPinA04 GpioPinAnalog( F, 4, 4 ) // PF4, ADC4, TCK
59
#define pPinA05 GpioPinAnalog( F, 5, 5 ) // PF5, ADC5, TMS
60
#define pPinA06 GpioPinAnalog( F, 6, 6 ) // PF5, ADC6, TDO
61
#define pPinA07 GpioPinAnalog( F, 7, 7 ) // PF5, ADC7, TDI
62
63
#define pPinA08 GpioPinAnalog( K, 0, 8 ) // PF0, ADC8, PCINT16
64
#define pPinA09 GpioPinAnalog( K, 1, 9 ) // PF1, ADC9, PCINT17
65
#define pPinA10 GpioPinAnalog( K, 2, 10 ) // PF2, ADC10, PCINT18
66
#define pPinA11 GpioPinAnalog( K, 3, 11 ) // PF3, ADC11, PCINT19
67
#define pPinA12 GpioPinAnalog( K, 4, 12 ) // PF4, ADC12, PCINT20
68
#define pPinA13 GpioPinAnalog( K, 5, 13 ) // PF5, ADC13, PCINT21
69
#define pPinA14 GpioPinAnalog( K, 6, 14 ) // PF5, ADC14, PCINT22
70
#define pPinA15 GpioPinAnalog( K, 7, 15 ) // PF5, ADC15, PCINT23
71
72
#define pPin00 GpioPin( E, 0 ) // PE0, RXD0, PCINT8
73
#define pPin01 GpioPin( E, 1 ) // PE1, TXD0, PCINT3
74
#define pPin02 GpioPinPwm( E, 4, 3, B ) // PE4, INT4, OC3B
75
#define pPin03 GpioPinPwm( E, 5, 3, C ) // PE5, INT5, OC3C
76
#define pPin04 GpioPinPwm( G, 5, 0, B ) // PG5, OC0B
77
#define pPin05 GpioPinPwm( E, 3, 3, A ) // PE3, AIN1, OC3A
78
79
#define pPin06 GpioPinPwm( H, 3, 4, A ) // PH3, OC4A, PCINT8
80
#define pPin07 GpioPinPwm( H, 4, 4, B ) // PH4, OC4B
81
#define pPin08 GpioPinPwm( H, 5, 4, C ) // PH5, OC4C
82
#define pPin09 GpioPinPwm( H, 6, 2, B ) // PH6, OC2B
83
#define pPin10 GpioPinPwm( B, 4, 2, A ) // PB4, OC2A, PCINT4
84
85
#define pPin11 GpioPinPwm( B, 5, 1, A ) // PB5, OC1A, PCINT5
86
#define pPin12 GpioPinPwm( B, 6, 1, B ) // PB6, OC1B, PCINT6
87
#define pPin13 GpioPinPwm( B, 7, 0, A ) // PB7, OC0A, PCINT7
88
#define pPin14 GpioPin( J, 1 ) // PJ1, TXD3, PCINT10
89
#define pPin15 GpioPin( J, 0 ) // PJ0, RXD3, PCINT9
90
91
#define pPin16 GpioPin( H, 1 ) // PH1, TXD2
92
#define pPin17 GpioPin( H, 0 ) // PH0, RXD2
93
#define pPin18 GpioPin( D, 3 ) // PD3, INT3, TXD1
94
#define pPin19 GpioPin( D, 2 ) // PD2, INT2, RXD1
95
#define pPin20 GpioPin( D, 1 ) // PD1, INT1, SDA
96
97
#define pPin21 GpioPin( D, 0 ) // PD0, INT0, SCL
98
#define pPin22 GpioPin( A, 0 ) // PA0, AD0
99
#define pPin23 GpioPin( A, 1 ) // PA1, AD1
100
#define pPin24 GpioPin( A, 2 ) // PA2, AD2
101
#define pPin25 GpioPin( A, 3 ) // PA3, AD3
102
103
#define pPin26 GpioPin( A, 4 ) // PA4, AD4
104
#define pPin27 GpioPin( A, 5 ) // PA5, AD5
105
#define pPin28 GpioPin( A, 6 ) // PA6, AD6
106
#define pPin29 GpioPin( A, 7 ) // PA7, AD7
107
#define pPin30 GpioPin( C, 7 ) // PC7, A15
108
109
#define pPin31 GpioPin( C, 6 ) // PC6, A14
110
#define pPin32 GpioPin( C, 5 ) // PC5, A13
111
#define pPin33 GpioPin( C, 4 ) // PC4, A12
112
#define pPin34 GpioPin( C, 3 ) // PC3, A11
113
#define pPin35 GpioPin( C, 2 ) // PC2, A10
114
115
#define pPin36 GpioPin( C, 1 ) // PC1, A9
116
#define pPin37 GpioPin( C, 0 ) // PC0, A8
117
#define pPin38 GpioPin( D, 7 ) // PD7, T0
118
#define pPin39 GpioPin( G, 2 ) // PG2, ALE
119
#define pPin40 GpioPin( G, 1 ) // PG1, RD
120
121
#define pPin41 GpioPin( G, 0 ) // PG0, WR
122
#define pPin42 GpioPin( L, 7 ) // PL7
123
#define pPin43 GpioPin( L, 6 ) // PL6
124
#define pPin44 GpioPinPwm( L, 5, 5, C ) // PL5, OC5C
125
#define pPin45 GpioPinPwm( L, 4, 5, B ) // PL4, OC5B
126
127
#define pPin46 GpioPinPwm( L, 3, 5, A ) // PL3, OC5A
128
#define pPin47 GpioPin( L, 2 ) // PL2, T5
129
#define pPin48 GpioPin( L, 1 ) // PL1, ICP5
130
#define pPin49 GpioPin( L, 0 ) // PL0, ICP4
131
#define pPin50 GpioPin( B, 3 ) // PB3, MISO, PCINT3
132
133
#define pPin51 GpioPin( B, 2 ) // PB2, MOSI, PCINT2
134
#define pPin52 GpioPin( B, 1 ) // PB1, SCK, PCINT1
135
#define pPin53 GpioPin( B, 0 ) // PB0, SS, PCINT0
136
137
#define pSDA pPin20 // I2C SDA
138
#define pSCL pPin21 // I2C SCL
139
140
#define pSS pPin53 // SPI SS
141
#define pMOSI pPin51 // SPI MOSI
142
#define pMISO pPin50 // SPI MISO
143
#define pSCK pPin52 // SPI SCK
144
145
146
#endif
GpioPinMacros.h
This file contains the primary macros for naming and manipulating GPIO pin names. ...
Generated on Mon Dec 31 2018 23:49:36 for AVRTools by
1.8.13