|
| 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 40 |
| 8 | +#define NUM_ANALOG_INPUTS 16 |
| 9 | + |
| 10 | +#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1) |
| 11 | +#define digitalPinToInterrupt(p) (((p)<40)?(p):-1) |
| 12 | +#define digitalPinHasPWM(p) (p < 34) |
| 13 | + |
| 14 | +// I2C OLED Display works with SSD1306 driver |
| 15 | +#define OLED_SDA 21 |
| 16 | +#define OLED_SCL 22 |
| 17 | +#define OLED_RST 16 |
| 18 | + |
| 19 | +// SPI LoRa Radio |
| 20 | +#define LORA_SCK 5 // GPIO5 - SX1276 SCK |
| 21 | +#define LORA_MISO 19 // GPIO19 - SX1276 MISO |
| 22 | +#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI |
| 23 | +#define LORA_CS 18 // GPIO18 - SX1276 CS |
| 24 | +#define LORA_RST 12 // GPIO14 - SX1276 RST |
| 25 | +#define LORA_IRQ 26 // GPIO26 - SX1276 IRQ (interrupt request) |
| 26 | + |
| 27 | +// SD card |
| 28 | +#define SD_SCK 14 |
| 29 | +#define SD_MISO 2 |
| 30 | +#define SD_MOSI 15 |
| 31 | +#define SD_CS 13 |
| 32 | + |
| 33 | +static const uint8_t LED_BUILTIN = 22; |
| 34 | +#define BUILTIN_LED LED_BUILTIN // backward compatibility |
| 35 | + |
| 36 | +static const uint8_t KEY_BUILTIN = 0; |
| 37 | + |
| 38 | +static const uint8_t TX = 1; |
| 39 | +static const uint8_t RX = 3; |
| 40 | + |
| 41 | +static const uint8_t SDA = 21; |
| 42 | +static const uint8_t SCL = 22; |
| 43 | + |
| 44 | +static const uint8_t SS = 18; |
| 45 | +static const uint8_t MOSI = 27; |
| 46 | +static const uint8_t MISO = 19; |
| 47 | +static const uint8_t SCK = 5; |
| 48 | + |
| 49 | +static const uint8_t A0 = 36; |
| 50 | +static const uint8_t A1 = 37; |
| 51 | +static const uint8_t A2 = 38; |
| 52 | +static const uint8_t A3 = 39; |
| 53 | +static const uint8_t A4 = 32; |
| 54 | +static const uint8_t A5 = 33; |
| 55 | +static const uint8_t A6 = 34; |
| 56 | +static const uint8_t A7 = 35; |
| 57 | +static const uint8_t A10 = 4; |
| 58 | +static const uint8_t A11 = 0; |
| 59 | +static const uint8_t A12 = 2; |
| 60 | +static const uint8_t A13 = 15; |
| 61 | +static const uint8_t A14 = 13; |
| 62 | +static const uint8_t A15 = 12; |
| 63 | +static const uint8_t A16 = 14; |
| 64 | +static const uint8_t A17 = 27; |
| 65 | +static const uint8_t A18 = 25; |
| 66 | +static const uint8_t A19 = 26; |
| 67 | + |
| 68 | +static const uint8_t T0 = 4; |
| 69 | +static const uint8_t T1 = 0; |
| 70 | +static const uint8_t T2 = 2; |
| 71 | +static const uint8_t T3 = 15; |
| 72 | +static const uint8_t T4 = 13; |
| 73 | +static const uint8_t T5 = 12; |
| 74 | +static const uint8_t T6 = 14; |
| 75 | +static const uint8_t T7 = 27; |
| 76 | +static const uint8_t T8 = 33; |
| 77 | +static const uint8_t T9 = 32; |
| 78 | + |
| 79 | +static const uint8_t DAC1 = 25; |
| 80 | +static const uint8_t DAC2 = 26; |
| 81 | + |
| 82 | +#endif /* Pins_Arduino_h */ |
0 commit comments