|
| 1 | +/* |
| 2 | + * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +#pragma once |
| 8 | + |
| 9 | +// *INDENT-OFF* |
| 10 | + |
| 11 | +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 12 | +///////////////////////////////////////////// Driver: LCD Configurations /////////////////////////////////////////////// |
| 13 | +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 14 | +/** |
| 15 | + * The following configurations are used to enable the LCD drivers which are used in the board. Disable useless LCDs to |
| 16 | + * reduce the code size. |
| 17 | + * |
| 18 | + */ |
| 19 | +#define ESP_PANEL_CONF_LCD_ENABLE_AXS15231B (1) |
| 20 | +#define ESP_PANEL_CONF_LCD_ENABLE_EK9716B (1) |
| 21 | +#define ESP_PANEL_CONF_LCD_ENABLE_EK79007 (1) |
| 22 | +#define ESP_PANEL_CONF_LCD_ENABLE_GC9A01 (1) |
| 23 | +#define ESP_PANEL_CONF_LCD_ENABLE_GC9B71 (1) |
| 24 | +#define ESP_PANEL_CONF_LCD_ENABLE_GC9503 (1) |
| 25 | +#define ESP_PANEL_CONF_LCD_ENABLE_HX8399 (1) |
| 26 | +#define ESP_PANEL_CONF_LCD_ENABLE_ILI9341 (1) |
| 27 | +#define ESP_PANEL_CONF_LCD_ENABLE_ILI9881C (1) |
| 28 | +#define ESP_PANEL_CONF_LCD_ENABLE_JD9165 (1) |
| 29 | +#define ESP_PANEL_CONF_LCD_ENABLE_JD9365 (1) |
| 30 | +#define ESP_PANEL_CONF_LCD_ENABLE_NV3022B (1) |
| 31 | +#define ESP_PANEL_CONF_LCD_ENABLE_SH8601 (1) |
| 32 | +#define ESP_PANEL_CONF_LCD_ENABLE_SPD2010 (1) |
| 33 | +#define ESP_PANEL_CONF_LCD_ENABLE_ST7262 (1) |
| 34 | +#define ESP_PANEL_CONF_LCD_ENABLE_ST7701 (1) |
| 35 | +#define ESP_PANEL_CONF_LCD_ENABLE_ST7703 (1) |
| 36 | +#define ESP_PANEL_CONF_LCD_ENABLE_ST7789 (1) |
| 37 | +#define ESP_PANEL_CONF_LCD_ENABLE_ST7796 (1) |
| 38 | +#define ESP_PANEL_CONF_LCD_ENABLE_ST77903 (1) |
| 39 | +#define ESP_PANEL_CONF_LCD_ENABLE_ST77916 (1) |
| 40 | +#define ESP_PANEL_CONF_LCD_ENABLE_ST77922 (1) |
| 41 | + |
| 42 | +/** |
| 43 | + * If set to 0, the code of disabled LCD drivers will be shielded to speed up compilation. |
| 44 | + * |
| 45 | + * Take ILI9341 as an example, there are four situations with `ESP_PANEL_CONF_LCD_ENABLE_ILI9341` (CONF1) and |
| 46 | + * `ESP_PANEL_CONF_LCD_COMPILE_DISABLED` (CONF2): |
| 47 | + * |
| 48 | + * | CONF1 | CONF2 | Is `esp_panel::LCD_ILI9341` available? | Can `esp_panel::Board` work with ILI9341? | |
| 49 | + * |-------|-------|---------------------------------------|--------------------------------------------| |
| 50 | + * | 0 | 0 | No | No | |
| 51 | + * | 1 | 0 | Yes | Yes | |
| 52 | + * | 0 | 1 | Yes | No | |
| 53 | + * | 1 | 1 | Yes | Yes | |
| 54 | + * |
| 55 | + */ |
| 56 | +#define ESP_PANEL_CONF_LCD_COMPILE_DISABLED (1) |
| 57 | + |
| 58 | +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 59 | +//////////////////////////////////////////// Driver: Touch Configurations ////////////////////////////////////////////// |
| 60 | +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 61 | +/* Maximum point number */ |
| 62 | +#define ESP_PANEL_CONF_TOUCH_MAX_POINTS (5) |
| 63 | +/* Maximum button number */ |
| 64 | +#define ESP_PANEL_CONF_TOUCH_MAX_BUTTONS (1) |
| 65 | + |
| 66 | +/** |
| 67 | + * The following configurations are used to enable the touch drivers which are used in the board. Default disable them |
| 68 | + * to reduce the code size. |
| 69 | + * |
| 70 | + */ |
| 71 | +#define ESP_PANEL_CONF_TOUCH_ENABLE_AXS15231B (1) |
| 72 | +#define ESP_PANEL_CONF_TOUCH_ENABLE_CST816S (1) |
| 73 | +#define ESP_PANEL_CONF_TOUCH_ENABLE_FT5x06 (1) |
| 74 | +#define ESP_PANEL_CONF_TOUCH_ENABLE_GT911 (1) |
| 75 | +#define ESP_PANEL_CONF_TOUCH_ENABLE_GT1151 (1) |
| 76 | +#define ESP_PANEL_CONF_TOUCH_ENABLE_SPD2010 (1) |
| 77 | +#define ESP_PANEL_CONF_TOUCH_ENABLE_ST1633 (1) |
| 78 | +#define ESP_PANEL_CONF_TOUCH_ENABLE_ST7123 (1) |
| 79 | +#define ESP_PANEL_CONF_TOUCH_ENABLE_STMPE610 (1) |
| 80 | +#define ESP_PANEL_CONF_TOUCH_ENABLE_TT21100 (1) |
| 81 | +#define ESP_PANEL_CONF_TOUCH_ENABLE_XPT2046 (1) |
| 82 | + |
| 83 | +/** |
| 84 | + * If set to 0, the code of disabled touch drivers will be shielded to speed up compilation. |
| 85 | + * |
| 86 | + * Take GT911 as an example, there are four situations with `ESP_PANEL_CONF_TOUCH_ENABLE_GT911` (CONF1) and |
| 87 | + * `ESP_PANEL_CONF_TOUCH_COMPILE_DISABLED` (CONF2): |
| 88 | + * |
| 89 | + * | CONF1 | CONF2 | Is `esp_panel::LCD_GT911` available? | Can `esp_panel::Board` work with GT911? | |
| 90 | + * |-------|-------|--------------------------------------|-----------------------------------------| |
| 91 | + * | 0 | 0 | No | No | |
| 92 | + * | 1 | 0 | Yes | Yes | |
| 93 | + * | 0 | 1 | Yes | No | |
| 94 | + * | 1 | 1 | Yes | Yes | |
| 95 | + * |
| 96 | + */ |
| 97 | +#define ESP_PANEL_CONF_TOUCH_COMPILE_DISABLED (1) |
| 98 | + |
| 99 | +#if ESP_PANEL_CONF_TOUCH_ENABLE_XPT2046 || ESP_PANEL_CONF_TOUCH_COMPILE_DISABLED |
| 100 | + /** |
| 101 | + * Minimum Z pressure threshold |
| 102 | + * |
| 103 | + */ |
| 104 | + #define ESP_PANEL_CONF_TOUCH_XPT2046_Z_THRESHOLD (400) |
| 105 | + |
| 106 | + /** |
| 107 | + * Enable Interrupt (PENIRQ) output, also called Full Power Mode. |
| 108 | + * Enable this to configure the XPT2046 to output low on the PENIRQ output if a touch is detected. |
| 109 | + * This mode uses more power when enabled. Note that this signal goes low normally when a read is active. |
| 110 | + * |
| 111 | + */ |
| 112 | + #define ESP_PANEL_CONF_TOUCH_XPT2046_INTERRUPT_MODE (0) // 0/1 |
| 113 | + |
| 114 | + /** |
| 115 | + * Keep internal Vref enabled. |
| 116 | + * Enable this to keep the internal Vref enabled between conversions. This uses slightly more power, |
| 117 | + * but requires fewer transactions when reading the battery voltage, aux voltage and temperature. |
| 118 | + * |
| 119 | + */ |
| 120 | + #define ESP_PANEL_CONF_TOUCH_XPT2046_VREF_ON_MODE (0) // 0/1 |
| 121 | + |
| 122 | + /** |
| 123 | + * Convert touch coordinates to screen coordinates. |
| 124 | + * When this option is enabled the raw ADC values will be converted from 0-4096 to 0-{screen width} or 0-{screen height}. |
| 125 | + * When this option is disabled the process_coordinates method will need to be used to convert the raw ADC values into a |
| 126 | + * screen coordinate. |
| 127 | + * |
| 128 | + */ |
| 129 | + #define ESP_PANEL_CONF_TOUCH_XPT2046_CONVERT_ADC_TO_COORDS (1) // 0/1 |
| 130 | + |
| 131 | + /** |
| 132 | + * Enable data structure locking. |
| 133 | + * By enabling this option the XPT2046 driver will lock the touch position data structures when reading values from the |
| 134 | + * XPT2046 and when reading position data via API. |
| 135 | + * WARNING: enabling this option may result in unintended crashes. |
| 136 | + * |
| 137 | + */ |
| 138 | + #define ESP_PANEL_CONF_TOUCH_XPT2046_ENABLE_LOCKING (0) // 0/1 |
| 139 | +#endif // ESP_PANEL_TOUCH_ENABLE_XPT2046 |
| 140 | + |
| 141 | +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 142 | +/////////////////////////////////////////////// File Version /////////////////////////////////////////////////////////// |
| 143 | +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 144 | +/** |
| 145 | + * Do not change the following versions, they are used to check if the configurations in this file are compatible with |
| 146 | + * the current version of `esp_panel_conf.h` in the library. The detailed rules are as follows: |
| 147 | + * |
| 148 | + * 1. If the major version is not consistent, then the configurations in this file are incompatible with the library |
| 149 | + * and must be replaced with the file from the library. |
| 150 | + * 2. If the minor version is not consistent, this file might be missing some new configurations, which will be set to |
| 151 | + * default values. It is recommended to replace it with the file from the library. |
| 152 | + * 3. Even if the patch version is not consistent, it will not affect normal functionality. |
| 153 | + * |
| 154 | + */ |
| 155 | +#define ESP_PANEL_CONF_FILE_VERSION_MAJOR 1 |
| 156 | +#define ESP_PANEL_CONF_FILE_VERSION_MINOR 0 |
| 157 | +#define ESP_PANEL_CONF_FILE_VERSION_PATCH 0 |
| 158 | + |
| 159 | +// *INDENT-OFF* |
0 commit comments