|
| 1 | +/* |
| 2 | + * The MIT License (MIT) |
| 3 | + * |
| 4 | + * Copyright (c) 2020 Ha Thach (tinyusb.org) for Adafruit Industries |
| 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 WAVESHARE_ESP32_S3_LCD_19_H_ |
| 26 | +#define WAVESHARE_ESP32_S3_LCD_19_H_ |
| 27 | + |
| 28 | +//--------------------------------------------------------------------+ |
| 29 | +// Button |
| 30 | +//--------------------------------------------------------------------+ |
| 31 | +// Enter UF2 mode if GPIO is pressed while 2nd stage bootloader indicator |
| 32 | +// is on e.g RGB = Purple. If it is GPIO0, user should not hold this while |
| 33 | +// reset since that will instead run the 1st stage ROM bootloader |
| 34 | +#define PIN_BUTTON_UF2 0 |
| 35 | + |
| 36 | +// GPIO that implement 1-bit memory with RC components which hold the |
| 37 | +// pin value long enough for double reset detection. |
| 38 | +// #define PIN_DOUBLE_RESET_RC |
| 39 | + |
| 40 | +// #define CUSTOM_PIN_BUTTON_PWR_EN |
| 41 | + |
| 42 | +//--------------------------------------------------------------------+ |
| 43 | +// LED |
| 44 | +//--------------------------------------------------------------------+ |
| 45 | +// GPIO connected to Neopixel data |
| 46 | +#define NEOPIXEL_PIN 15 |
| 47 | +// Brightness percentage from 1 to 255 |
| 48 | +#define NEOPIXEL_BRIGHTNESS 0xFF |
| 49 | +// Number of neopixels |
| 50 | +#define NEOPIXEL_NUMBER 2 |
| 51 | + |
| 52 | +//--------------------------------------------------------------------+ |
| 53 | +// TFT |
| 54 | +//--------------------------------------------------------------------+ |
| 55 | +#define CONFIG_LCD_TYPE_ST7789V |
| 56 | + |
| 57 | +#define DISPLAY_PIN_MISO -1 // Not used for ST7789V |
| 58 | +#define DISPLAY_PIN_MOSI 13 // LCD_DIN |
| 59 | +#define DISPLAY_PIN_SCK 10 // LCD_CLK |
| 60 | +#define DISPLAY_PIN_DC 11 // LCD_DC |
| 61 | +#define DISPLAY_PIN_CS 12 // LCD_CS |
| 62 | +#define DISPLAY_PIN_RST 9 // LCD_RST |
| 63 | +#define DISPLAY_PIN_BL 14 // LCD_BL |
| 64 | + |
| 65 | +#define DISPLAY_BL_ON 0 // GPIO state to enable back light |
| 66 | + |
| 67 | +#define DISPLAY_WIDTH 320 |
| 68 | +#define DISPLAY_HEIGHT 170 |
| 69 | +#define DISPLAY_COL_OFFSET 35 |
| 70 | +#define DISPLAY_ROW_OFFSET 0 |
| 71 | + |
| 72 | +// Memory Data Access Control & Vertical Scroll Start Address |
| 73 | +#define DISPLAY_MADCTL (TFT_MADCTL_MX) |
| 74 | +#define DISPLAY_VSCSAD 0 |
| 75 | +#define DISPLAY_TITLE "ESP32S3-LCD-1.9" |
| 76 | + |
| 77 | +//--------------------------------------------------------------------+ |
| 78 | +// USB UF2 |
| 79 | +//--------------------------------------------------------------------+ |
| 80 | +#define USB_VID 0x303a // Espressif VID |
| 81 | +#define USB_PID 0x8223 |
| 82 | +#define USB_MANUFACTURER "Waveshare" |
| 83 | +#define USB_PRODUCT "ESP32-S3_LCD_1.9" |
| 84 | +#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT |
| 85 | +#define UF2_BOARD_ID "ESP32S3-LCD_1.9-v0" |
| 86 | +#define UF2_VOLUME_LABEL "S3-LCD-BOOT" |
| 87 | +#define UF2_INDEX_URL "https://www.waveshare.com/esp32-s3-lcd-1.9.htm" |
| 88 | + |
| 89 | +#endif |
0 commit comments