|
1 | 1 | /* |
2 | 2 | pins_arduino.h - Pin definition functions for Arduino |
3 | 3 | Part of Arduino - http://www.arduino.cc/ |
4 | | - |
| 4 | +
|
5 | 5 | Copyright (c) 2007 David A. Mellis |
6 | 6 | Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015. |
7 | | - |
| 7 | +
|
8 | 8 | This library is free software; you can redistribute it and/or |
9 | 9 | modify it under the terms of the GNU Lesser General Public |
10 | 10 | License as published by the Free Software Foundation; either |
11 | 11 | version 2.1 of the License, or (at your option) any later version. |
12 | | - |
| 12 | +
|
13 | 13 | This library is distributed in the hope that it will be useful, |
14 | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16 | 16 | Lesser General Public License for more details. |
17 | | - |
| 17 | +
|
18 | 18 | You should have received a copy of the GNU Lesser General |
19 | 19 | Public License along with this library; if not, write to the |
20 | 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, |
21 | 21 | Boston, MA 02111-1307 USA |
22 | | - |
| 22 | +
|
23 | 23 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ |
24 | 24 | */ |
25 | 25 |
|
26 | 26 | #ifndef Pins_Arduino_h |
27 | 27 | #define Pins_Arduino_h |
28 | 28 |
|
29 | | -#define EXTERNAL_NUM_INTERRUPTS 16 |
30 | | -#define NUM_DIGITAL_PINS 11 |
31 | | -#define NUM_ANALOG_INPUTS 1 |
32 | | - |
33 | | -#define analogInputToDigitalPin(p) ((p > 0)?NOT_A_PIN:0) |
34 | | -#define digitalPinToInterrupt(p) (((p) < EXTERNAL_NUM_INTERRUPTS)?p:NOT_A_PIN) |
35 | | -#define digitalPinHasPWM(p) (((p) < NUM_DIGITAL_PINS)?p:NOT_A_PIN) |
| 29 | +#include "../generic/common.h" |
36 | 30 |
|
37 | 31 | static const uint8_t SDA = 4; |
38 | 32 | static const uint8_t SCL = 5; |
39 | 33 |
|
40 | | -static const uint8_t SS = 15; |
41 | | -static const uint8_t MOSI = 13; |
42 | | -static const uint8_t MISO = 12; |
43 | | -static const uint8_t SCK = 14; |
44 | | - |
45 | 34 | static const uint8_t BUILTIN_LED = 16; |
46 | 35 | static const uint8_t LED_BUILTIN = 16; |
47 | 36 |
|
48 | | -static const uint8_t A0 = 17; |
49 | | - |
50 | | -// These serial port names are intended to allow libraries and architecture-neutral |
51 | | -// sketches to automatically default to the correct port name for a particular type |
52 | | -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, |
53 | | -// the first hardware serial port whose RX/TX pins are not dedicated to another use. |
54 | | -// |
55 | | -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor |
56 | | -// |
57 | | -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial |
58 | | -// |
59 | | -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library |
60 | | -// |
61 | | -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. |
62 | | -// |
63 | | -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX |
64 | | -// pins are NOT connected to anything by default. |
65 | | -#define SERIAL_PORT_MONITOR Serial |
66 | | -#define SERIAL_PORT_USBVIRTUAL Serial |
67 | | -#define SERIAL_PORT_HARDWARE Serial |
68 | | -#define SERIAL_PORT_HARDWARE_OPEN Serial |
69 | | - |
70 | 37 | #endif /* Pins_Arduino_h */ |
0 commit comments