Skip to content

Commit fbd611c

Browse files
committed
Merge pull request #2 from narongrat/patch-2
Create pins_arduino.h for ESPino (WROOM-02)
2 parents d8bfa71 + 0db198e commit fbd611c

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

variants/espinotee/pins_arduino.h

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

0 commit comments

Comments
 (0)