From acce90a3bff1860da9d4c36b1c69a0da29ca3132 Mon Sep 17 00:00:00 2001 From: suda-morris <362953310@qq.com> Date: Fri, 29 Dec 2023 14:29:01 +0800 Subject: [PATCH] feat(lcd): add ili9881c driver --- .github/workflows/upload_component.yml | 2 +- .../lcd/esp_lcd_ili9881c/CMakeLists.txt | 4 + components/lcd/esp_lcd_ili9881c/README.md | 21 + .../lcd/esp_lcd_ili9881c/esp_lcd_ili9881c.c | 484 ++++++++++++++++++ .../lcd/esp_lcd_ili9881c/idf_component.yml | 5 + .../include/esp_lcd_ili9881c.h | 35 ++ components/lcd/esp_lcd_ili9881c/license.txt | 201 ++++++++ test_app/CMakeLists.txt | 7 + 8 files changed, 758 insertions(+), 1 deletion(-) create mode 100644 components/lcd/esp_lcd_ili9881c/CMakeLists.txt create mode 100644 components/lcd/esp_lcd_ili9881c/README.md create mode 100644 components/lcd/esp_lcd_ili9881c/esp_lcd_ili9881c.c create mode 100644 components/lcd/esp_lcd_ili9881c/idf_component.yml create mode 100644 components/lcd/esp_lcd_ili9881c/include/esp_lcd_ili9881c.h create mode 100644 components/lcd/esp_lcd_ili9881c/license.txt diff --git a/.github/workflows/upload_component.yml b/.github/workflows/upload_component.yml index 98eda2cb..e9cbdf9b 100644 --- a/.github/workflows/upload_component.yml +++ b/.github/workflows/upload_component.yml @@ -20,7 +20,7 @@ jobs: bsp/esp32_azure_iot_kit;bsp/esp32_s2_kaluga_kit;bsp/esp_wrover_kit;bsp/esp-box;bsp/esp32_s3_usb_otg;bsp/esp32_s3_eye;bsp/esp32_s3_lcd_ev_board;bsp/esp32_s3_korvo_2;bsp/esp-box-lite;bsp/esp32_lyrat;bsp/esp32_c3_lcdkit;bsp/esp-box-3;bsp/esp_bsp_generic;bsp/esp32_s3_korvo_1; components/bh1750;components/ds18b20;components/es8311;components/es7210;components/fbm320;components/hts221;components/mag3110;components/mpu6050;components/ssd1306;components/esp_lvgl_port;components/icm42670; components/lcd_touch/esp_lcd_touch;components/lcd_touch/esp_lcd_touch_ft5x06;components/lcd_touch/esp_lcd_touch_gt911;components/lcd_touch/esp_lcd_touch_tt21100;components/lcd_touch/esp_lcd_touch_gt1151;components/lcd_touch/esp_lcd_touch_cst816s; - components/lcd/esp_lcd_gc9a01;components/lcd/esp_lcd_ili9341;components/lcd/esp_lcd_ra8875;components/lcd_touch/esp_lcd_touch_stmpe610;components/lcd/esp_lcd_sh1107;components/lcd/esp_lcd_st7796;components/lcd/esp_lcd_gc9503;components/lcd/esp_lcd_ssd1681; + components/lcd/esp_lcd_gc9a01;components/lcd/esp_lcd_ili9341;components/lcd/esp_lcd_ra8875;components/lcd_touch/esp_lcd_touch_stmpe610;components/lcd/esp_lcd_sh1107;components/lcd/esp_lcd_st7796;components/lcd/esp_lcd_gc9503;components/lcd/esp_lcd_ssd1681;components/lcd/esp_lcd_ili9881c; components/io_expander/esp_io_expander;components/io_expander/esp_io_expander_tca9554;components/io_expander/esp_io_expander_tca95xx_16bit;components/io_expander/esp_io_expander_ht8574; namespace: "espressif" api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }} diff --git a/components/lcd/esp_lcd_ili9881c/CMakeLists.txt b/components/lcd/esp_lcd_ili9881c/CMakeLists.txt new file mode 100644 index 00000000..07013ec6 --- /dev/null +++ b/components/lcd/esp_lcd_ili9881c/CMakeLists.txt @@ -0,0 +1,4 @@ +idf_component_register(SRCS "esp_lcd_ili9881c.c" + INCLUDE_DIRS "include" + REQUIRES "esp_lcd" + PRIV_REQUIRES "esp_driver_gpio") diff --git a/components/lcd/esp_lcd_ili9881c/README.md b/components/lcd/esp_lcd_ili9881c/README.md new file mode 100644 index 00000000..0cc0d746 --- /dev/null +++ b/components/lcd/esp_lcd_ili9881c/README.md @@ -0,0 +1,21 @@ +# ESP LCD ILI9881C + +[![Component Registry](https://components.espressif.com/components/espressif/esp_lcd_ili9881c/badge.svg)](https://components.espressif.com/components/espressif/esp_lcd_ili9881c) + +Implementation of the ILI9881C LCD controller with esp_lcd component. + +| LCD controller | Communication interface | Component name | Link to datasheet | +| :------------: | :---------------------: | :------------: | :---------------: | +| ILI9881C | MIPI DSI | esp_lcd_ili9881c | [Specification](https://www.internetsomething.com/lcd/ILI9881C-3lane-mipi-gramless.pdf) | + +## Add to project + +Packages from this repository are uploaded to [Espressif's component service](https://components.espressif.com/). +You can add them to your project via `idf.py add-dependency`, e.g. + +```text +idf.py add-dependency esp_lcd_ili9881c +``` + +Alternatively, you can create `idf_component.yml`. More is in [Espressif's documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html). + diff --git a/components/lcd/esp_lcd_ili9881c/esp_lcd_ili9881c.c b/components/lcd/esp_lcd_ili9881c/esp_lcd_ili9881c.c new file mode 100644 index 00000000..03959c0a --- /dev/null +++ b/components/lcd/esp_lcd_ili9881c/esp_lcd_ili9881c.c @@ -0,0 +1,484 @@ +/* + * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "esp_lcd_panel_interface.h" +#include "esp_lcd_panel_io.h" +#include "esp_lcd_panel_vendor.h" +#include "esp_lcd_panel_ops.h" +#include "esp_lcd_panel_commands.h" +#include "driver/gpio.h" +#include "esp_log.h" +#include "esp_check.h" +#include "esp_lcd_ili9881c.h" + +static const char *TAG = "ili9881c"; + +static esp_err_t panel_ili9881c_del(esp_lcd_panel_t *panel); +static esp_err_t panel_ili9881c_reset(esp_lcd_panel_t *panel); +static esp_err_t panel_ili9881c_init(esp_lcd_panel_t *panel); +static esp_err_t panel_ili9881c_invert_color(esp_lcd_panel_t *panel, bool invert_color_data); +static esp_err_t panel_ili9881c_mirror(esp_lcd_panel_t *panel, bool mirror_x, bool mirror_y); +static esp_err_t panel_ili9881c_swap_xy(esp_lcd_panel_t *panel, bool swap_axes); +static esp_err_t panel_ili9881c_set_gap(esp_lcd_panel_t *panel, int x_gap, int y_gap); +static esp_err_t panel_ili9881c_disp_on_off(esp_lcd_panel_t *panel, bool off); +static esp_err_t panel_ili9881c_sleep(esp_lcd_panel_t *panel, bool sleep); + +typedef struct { + int cmd; /*reset_gpio_num >= 0) { + gpio_config_t io_conf = { + .mode = GPIO_MODE_OUTPUT, + .pin_bit_mask = 1ULL << panel_dev_config->reset_gpio_num, + }; + ESP_GOTO_ON_ERROR(gpio_config(&io_conf), err, TAG, "configure GPIO for RST line failed"); + } + + switch (panel_dev_config->rgb_ele_order) { + case LCD_RGB_ELEMENT_ORDER_RGB: + ili9881c->madctl_val = 0; + break; + case LCD_RGB_ELEMENT_ORDER_BGR: + ili9881c->madctl_val |= LCD_CMD_BGR_BIT; + break; + default: + ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported rgb element order"); + break; + } + + switch (panel_dev_config->bits_per_pixel) { + case 16: // RGB565 + ili9881c->colmod_val = 0x55; + break; + case 18: // RGB666 + ili9881c->colmod_val = 0x66; + break; + case 24: // RGB888 + ili9881c->colmod_val = 0x77; + break; + default: + ESP_GOTO_ON_FALSE(false, ESP_ERR_NOT_SUPPORTED, err, TAG, "unsupported pixel width"); + break; + } + + // The ID register is on the CMD_Page 1 + uint8_t ID1, ID2, ID3; + esp_lcd_panel_io_tx_param(io, 0xFF, (uint8_t[]) { + 0x98, 0x81, 0x01 + }, 3); + esp_lcd_panel_io_rx_param(io, 0x00, &ID1, 1); + esp_lcd_panel_io_rx_param(io, 0x01, &ID2, 1); + esp_lcd_panel_io_rx_param(io, 0x02, &ID3, 1); + ESP_LOGI(TAG, "ID1: 0x%x, ID2: 0x%x, ID3: 0x%x", ID1, ID2, ID3); + + ili9881c->io = io; + ili9881c->reset_gpio_num = panel_dev_config->reset_gpio_num; + ili9881c->reset_level = panel_dev_config->flags.reset_active_high; + ili9881c->base.del = panel_ili9881c_del; + ili9881c->base.reset = panel_ili9881c_reset; + ili9881c->base.init = panel_ili9881c_init; + ili9881c->base.invert_color = panel_ili9881c_invert_color; + ili9881c->base.set_gap = panel_ili9881c_set_gap; + ili9881c->base.mirror = panel_ili9881c_mirror; + ili9881c->base.swap_xy = panel_ili9881c_swap_xy; + ili9881c->base.disp_on_off = panel_ili9881c_disp_on_off; + ili9881c->base.disp_sleep = panel_ili9881c_sleep; + *ret_panel = &ili9881c->base; + + return ESP_OK; + +err: + if (ili9881c) { + panel_ili9881c_del(&ili9881c->base); + } + return ret; +} + +static esp_err_t panel_ili9881c_del(esp_lcd_panel_t *panel) +{ + ili9881c_panel_t *ili9881c = __containerof(panel, ili9881c_panel_t, base); + + if (ili9881c->reset_gpio_num >= 0) { + gpio_reset_pin(ili9881c->reset_gpio_num); + } + free(ili9881c); + return ESP_OK; +} + +static esp_err_t panel_ili9881c_reset(esp_lcd_panel_t *panel) +{ + ili9881c_panel_t *ili9881c = __containerof(panel, ili9881c_panel_t, base); + esp_lcd_panel_io_handle_t io = ili9881c->io; + + // perform hardware reset + if (ili9881c->reset_gpio_num >= 0) { + gpio_set_level(ili9881c->reset_gpio_num, ili9881c->reset_level); + vTaskDelay(pdMS_TO_TICKS(10)); + gpio_set_level(ili9881c->reset_gpio_num, !ili9881c->reset_level); + vTaskDelay(pdMS_TO_TICKS(10)); + } else { // perform software reset + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_SWRESET, NULL, 0), TAG, "send command failed"); + vTaskDelay(pdMS_TO_TICKS(20)); // spec, wait at least 5ms before sending new command + } + + return ESP_OK; +} + +static esp_err_t panel_ili9881c_init(esp_lcd_panel_t *panel) +{ + ili9881c_panel_t *ili9881c = __containerof(panel, ili9881c_panel_t, base); + esp_lcd_panel_io_handle_t io = ili9881c->io; + + const ili9881c_lcd_init_cmd_t *init_cmds = vendor_specific_init_code_default; + uint16_t init_cmds_size = sizeof(vendor_specific_init_code_default) / sizeof(ili9881c_lcd_init_cmd_t); + + for (int i = 0; i < init_cmds_size; i++) { + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, init_cmds[i].cmd, init_cmds[i].data, init_cmds[i].data_bytes), TAG, "send command failed"); + } + + // back to CMD_Page 0 + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, 0xFF, (uint8_t[]) { + 0x98, 0x81, 0x00 + }, 3), TAG, "send command failed"); + // exit sleep mode + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_SLPOUT, NULL, 0), TAG, + "io tx param failed"); + vTaskDelay(pdMS_TO_TICKS(120)); + + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_MADCTL, (uint8_t[]) { + ili9881c->madctl_val, + }, 1), TAG, "send command failed"); + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_COLMOD, (uint8_t[]) { + ili9881c->colmod_val, + }, 1), TAG, "send command failed"); + + return ESP_OK; +} + +static esp_err_t panel_ili9881c_invert_color(esp_lcd_panel_t *panel, bool invert_color_data) +{ + ili9881c_panel_t *ili9881c = __containerof(panel, ili9881c_panel_t, base); + esp_lcd_panel_io_handle_t io = ili9881c->io; + int command = 0; + if (invert_color_data) { + command = LCD_CMD_INVON; + } else { + command = LCD_CMD_INVOFF; + } + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, command, NULL, 0), TAG, "send command failed"); + return ESP_OK; +} + +static esp_err_t panel_ili9881c_mirror(esp_lcd_panel_t *panel, bool mirror_x, bool mirror_y) +{ + ili9881c_panel_t *ili9881c = __containerof(panel, ili9881c_panel_t, base); + esp_lcd_panel_io_handle_t io = ili9881c->io; + if (mirror_x) { + ili9881c->madctl_val |= LCD_CMD_MX_BIT; + } else { + ili9881c->madctl_val &= ~LCD_CMD_MX_BIT; + } + if (mirror_y) { + ili9881c->madctl_val |= LCD_CMD_MY_BIT; + } else { + ili9881c->madctl_val &= ~LCD_CMD_MY_BIT; + } + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_MADCTL, (uint8_t[]) { + ili9881c->madctl_val + }, 1), TAG, "send command failed"); + return ESP_OK; +} + +static esp_err_t panel_ili9881c_swap_xy(esp_lcd_panel_t *panel, bool swap_axes) +{ + ili9881c_panel_t *ili9881c = __containerof(panel, ili9881c_panel_t, base); + esp_lcd_panel_io_handle_t io = ili9881c->io; + if (swap_axes) { + ili9881c->madctl_val |= LCD_CMD_MV_BIT; + } else { + ili9881c->madctl_val &= ~LCD_CMD_MV_BIT; + } + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_MADCTL, (uint8_t[]) { + ili9881c->madctl_val + }, 1), TAG, "send command failed"); + return ESP_OK; +} + +static esp_err_t panel_ili9881c_set_gap(esp_lcd_panel_t *panel, int x_gap, int y_gap) +{ + ili9881c_panel_t *ili9881c = __containerof(panel, ili9881c_panel_t, base); + ili9881c->x_gap = x_gap; + ili9881c->y_gap = y_gap; + return ESP_OK; +} + +static esp_err_t panel_ili9881c_disp_on_off(esp_lcd_panel_t *panel, bool on_off) +{ + ili9881c_panel_t *ili9881c = __containerof(panel, ili9881c_panel_t, base); + esp_lcd_panel_io_handle_t io = ili9881c->io; + int command = 0; + + if (on_off) { + command = LCD_CMD_DISPON; + } else { + command = LCD_CMD_DISPOFF; + } + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, command, NULL, 0), TAG, "send command failed"); + return ESP_OK; +} + +static esp_err_t panel_ili9881c_sleep(esp_lcd_panel_t *panel, bool sleep) +{ + ili9881c_panel_t *ili9881c = __containerof(panel, ili9881c_panel_t, base); + esp_lcd_panel_io_handle_t io = ili9881c->io; + int command = 0; + if (sleep) { + command = LCD_CMD_SLPIN; + } else { + command = LCD_CMD_SLPOUT; + } + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, command, NULL, 0), TAG, + "io tx param failed"); + vTaskDelay(pdMS_TO_TICKS(100)); + + return ESP_OK; +} diff --git a/components/lcd/esp_lcd_ili9881c/idf_component.yml b/components/lcd/esp_lcd_ili9881c/idf_component.yml new file mode 100644 index 00000000..397f91d7 --- /dev/null +++ b/components/lcd/esp_lcd_ili9881c/idf_component.yml @@ -0,0 +1,5 @@ +version: "0.1.0" +description: ESP LCD ILI9881C (MIPI DSI) +url: https://github.com/espressif/esp-bsp/tree/master/components/lcd/esp_lcd_ili9881c +dependencies: + idf: ">=5.3" diff --git a/components/lcd/esp_lcd_ili9881c/include/esp_lcd_ili9881c.h b/components/lcd/esp_lcd_ili9881c/include/esp_lcd_ili9881c.h new file mode 100644 index 00000000..bf172c53 --- /dev/null +++ b/components/lcd/esp_lcd_ili9881c/include/esp_lcd_ili9881c.h @@ -0,0 +1,35 @@ +/* + * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +/** + * @file + * @brief ESP LCD: ILI9881C + */ + +#pragma once + +#include "esp_lcd_panel_vendor.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Create LCD control panel for ILI9881C + * + * @param[in] io LCD panel IO handle + * @param[in] panel_dev_config general panel device configuration + * @param[out] ret_panel Returned LCD panel handle + * @return + * - ESP_OK: Create LCD panel successfully + * - ESP_ERR_INVALID_ARG: Create LCD panel failed because of invalid arguments + * - ESP_ERR_NO_MEM: Create LCD panel failed because of memory allocation failure + * - ESP_FAIL: Create LCD panel failed because of other errors + */ +esp_err_t esp_lcd_new_panel_ili9881c(const esp_lcd_panel_io_handle_t io, const esp_lcd_panel_dev_config_t *panel_dev_config, esp_lcd_panel_handle_t *ret_panel); + +#ifdef __cplusplus +} +#endif diff --git a/components/lcd/esp_lcd_ili9881c/license.txt b/components/lcd/esp_lcd_ili9881c/license.txt new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/components/lcd/esp_lcd_ili9881c/license.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/test_app/CMakeLists.txt b/test_app/CMakeLists.txt index 0d5e5311..870b64a0 100644 --- a/test_app/CMakeLists.txt +++ b/test_app/CMakeLists.txt @@ -16,6 +16,8 @@ if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_LESS "4.4") set(EXCLUDE_COMPONENTS "es8311" "es7210" "esp_lvgl_port" "ds18b20" "icm42670") elseif("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_LESS "5.0") set(EXCLUDE_COMPONENTS "esp_lcd_touch_stmpe610" "ds18b20" "esp_lcd_ssd1681") +elseif("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_LESS "5.3") + set(EXCLUDE_COMPONENTS "esp_lcd_ili9881c") endif() # Test rgb lcd components only in esp32s3 @@ -23,6 +25,11 @@ if(NOT "${IDF_TARGET}" STREQUAL "esp32s3") list(APPEND EXCLUDE_COMPONENTS "esp_lcd_gc9503") endif() +# Test mipi dsi lcd components only in esp32p4 +if(NOT "${IDF_TARGET}" STREQUAL "esp32p4") + list(APPEND EXCLUDE_COMPONENTS "esp_lcd_ili9881c") +endif() + # Test i80 lcd components only in esp32s2, esp32s3 if(NOT "${IDF_TARGET}" STREQUAL "esp32s2" AND NOT "${IDF_TARGET}" STREQUAL "esp32s3") list(APPEND EXCLUDE_COMPONENTS "esp_lcd_st7796")