AVRTools
A Library for the AVR ATmega328 and ATmega2560 Microcontrollers
ArduinoUnoPins.h
Go to the documentation of this file.
1 /*
2  ArduinoUnoPins.h - Macros naming the pins on the Arduino Uno.
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 
41 #ifndef ArduinoUnoPins_h
42 #define ArduinoUnoPins_h
43 
44 #ifndef ArduinoPinsDefined
45 #define ArduinoPinsDefined
46 #else
47 #error "Only include one Arduino model pin definition file; more than one appears to be included"
48 #endif
49 
50 
51 
52 #include "GpioPinMacros.h"
53 
54 
55 #define pPinA00 GpioPinAnalog( C, 0, 0 ) // PC0, ADC0, PCINT8
56 #define pPinA01 GpioPinAnalog( C, 1, 1 ) // PC1, ADC1, PCINT9
57 #define pPinA02 GpioPinAnalog( C, 2, 2 ) // PC2, ADC2, PCINT10
58 #define pPinA03 GpioPinAnalog( C, 3, 3 ) // PC3, ADC3, PCINT11
59 #define pPinA04 GpioPinAnalog( C, 4, 4 ) // PC4, ADC4, SDA, PCINT12
60 #define pPinA05 GpioPinAnalog( C, 5, 5 ) // PC5, ADC5, SCL, PCINT13
61 
62 #define pPin00 GpioPin( D, 0 ) // PD0, RXD, PCINT16
63 #define pPin01 GpioPin( D, 1 ) // PD1, TXD, PCINT17
64 #define pPin02 GpioPin( D, 2 ) // PD2, INT0, PCINT18
65 #define pPin03 GpioPinPwm( D, 3, 2, B ) // PD3, INT1, OC2B, PCINT19
66 #define pPin04 GpioPin( D, 4 ) // PD4, T0, XCK, PCINT20
67 #define pPin05 GpioPinPwm( D, 5, 0, B ) // PD5, T1, OC0B, PCINT21
68 #define pPin06 GpioPinPwm( D, 6, 0, A ) // PD6, AIN0, OC0A, PCINT22
69 #define pPin07 GpioPin( D, 7 ) // PD7, AIN1, PCINT23
70 #define pPin08 GpioPin( B, 0 ) // PB0, ICP1, CLKO, PCINT0
71 #define pPin09 GpioPinPwm( B, 1, 1, A ) // PB1, OC1A, PCINT1
72 #define pPin10 GpioPinPwm( B, 2, 1, B ) // PB2, SS, OC1B, PCINT2
73 #define pPin11 GpioPinPwm( B, 3, 2, A ) // PB3, MOSI, OC2A, PCINT3
74 #define pPin12 GpioPin( B, 4 ) // PB4, MISO, PCINT4
75 #define pPin13 GpioPin( B, 5 ) // PB5, SCK, PCINT5
76 
77 #define pSDA pPinA04 // I2C SDA
78 #define pSCL pPinA05 // I2C SCL
79 
80 #define pSS pPin10 // SPI SS
81 #define pMOSI pPin11 // SPI MOSI
82 #define pMISO pPin12 // SPI MISO
83 #define pSCK pPin13 // SPI SCK
84 
85 
86 #endif
This file contains the primary macros for naming and manipulating GPIO pin names. ...