8000 Create pins_arduino.h · espressif/arduino-esp32@465e455 · GitHub
[go: up one dir, main page]

Skip to content

Commit 465e455

Browse files
authored
Create pins_arduino.h
1 parent e5ea089 commit 465e455

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

variants/lopy/pins_arduino.h

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
6+
#define EXTERNAL_NUM_INTERRUPTS 16
7+
#define NUM_DIGITAL_PINS 24
8+
#define NUM_ANALOG_INPUTS 18
9+
10+
#define analogInputToDigitalPin(p) (((p)<40)?(esp32_adc2gpio[(p)]):-1)
11+
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
12+
#define digitalPinHasPWM(p) (p < 34)
13+
14+
// SPI LoRa Radio
15+
#define LORA_SCK 5 // GPIO5 - SX1276 SCK
16+
#define LORA_MISO 19 // GPIO19 - SX1276 MISO
17+
#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI
18+
#define LORA_CS 17 // GPIO17 - SX1276 CS
19+
#define LORA_RST 18 // GPIO18 - SX1276 RST
20+
#define LORA_IO0 23 // GPIO23 - SX1276 IO0
21+
#define LORA_IO1 23 // GPIO23 - SX1276 IO1 tied by diode to IO0
22+
#define LORA_IO2 23 // GPIO23 - SX1276 IO2 tied by diode to IO0
23+
24+
// Antenna select
25+
#define ANT_SELECT 16 // GPIO16 - External Antenna Switch
26+
27+
static const uint8_t TX = 1;
28+
static const uint8_t RX = 3;
29+
30+
static const uint8_t SDA = 12;
31+
static const uint8_t SCL = 13;
32+
33+
static const uint8_t SS = 17;
34+
static const uint8_t MOSI = 22;
35+
static const uint8_t MISO = 37;
36+
static const uint8_t SCK = 5;
37+
38+
static const uint8_t A0 = 36;
39+
static const uint8_t A1 = 37;
40+
static const uint8_t A2 = 38;
41+
static const uint8_t A3 = 39;
42+
static const uint8_t A4 = 32;
43+
static const uint8_t A5 = 33;
44+
static const uint8_t A6 = 34;
45+
static const uint8_t A7 = 35;
46+
static const uint8_t A10 = 4;
47+
static const uint8_t A11 = 0;
48+
static const uint8_t A12 = 2;
49+
static const uint8_t A13 = 15;
50+
static const uint8_t A14 = 13;
51+
static const uint8_t A14 = 12;
52+
static const uint8_t A16 = 14;
53+
static const uint8_t A17 = 27;
54+
static const uint8_t A18 = 25;
55+
static const uint8_t A19 = 26;
56+
57+
static const uint8_t T0 = 4;
58+
static const uint8_t T1 = 0;
59+
static const uint8_t T2 = 2;
60+
static const uint8_t T3 = 15;
61+
static const uint8_t T4 = 13;
62+
static const uint8_t T5 = 12;
63+
static const uint8_t T6 = 14;
64+
static const uint8_t T7 = 27;
65+
static const uint8_t T8 = 33;
66+
static const uint8_t T9 = 32;
67+
68+
static const uint8_t DAC1 = 25;
69+
static const uint8_t DAC2 = 26;
70+
71+
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)
0