Skip to content

Commit 682d717

Browse files
author
yichone
committed
Add espduino boards
ESPDuino boards from doit.am (arduino uno look like board for esp8266)
1 parent 97ba91b commit 682d717

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

variants/ESPDuino/pins_arduino.h

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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+
Modified by Doit.am team
27+
www.doit.am
28+
*/
29+
30+
#ifndef Pins_Arduino_h
31+
#define Pins_Arduino_h
32+
33+
#define EXTERNAL_NUM_INTERRUPTS 16
34+
#define NUM_DIGITAL_PINS 17
35+
#define NUM_ANALOG_INPUTS 1
36+
37+
#define analogInputToDigitalPin(p) ((p > 0)?NOT_A_PIN:0)
38+
#define digitalPinToInterrupt(p) (((p) < EXTERNAL_NUM_INTERRUPTS)?p:NOT_A_PIN)
39+
#define digitalPinHasPWM(p) (((p) < NUM_DIGITAL_PINS)?p:NOT_A_PIN)
40+
41+
static const uint8_t SDA = 4;
42+
static const uint8_t SCL = 5;
43+
44+
static const uint8_t SS = 15;
45+
static const uint8_t MOSI = 13;
46+
static const uint8_t MISO = 12;
47+
static const uint8_t SCK = 14;
48+
49+
static const uint8_t BUILTIN_LED = 16;
50+
51+
static const uint8_t A0 = 17;
52+
53+
// These serial port names are intended to allow libraries and architecture-neutral
54+
// sketches to automatically default to the correct port name for a particular type
55+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
56+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
57+
//
58+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
59+
//
60+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
61+
//
62+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
63+
//
64+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
65+
//
66+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
67+
// pins are NOT connected to anything by default.
68+
#define SERIAL_PORT_MONITOR Serial
69+
#define SERIAL_PORT_USBVIRTUAL Serial
70+
#define SERIAL_PORT_HARDWARE Serial
71+
#define SERIAL_PORT_HARDWARE_OPEN Serial
72+
73+
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)