forked from espressif/arduino-esp32
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpins_arduino.h
143 lines (118 loc) · 3.63 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#define USB_VID 0x303A
#define USB_PID 0x81B8
#define USB_MANUFACTURER "senseBox"
#define USB_PRODUCT "MCU-S2 ESP32S2"
#define USB_SERIAL "" // Empty string for MAC adddress
// Default USB FirmwareMSC Settings
#define USB_FW_MSC_VENDOR_ID "senseBox" // max 8 chars
#define USB_FW_MSC_PRODUCT_ID "MCU-S2 ESP32S2" // max 16 chars
#define USB_FW_MSC_PRODUCT_REVISION "1.00" // max 4 chars
#define USB_FW_MSC_VOLUME_NAME "senseBox" // max 11 chars
#define USB_FW_MSC_SERIAL_NUMBER 0x00000000
#define EXTERNAL_NUM_INTERRUPTS 46
#define NUM_DIGITAL_PINS 48
#define NUM_ANALOG_INPUTS 20
#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
#define digitalPinHasPWM(p) (p < 46)
#define PIN_NEOPIXEL 1 // NeoPixel LED
#define NEOPIXEL_PIN 1 // NeoPixel LED
#define NEOPIXEL_NUM 1 // number of neopixels
// Default I2C QWIIC-Ports
static const uint8_t SDA = 39;
static const uint8_t SCL = 40;
#define PIN_QWIIC_SDA 39
#define PIN_QWIIC_SCL 40
// Secondary I2C MPU6050
#define WIRE1_PIN_DEFINED 1 // See Wire.cpp at bool TwoWire::initPins(int sdaPin, int sclPin)
static const uint8_t SCL1 = 42;
static const uint8_t SDA1 = 45;
#define PIN_I2C_SCL 42
#define PIN_I2C_SDA 45
#define PIN_I2C_INT 46
// SPI
static const uint8_t SS = 42;
static const uint8_t MOSI = 35;
static const uint8_t SCK = 36;
static const uint8_t MISO = 37;
// XBEE Pins
#define PIN_XBEE_ENABLE 41
#define PIN_XBEE_INT 33
#define PIN_XBEE_CS 34
#define PIN_XBEE_MOSI 35
#define PIN_XBEE_SCLK 36
#define PIN_XBEE_MISO 37
#define PIN_XBEE_RESET 38
#define PIN_XBEE_TXD 17
#define PIN_XBEE_RXD 18
// Alias XB1
#define PIN_XB1_ENABLE 41
#define PIN_XB1_INT 33
#define PIN_XB1_CS 34
#define PIN_XB1_MOSI 35
#define PIN_XB1_SCLK 36
#define PIN_XB1_MISO 37
#define PIN_XB1_RESET 38
#define PIN_XB1_TXD 17
#define PIN_XB1_RXD 18
// IO Pins
#define PIN_LED 1
#define PIN_IO2 2
#define PIN_IO3 3
#define PIN_IO4 4
#define PIN_IO5 5
#define PIN_IO6 6
#define PIN_IO7 7
#define IO_ENABLE 8
static const uint8_t A2 = PIN_IO2;
static const uint8_t A3 = PIN_IO3;
static const uint8_t A4 = PIN_IO4;
static const uint8_t A5 = PIN_IO5;
static const uint8_t A6 = PIN_IO6;
static const uint8_t A7 = PIN_IO7;
static const uint8_t D2 = PIN_IO2;
static const uint8_t D3 = PIN_IO3;
static const uint8_t D4 = PIN_IO4;
static const uint8_t D5 = PIN_IO5;
static const uint8_t D6 = PIN_IO6;
static const uint8_t D7 = PIN_IO7;
// UART Port
static const uint8_t TX = 43;
static const uint8_t RX = 44;
#define PIN_UART_TXD 43
#define PIN_UART_RXD 44
#define PIN_UART_ENABLE 26
// UART XBee
static const uint8_t TX1 = 17;
static const uint8_t RX1 = 18;
// PD-Sensor
#define PD_SENSE 14
#define PD_ENABLE 21
#define PIN_PD_ENABLE 21
// SD-Card
#define VSPI_MISO 13
#define VSPI_MOSI 11
#define VSPI_SCLK 12
#define VSPI_SS 10
#define SD_ENABLE 9
#define PIN_SD_ENABLE 9
#define PIN_SD_CS 10
#define PIN_SD_MOSI 11
#define PIN_SD_SCLK 12
#define PIN_SD_MISO 13
// USB
#define PIN_USB_DM 19
#define PIN_USB_DP 20
// Touch Pins
static const uint8_t T2 = PIN_IO2;
static const uint8_t T3 = PIN_IO3;
static const uint8_t T4 = PIN_IO4;
static const uint8_t T5 = PIN_IO5;
static const uint8_t T6 = PIN_IO6;
static const uint8_t T7 = PIN_IO7;
static const uint8_t DAC1 = 17;
static const uint8_t DAC2 = 18;
#endif /* Pins_Arduino_h */