|
| 1 | +#ifndef Pins_Arduino_h |
| 2 | +#define Pins_Arduino_h |
| 3 | + |
| 4 | +#include <stdint.h> |
| 5 | +#include "soc/soc_caps.h" |
| 6 | + |
| 7 | +#define USB_VID 0x303a |
| 8 | +#define USB_PID 0x1001 |
| 9 | +#define USB_MANUFACTURER "Waveshare" |
| 10 | +#define USB_PRODUCT "ESP32-S3-Tiny" |
| 11 | +#define USB_SERIAL "" // Empty string for MAC address |
| 12 | + |
| 13 | +#define MTDO 45 |
| 14 | +#define MTDI 47 |
| 15 | +#define MTMS 48 |
| 16 | +#define MTCK 44 |
| 17 | + |
| 18 | +// UART0 pins |
| 19 | +static const uint8_t TX = 49; |
| 20 | +static const uint8_t RX = 50; |
| 21 | + |
| 22 | +static const uint8_t SDA = -1; |
| 23 | +static const uint8_t SCL = -1; |
| 24 | + |
| 25 | +// Mapping based on the ESP32S3 data sheet - alternate for SPI2 |
| 26 | +static const uint8_t SS = 32; // FSPICS0 |
| 27 | +static const uint8_t MOSI = 35; // FSPID |
| 28 | +static const uint8_t MISO = 34; // FSPIQ |
| 29 | +static const uint8_t SCK = 33; // FSPICLK |
| 30 | + |
| 31 | +//static const uint8_t XTAL_32K_N = 22; |
| 32 | +//static const uint8_t XTAL_32K_P = 21; |
| 33 | + |
| 34 | +//static const uint8_t SPIWP = 31; |
| 35 | +//static const uint8_t SPIHD = 30; |
| 36 | + |
| 37 | +// Mapping based on the ESP32S3 data sheet - alternate for OUTPUT |
| 38 | +static const uint8_t GPIO1 = 1; |
| 39 | +static const uint8_t GPIO2 = 2; |
| 40 | +static const uint8_t GPIO3 = 3; |
| 41 | +static const uint8_t GPIO4 = 4; |
| 42 | +static const uint8_t GPIO5 = 5; |
| 43 | +static const uint8_t GPIO6 = 6; |
| 44 | +static const uint8_t GPIO7 = 7; |
| 45 | +static const uint8_t GPIO8 = 8; |
| 46 | +static const uint8_t GPIO9 = 9; |
| 47 | +static const uint8_t GPIO10 = 10; |
| 48 | +static const uint8_t GPIO11 = 11; |
| 49 | +static const uint8_t GPIO12 = 12; |
| 50 | +static const uint8_t GPIO13 = 13; |
| 51 | +static const uint8_t GPIO14 = 14; |
| 52 | +static const uint8_t GPIO15 = 15; |
| 53 | +static const uint8_t GPIO16 = 16; |
| 54 | +static const uint8_t GPIO17 = 17; |
| 55 | +static const uint8_t GPIO18 = 18; |
| 56 | + |
| 57 | +static const uint8_t GPIO21 = 21; |
| 58 | + |
| 59 | +static const uint8_t GPIO33 = 33; |
| 60 | +static const uint8_t GPIO34 = 34; |
| 61 | +static const uint8_t GPIO35 = 35; |
| 62 | +static const uint8_t GPIO36 = 36; |
| 63 | +static const uint8_t GPIO37 = 37; |
| 64 | +static const uint8_t GPIO38 = 38; |
| 65 | +static const uint8_t GPIO39 = 39; |
| 66 | +static const uint8_t GPIO40 = 40; |
| 67 | +static const uint8_t GPIO41 = 41; |
| 68 | +static const uint8_t GPIO42 = 42; |
| 69 | + |
| 70 | +static const uint8_t GPIO45 = 45; |
| 71 | + |
| 72 | +static const uint8_t GPIO47 = 47; |
| 73 | +static const uint8_t GPIO48 = 48; |
| 74 | + |
| 75 | +static const uint8_t RGB_DATA = 38; |
| 76 | + |
| 77 | +#define PIN_RGB_LED RGB_DATA |
| 78 | +// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino |
| 79 | +static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED; |
| 80 | +#define BUILTIN_LED LED_BUILTIN // backward compatibility |
| 81 | +#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN |
| 82 | +// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite |
| 83 | +#define RGB_BUILTIN LED_BUILTIN |
| 84 | +#define RGB_BRIGHTNESS 64 |
| 85 | +#define RGB_BUILTIN_LED_COLOR_ORDER LED_COLOR_ORDER_RGB |
| 86 | + |
| 87 | +#endif /* Pins_Arduino_h */ |
0 commit comments