forked from espressif/arduino-esp32
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpins_arduino.h
55 lines (46 loc) · 1.52 KB
/
pins_arduino.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
/**
* Variant: WT32-ETH01
* Vendor: Wireless-Tag
* Url: http://www.wireless-tag.com/portfolio/wt32-eth01/
*/
#include <stdint.h>
#define EXTERNAL_NUM_INTERRUPTS 16
#define NUM_DIGITAL_PINS 40
#define NUM_ANALOG_INPUTS 16
#define analogInputToDigitalPin(p) (((p) < 20) ? (esp32_adc2gpio[(p)]) : -1)
#define digitalPinToInterrupt(p) (((p) < 40) ? (p) : -1)
#define digitalPinHasPWM(p) (p < 34)
// interface to Ethernet PHY (LAN8720A)
#define ETH_PHY_ADDR 1
#define ETH_PHY_POWER 16
#define ETH_PHY_MDC 23
#define ETH_PHY_MDIO 18
#define ETH_PHY_TYPE ETH_PHY_LAN8720
#define ETH_CLK_MODE ETH_CLOCK_GPIO0_IN
// general purpose IO pins
static const uint8_t IO0 = 0;
static const uint8_t IO1 = 1; // TXD0 / TX0 pin
static const uint8_t IO2 = 2;
static const uint8_t IO3 = 3; // RXD0 / RX0 pin
static const uint8_t IO4 = 4;
static const uint8_t IO5 = 5; // RXD2 / RXD pin
static const uint8_t IO12 = 12;
static const uint8_t IO14 = 14;
static const uint8_t IO15 = 15;
static const uint8_t IO17 = 17; // TXD2 / TXD pin
static const uint8_t IO32 = 32; // CFG pin
static const uint8_t IO33 = 33; // 485_EN pin
// input-only pins
static const uint8_t IO35 = 35;
static const uint8_t IO36 = 36;
static const uint8_t IO39 = 39;
// UART interfaces
static const uint8_t TXD0 = IO1, TX0 = IO1;
static const uint8_t RXD0 = IO3, RX0 = IO3;
static const uint8_t TXD2 = IO17, TXD = IO17;
static const uint8_t RXD2 = IO5, RXD = IO5;
static const uint8_t TX = TX0;
static const uint8_t RX = TX0;
#endif /* Pins_Arduino_h */