|
| 1 | +/* |
| 2 | + * The MIT License (MIT) |
| 3 | + * |
| 4 | + * Copyright (c) 2024 Robert Grizzell, Independently providing these changes |
| 5 | + * |
| 6 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | + * of this software and associated documentation files (the "Software"), to deal |
| 8 | + * in the Software without restriction, including without limitation the rights |
| 9 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | + * copies of the Software, and to permit persons to whom the Software is |
| 11 | + * furnished to do so, subject to the following conditions: |
| 12 | + * |
| 13 | + * The above copyright notice and this permission notice shall be included in |
| 14 | + * all copies or substantial portions of the Software. |
| 15 | + * |
| 16 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 22 | + * THE SOFTWARE. |
| 23 | + */ |
| 24 | + |
| 25 | +#ifndef LILYGO_TDONGLE_S3_H_ |
| 26 | +#define LILYGO_TDONGLE_S3_H_ |
| 27 | + |
| 28 | +//--------------------------------------------------------------------+ |
| 29 | +// Button |
| 30 | +//--------------------------------------------------------------------+ |
| 31 | + |
| 32 | +// Enter UF2 mode if GPIO is pressed while 2nd stage bootloader indicator |
| 33 | +// is on e.g RGB = Purple. If it is GPIO0, user should not hold this while |
| 34 | +// reset since that will instead run the 1st stage ROM bootloader |
| 35 | +#define PIN_BUTTON_UF2 0 |
| 36 | + |
| 37 | +//--------------------------------------------------------------------+ |
| 38 | +// LED |
| 39 | +//--------------------------------------------------------------------+ |
| 40 | + |
| 41 | +// Number of Dotstar |
| 42 | +#define DOTSTAR_NUMBER 1 |
| 43 | + |
| 44 | +// GPIO connected to Dotstar |
| 45 | +#define DOTSTAR_PIN_DATA 40 |
| 46 | +#define DOTSTAR_PIN_SCK 39 |
| 47 | + |
| 48 | +// Brightness percentage from 1 to 255 |
| 49 | +#define DOTSTAR_BRIGHTNESS 127 |
| 50 | + |
| 51 | +//--------------------------------------------------------------------+ |
| 52 | +// TFT |
| 53 | +//--------------------------------------------------------------------+ |
| 54 | +// |
| 55 | + |
| 56 | +// LCD is ST7735 and may need a custom init cmd to use the ILI9341 driver. |
| 57 | +// #define CONFIG_LCD_TYPE_ILI9341 |
| 58 | + |
| 59 | +// #define DISPLAY_PIN_MISO -1 // required if use CONFIG_LCD_TYPE_AUTO |
| 60 | +// #define DISPLAY_PIN_MOSI 3 |
| 61 | +// #define DISPLAY_PIN_SCK 5 |
| 62 | + |
| 63 | +// #define DISPLAY_PIN_CS 4 |
| 64 | +// #define DISPLAY_PIN_DC 2 |
| 65 | +// #define DISPLAY_PIN_RST 1 |
| 66 | + |
| 67 | +// #define DISPLAY_PIN_BL 38 |
| 68 | +// #define DISPLAY_BL_ON 1 // GPIO state to enable back light |
| 69 | + |
| 70 | +// #define DISPLAY_PIN_POWER -1 |
| 71 | +// #define DISPLAY_POWER_ON 1 // GPIO state to enable TFT |
| 72 | + |
| 73 | +// #define DISPLAY_WIDTH 160 |
| 74 | +// #define DISPLAY_HEIGHT 80 |
| 75 | + |
| 76 | +// #define DISPLAY_COL_OFFSET 26 |
| 77 | +// #define DISPLAY_ROW_OFFSET 1 |
| 78 | + |
| 79 | +// Memory Data Access Control & // Vertical Scroll Start Address |
| 80 | +// #define DISPLAY_MADCTL (TFT_MADCTL_BGR | TFT_MADCTL_MY | TFT_MADCTL_MV) |
| 81 | +// #define DISPLAY_VSCSAD 80 |
| 82 | +// Display rotated 90 degrees |
| 83 | + |
| 84 | +// #define DISPLAY_TITLE "T-Dongle-S3" |
| 85 | + |
| 86 | +//--------------------------------------------------------------------+ |
| 87 | +// USB UF2 |
| 88 | +//--------------------------------------------------------------------+ |
| 89 | + |
| 90 | +#define USB_VID 0x303A |
| 91 | +#define USB_PID 0x82C3 |
| 92 | + |
| 93 | +#define USB_MANUFACTURER "LILYGO" |
| 94 | +#define USB_PRODUCT "T-Dongle S3" |
| 95 | + |
| 96 | +#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT |
| 97 | +#define UF2_BOARD_ID "ESP32S3-T_Dongle_S3-rev2" // Rev. 2 added a QWIIC connector |
| 98 | +#define UF2_VOLUME_LABEL "LILYGOBOOT" |
| 99 | +#define UF2_INDEX_URL "https://github.com/Xinyuan-LilyGO/T-Dongle-S3" |
| 100 | + |
| 101 | +#endif |
0 commit comments