|
| 1 | +/* |
| 2 | + * The MIT License (MIT) |
| 3 | + * |
| 4 | + * Copyright (c) 2020 Ha Thach (tinyusb.org) for Adafruit Industries |
| 5 | + * Copyright (c) 2023 Linar Yusupov |
| 6 | + * |
| 7 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 8 | + * of this software and associated documentation files (the "Software"), to deal |
| 9 | + * in the Software without restriction, including without limitation the rights |
| 10 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 11 | + * copies of the Software, and to permit persons to whom the Software is |
| 12 | + * furnished to do so, subject to the following conditions: |
| 13 | + * |
| 14 | + * The above copyright notice and this permission notice shall be included in |
| 15 | + * all copies or substantial portions of the Software. |
| 16 | + * |
| 17 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 20 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 21 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 22 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 23 | + * THE SOFTWARE. |
| 24 | + */ |
| 25 | + |
| 26 | +#pragma once |
| 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 | +// Initial delay in milliseconds to detect user interaction to enter UF2 |
| 38 | +#define UF2_DETECTION_DELAY_MS 1000 |
| 39 | + |
| 40 | +//--------------------------------------------------------------------+ |
| 41 | +// LED |
| 42 | +//--------------------------------------------------------------------+ |
| 43 | + |
| 44 | +// LED for indicator and writing flash |
| 45 | +//#define LED_PIN 18 |
| 46 | +//#define LED_STATE_ON 1 |
| 47 | + |
| 48 | +//--------------------------------------------------------------------+ |
| 49 | +// TFT |
| 50 | +//--------------------------------------------------------------------+ |
| 51 | + |
| 52 | +#define CONFIG_LCD_TYPE_ST7789V |
| 53 | + |
| 54 | +#define DISPLAY_PIN_MISO -1 // required if use CONFIG_LCD_TYPE_AUTO |
| 55 | +#define DISPLAY_PIN_MOSI 48 |
| 56 | +#define DISPLAY_PIN_SCK 38 |
| 57 | + |
| 58 | +#define DISPLAY_PIN_CS 39 |
| 59 | +#define DISPLAY_PIN_DC 47 |
| 60 | +#define DISPLAY_PIN_RST 40 |
| 61 | + |
| 62 | +#define DISPLAY_PIN_BL 7 |
| 63 | +#define DISPLAY_BL_ON 0 // GPIO state to enable back light |
| 64 | + |
| 65 | +#define DISPLAY_PIN_POWER 17 |
| 66 | +#define DISPLAY_POWER_ON 1 // GPIO state to enable TFT |
| 67 | + |
| 68 | +#define DISPLAY_WIDTH 320 |
| 69 | +#define DISPLAY_HEIGHT 170 |
| 70 | + |
| 71 | +#define DISPLAY_COL_OFFSET 35 |
| 72 | +#define DISPLAY_ROW_OFFSET 0 |
| 73 | + |
| 74 | +// Memory Data Access Control & // Vertical Scroll Start Address |
| 75 | +// Rotate display by changing MY to MX below |
| 76 | +#define DISPLAY_MADCTL TFT_MADCTL_MY |
| 77 | +#define DISPLAY_VSCSAD 0 |
| 78 | + |
| 79 | +#define DISPLAY_TITLE "Heltec T190" |
| 80 | + |
| 81 | +//--------------------------------------------------------------------+ |
| 82 | +// USB UF2 |
| 83 | +//--------------------------------------------------------------------+ |
| 84 | + |
| 85 | +#define USB_VID 0x303A // Espressif VID |
| 86 | +#define USB_PID 0x1001 // Espressif assigned PID |
| 87 | +#define USB_MANUFACTURER "Heltec" |
| 88 | +#define USB_PRODUCT "Vision Master T190" |
| 89 | + |
| 90 | +#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT |
| 91 | +#define UF2_BOARD_ID "ESP32S3-HT-VMT190-v1.0" |
| 92 | +#define UF2_VOLUME_LABEL "HTBOOT" |
| 93 | +#define UF2_INDEX_URL "https://heltec.org/project/vision-master-t190" |
0 commit comments