From 1452b261c778453c32a98fe897b571561db95bb5 Mon Sep 17 00:00:00 2001 From: Vilem Zavodny <98878239+espzav@users.noreply.github.com> Date: Mon, 24 Jul 2023 15:03:05 +0200 Subject: [PATCH] Add pre-commit for copyright and fixed copyright in headers --- .pre-commit-config.yaml | 6 +++ SquareLine/gen.py | 2 + check_copyright_config.yaml | 45 +++++++++++++++++++ components/ssd1306/ssd1306_fonts.c | 5 +++ esp-box-lite/esp-box-lite.c | 2 +- esp-box-lite/include/bsp/display.h | 2 +- esp-box-lite/include/bsp/esp-box-lite.h | 22 ++++----- esp-box-lite/include/bsp/esp-bsp.h | 2 +- esp-box-lite/priv_include/bsp_err_check.h | 2 +- esp-box/esp-box.c | 2 +- esp-box/include/bsp/display.h | 2 +- esp-box/include/bsp/esp-box.h | 22 ++++----- esp-box/include/bsp/esp-bsp.h | 2 +- esp-box/include/bsp/touch.h | 2 +- esp-box/priv_include/bsp_err_check.h | 2 +- esp32_azure_iot_kit/esp32_azure_iot_kit.c | 18 +++----- esp32_azure_iot_kit/include/bsp/esp-bsp.h | 2 +- .../include/bsp/esp32_azure_iot_kit.h | 2 +- .../priv_include/bsp_err_check.h | 2 +- esp32_c3_lcdkit/include/bsp/display.h | 2 +- esp32_c3_lcdkit/include/bsp/esp-bsp.h | 2 +- esp32_c3_lcdkit/priv_include/bsp_err_check.h | 2 +- esp32_lyrat/esp32_lyrat.c | 2 +- esp32_lyrat/esp32_lyrat_idf4.c | 2 +- esp32_lyrat/esp32_lyrat_idf5.c | 2 +- esp32_lyrat/include/bsp/esp-bsp.h | 2 +- esp32_lyrat/include/bsp/esp32_lyrat.h | 2 +- esp32_lyrat/priv_include/bsp_err_check.h | 2 +- esp32_s2_kaluga_kit/include/bsp/display.h | 2 +- esp32_s2_kaluga_kit/include/bsp/esp-bsp.h | 2 +- .../priv_include/bsp_err_check.h | 2 +- esp32_s3_eye/include/bsp/display.h | 2 +- esp32_s3_eye/include/bsp/esp-bsp.h | 2 +- esp32_s3_eye/priv_include/bsp_err_check.h | 2 +- esp32_s3_korvo_2/esp32_s3_korvo_2.c | 2 +- esp32_s3_korvo_2/include/bsp/display.h | 2 +- esp32_s3_korvo_2/include/bsp/esp-bsp.h | 2 +- .../include/bsp/esp32_s3_korvo_2.h | 2 +- esp32_s3_korvo_2/include/bsp/touch.h | 2 +- esp32_s3_korvo_2/priv_include/bsp_err_check.h | 2 +- esp32_s3_lcd_ev_board/esp32_s3_lcd_ev_board.c | 2 +- esp32_s3_lcd_ev_board/include/bsp/esp-bsp.h | 2 +- .../include/bsp/esp32_s3_lcd_ev_board.h | 30 ++++++------- .../priv_include/bsp_err_check.h | 2 +- .../priv_include/bsp_sub_board.h | 2 +- .../sub_board/sub_board_480x480.c | 2 +- .../sub_board/sub_board_800x480.c | 2 +- esp32_s3_usb_otg/include/bsp/display.h | 2 +- esp32_s3_usb_otg/include/bsp/esp-bsp.h | 2 +- esp32_s3_usb_otg/priv_include/bsp_err_check.h | 2 +- esp_wrover_kit/esp_wrover_kit.c | 2 +- esp_wrover_kit/include/bsp/display.h | 2 +- esp_wrover_kit/include/bsp/esp-bsp.h | 2 +- esp_wrover_kit/include/bsp/esp_wrover_kit.h | 2 +- esp_wrover_kit/priv_include/bsp_err_check.h | 2 +- examples/bsp_ext.py | 2 + examples/display/main/esp_logo.c | 5 +++ examples/display/main/esp_text.c | 5 +++ .../mqtt_example/main/mqtt_example_main.c | 18 +++----- examples/mqtt_example/main/wifi.c | 12 +++-- .../sensors_example/main/sensors_example.c | 18 +++----- 61 files changed, 174 insertions(+), 130 deletions(-) create mode 100644 check_copyright_config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 953db3ad..c04be792 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,3 +17,9 @@ repos: types_or: [c, c++] args: ['--fix=lf'] description: Forces to replace line ending by the UNIX 'lf' character + +- repo: https://github.com/espressif/check-copyright/ + rev: v1.0.3 + hooks: + - id: check-copyright + args: ['--config', 'check_copyright_config.yaml'] diff --git a/SquareLine/gen.py b/SquareLine/gen.py index eb489d15..a6d0f7f3 100644 --- a/SquareLine/gen.py +++ b/SquareLine/gen.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: Apache-2.0 import sys import os import json diff --git a/check_copyright_config.yaml b/check_copyright_config.yaml new file mode 100644 index 00000000..45bcb548 --- /dev/null +++ b/check_copyright_config.yaml @@ -0,0 +1,45 @@ +DEFAULT: + perform_check: yes # should the check be performed? + # Sections setting this to 'no' don't need to include any other options as they are ignored + # When a file is using a section with the option set to 'no', no checks are performed. + + # what licenses (or license expressions) are allowed for files in this section + # when setting this option in a section, you need to list all the allowed licenses + allowed_licenses: + - Apache-2.0 + license_for_new_files: Apache-2.0 # license to be used when inserting a new copyright notice + new_notice_c: | # notice for new C, CPP, H, HPP and LD files + /* + * SPDX-FileCopyrightText: {years} Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: {license} + */ + new_notice_python: | # notice for new python files + # SPDX-FileCopyrightText: {years} Espressif Systems (Shanghai) CO LTD + # SPDX-License-Identifier: {license} + + # comment lines matching: + # SPDX-FileCopyrightText: year[-year] Espressif Systems + # or + # SPDX-FileContributor: year[-year] Espressif Systems + # are replaced with this template prefixed with the correct comment notation (# or // or *) and SPDX- notation + espressif_copyright: '{years} Espressif Systems (Shanghai) CO LTD' + +# You can create your own rules for files or group of files +examples_and_unit_tests: + include: + - 'examples/' + - 'components/**/test/**' + - 'components/**/test_apps/**' + - 'test_app/' + - 'SquareLine/' + allowed_licenses: + - Apache-2.0 + - Unlicense + - CC0-1.0 + license_for_new_files: CC0-1.0 + +ignore: # You can also select ignoring files here + perform_check: no # Don't check files from that block + include: + - docu/ diff --git a/components/ssd1306/ssd1306_fonts.c b/components/ssd1306/ssd1306_fonts.c index 51c2dd88..23893c46 100644 --- a/components/ssd1306/ssd1306_fonts.c +++ b/components/ssd1306/ssd1306_fonts.c @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include "ssd1306_fonts.h" const uint8_t c_chFont1206[95][12] = { { diff --git a/esp-box-lite/esp-box-lite.c b/esp-box-lite/esp-box-lite.c index 7365a056..4045ff85 100644 --- a/esp-box-lite/esp-box-lite.c +++ b/esp-box-lite/esp-box-lite.c @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #include "driver/gpio.h" diff --git a/esp-box-lite/include/bsp/display.h b/esp-box-lite/include/bsp/display.h index 50bad81a..d186976b 100644 --- a/esp-box-lite/include/bsp/display.h +++ b/esp-box-lite/include/bsp/display.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/esp-box-lite/include/bsp/esp-box-lite.h b/esp-box-lite/include/bsp/esp-box-lite.h index dbbc05dc..1ebc7f13 100644 --- a/esp-box-lite/include/bsp/esp-box-lite.h +++ b/esp-box-lite/include/bsp/esp-box-lite.h @@ -1,7 +1,7 @@ -/* +/* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** @@ -56,15 +56,15 @@ * Power pins are on 3.3V. * * Double PMOD Connectors on ESP-BOX-Lite are labeled as follows: - * ┌────────────┐ - * | IO1 IO5 │ - * | IO2 IO6 │ - * | IO3 IO7 │ - * | IO4 IO8 │ - * ├────────────┤ - * | GND GND │ - * | 3V3 3V3 │ - * └────────────┘ + * |------------| + * | IO1 IO5 | + * | IO2 IO6 | + * | IO3 IO7 | + * | IO4 IO8 | + * |------------| + * | GND GND | + * | 3V3 3V3 | + * |------------| */ #define BSP_PMOD1_IO1 GPIO_NUM_42 #define BSP_PMOD1_IO2 GPIO_NUM_21 diff --git a/esp-box-lite/include/bsp/esp-bsp.h b/esp-box-lite/include/bsp/esp-bsp.h index cb59a84a..56ad229d 100644 --- a/esp-box-lite/include/bsp/esp-bsp.h +++ b/esp-box-lite/include/bsp/esp-bsp.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp-box-lite/priv_include/bsp_err_check.h b/esp-box-lite/priv_include/bsp_err_check.h index 5c0f7dae..50e9998e 100644 --- a/esp-box-lite/priv_include/bsp_err_check.h +++ b/esp-box-lite/priv_include/bsp_err_check.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp-box/esp-box.c b/esp-box/esp-box.c index 3025d4e6..1611e273 100644 --- a/esp-box/esp-box.c +++ b/esp-box/esp-box.c @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #include "driver/gpio.h" diff --git a/esp-box/include/bsp/display.h b/esp-box/include/bsp/display.h index 0c46f21e..73a7e18c 100644 --- a/esp-box/include/bsp/display.h +++ b/esp-box/include/bsp/display.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/esp-box/include/bsp/esp-box.h b/esp-box/include/bsp/esp-box.h index 7cebf573..5f6c19c1 100644 --- a/esp-box/include/bsp/esp-box.h +++ b/esp-box/include/bsp/esp-box.h @@ -1,7 +1,7 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** @@ -57,15 +57,15 @@ * Power pins are on 3.3V. * * Double PMOD Connectors on ESP-BOX are labeled as follows: - * ┌────────────┐ - * | IO1 IO5 │ - * | IO2 IO6 │ - * | IO3 IO7 │ - * | IO4 IO8 │ - * ├────────────┤ - * | GND GND │ - * | 3V3 3V3 │ - * └────────────┘ + * |------------| + * | IO1 IO5 | + * | IO2 IO6 | + * | IO3 IO7 | + * | IO4 IO8 | + * |------------| + * | GND GND | + * | 3V3 3V3 | + * |------------| */ #define BSP_PMOD1_IO1 GPIO_NUM_42 #define BSP_PMOD1_IO2 GPIO_NUM_21 diff --git a/esp-box/include/bsp/esp-bsp.h b/esp-box/include/bsp/esp-bsp.h index 93f6acc8..badaabc2 100644 --- a/esp-box/include/bsp/esp-bsp.h +++ b/esp-box/include/bsp/esp-bsp.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp-box/include/bsp/touch.h b/esp-box/include/bsp/touch.h index 0229286d..3c9857ce 100644 --- a/esp-box/include/bsp/touch.h +++ b/esp-box/include/bsp/touch.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/esp-box/priv_include/bsp_err_check.h b/esp-box/priv_include/bsp_err_check.h index b8c50a95..b2398acb 100644 --- a/esp-box/priv_include/bsp_err_check.h +++ b/esp-box/priv_include/bsp_err_check.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_azure_iot_kit/esp32_azure_iot_kit.c b/esp32_azure_iot_kit/esp32_azure_iot_kit.c index 472e8ca1..fa5fa551 100644 --- a/esp32_azure_iot_kit/esp32_azure_iot_kit.c +++ b/esp32_azure_iot_kit/esp32_azure_iot_kit.c @@ -1,16 +1,8 @@ -// Copyright 2015-2023 Espressif Systems (Shanghai) CO LTD -// -// 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. +/* + * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include "bsp/esp32_azure_iot_kit.h" #include "esp_vfs_fat.h" diff --git a/esp32_azure_iot_kit/include/bsp/esp-bsp.h b/esp32_azure_iot_kit/include/bsp/esp-bsp.h index f2764f89..f5c8134b 100644 --- a/esp32_azure_iot_kit/include/bsp/esp-bsp.h +++ b/esp32_azure_iot_kit/include/bsp/esp-bsp.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_azure_iot_kit/include/bsp/esp32_azure_iot_kit.h b/esp32_azure_iot_kit/include/bsp/esp32_azure_iot_kit.h index e4c43a4b..8c19f7d1 100644 --- a/esp32_azure_iot_kit/include/bsp/esp32_azure_iot_kit.h +++ b/esp32_azure_iot_kit/include/bsp/esp32_azure_iot_kit.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/esp32_azure_iot_kit/priv_include/bsp_err_check.h b/esp32_azure_iot_kit/priv_include/bsp_err_check.h index b8c50a95..b2398acb 100644 --- a/esp32_azure_iot_kit/priv_include/bsp_err_check.h +++ b/esp32_azure_iot_kit/priv_include/bsp_err_check.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_c3_lcdkit/include/bsp/display.h b/esp32_c3_lcdkit/include/bsp/display.h index 0c46f21e..73a7e18c 100644 --- a/esp32_c3_lcdkit/include/bsp/display.h +++ b/esp32_c3_lcdkit/include/bsp/display.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/esp32_c3_lcdkit/include/bsp/esp-bsp.h b/esp32_c3_lcdkit/include/bsp/esp-bsp.h index 7bb45ee5..35e15cd3 100644 --- a/esp32_c3_lcdkit/include/bsp/esp-bsp.h +++ b/esp32_c3_lcdkit/include/bsp/esp-bsp.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_c3_lcdkit/priv_include/bsp_err_check.h b/esp32_c3_lcdkit/priv_include/bsp_err_check.h index 5c0f7dae..50e9998e 100644 --- a/esp32_c3_lcdkit/priv_include/bsp_err_check.h +++ b/esp32_c3_lcdkit/priv_include/bsp_err_check.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_lyrat/esp32_lyrat.c b/esp32_lyrat/esp32_lyrat.c index 569c9c03..b8fda53b 100644 --- a/esp32_lyrat/esp32_lyrat.c +++ b/esp32_lyrat/esp32_lyrat.c @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #include "driver/gpio.h" diff --git a/esp32_lyrat/esp32_lyrat_idf4.c b/esp32_lyrat/esp32_lyrat_idf4.c index 8dfc1b8f..bcaf0809 100644 --- a/esp32_lyrat/esp32_lyrat_idf4.c +++ b/esp32_lyrat/esp32_lyrat_idf4.c @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #include "esp_err.h" diff --git a/esp32_lyrat/esp32_lyrat_idf5.c b/esp32_lyrat/esp32_lyrat_idf5.c index a2bd2a29..d433fef1 100644 --- a/esp32_lyrat/esp32_lyrat_idf5.c +++ b/esp32_lyrat/esp32_lyrat_idf5.c @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #include "esp_err.h" diff --git a/esp32_lyrat/include/bsp/esp-bsp.h b/esp32_lyrat/include/bsp/esp-bsp.h index 182195a4..6b12fbf8 100644 --- a/esp32_lyrat/include/bsp/esp-bsp.h +++ b/esp32_lyrat/include/bsp/esp-bsp.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_lyrat/include/bsp/esp32_lyrat.h b/esp32_lyrat/include/bsp/esp32_lyrat.h index c5e94e9f..e33dd013 100644 --- a/esp32_lyrat/include/bsp/esp32_lyrat.h +++ b/esp32_lyrat/include/bsp/esp32_lyrat.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_lyrat/priv_include/bsp_err_check.h b/esp32_lyrat/priv_include/bsp_err_check.h index 5c0f7dae..50e9998e 100644 --- a/esp32_lyrat/priv_include/bsp_err_check.h +++ b/esp32_lyrat/priv_include/bsp_err_check.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_s2_kaluga_kit/include/bsp/display.h b/esp32_s2_kaluga_kit/include/bsp/display.h index 50bad81a..d186976b 100644 --- a/esp32_s2_kaluga_kit/include/bsp/display.h +++ b/esp32_s2_kaluga_kit/include/bsp/display.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/esp32_s2_kaluga_kit/include/bsp/esp-bsp.h b/esp32_s2_kaluga_kit/include/bsp/esp-bsp.h index c1415340..f3f50d2a 100644 --- a/esp32_s2_kaluga_kit/include/bsp/esp-bsp.h +++ b/esp32_s2_kaluga_kit/include/bsp/esp-bsp.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_s2_kaluga_kit/priv_include/bsp_err_check.h b/esp32_s2_kaluga_kit/priv_include/bsp_err_check.h index b8c50a95..b2398acb 100644 --- a/esp32_s2_kaluga_kit/priv_include/bsp_err_check.h +++ b/esp32_s2_kaluga_kit/priv_include/bsp_err_check.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_s3_eye/include/bsp/display.h b/esp32_s3_eye/include/bsp/display.h index 50bad81a..d186976b 100644 --- a/esp32_s3_eye/include/bsp/display.h +++ b/esp32_s3_eye/include/bsp/display.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/esp32_s3_eye/include/bsp/esp-bsp.h b/esp32_s3_eye/include/bsp/esp-bsp.h index 73d46fdf..ab6d3405 100644 --- a/esp32_s3_eye/include/bsp/esp-bsp.h +++ b/esp32_s3_eye/include/bsp/esp-bsp.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_s3_eye/priv_include/bsp_err_check.h b/esp32_s3_eye/priv_include/bsp_err_check.h index b8c50a95..b2398acb 100644 --- a/esp32_s3_eye/priv_include/bsp_err_check.h +++ b/esp32_s3_eye/priv_include/bsp_err_check.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_s3_korvo_2/esp32_s3_korvo_2.c b/esp32_s3_korvo_2/esp32_s3_korvo_2.c index bae5b450..32e47587 100644 --- a/esp32_s3_korvo_2/esp32_s3_korvo_2.c +++ b/esp32_s3_korvo_2/esp32_s3_korvo_2.c @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #include "driver/gpio.h" diff --git a/esp32_s3_korvo_2/include/bsp/display.h b/esp32_s3_korvo_2/include/bsp/display.h index 0c46f21e..73a7e18c 100644 --- a/esp32_s3_korvo_2/include/bsp/display.h +++ b/esp32_s3_korvo_2/include/bsp/display.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/esp32_s3_korvo_2/include/bsp/esp-bsp.h b/esp32_s3_korvo_2/include/bsp/esp-bsp.h index 2bbf1092..3834ff42 100644 --- a/esp32_s3_korvo_2/include/bsp/esp-bsp.h +++ b/esp32_s3_korvo_2/include/bsp/esp-bsp.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_s3_korvo_2/include/bsp/esp32_s3_korvo_2.h b/esp32_s3_korvo_2/include/bsp/esp32_s3_korvo_2.h index fcb0dc47..cb29e99f 100644 --- a/esp32_s3_korvo_2/include/bsp/esp32_s3_korvo_2.h +++ b/esp32_s3_korvo_2/include/bsp/esp32_s3_korvo_2.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_s3_korvo_2/include/bsp/touch.h b/esp32_s3_korvo_2/include/bsp/touch.h index 0229286d..3c9857ce 100644 --- a/esp32_s3_korvo_2/include/bsp/touch.h +++ b/esp32_s3_korvo_2/include/bsp/touch.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/esp32_s3_korvo_2/priv_include/bsp_err_check.h b/esp32_s3_korvo_2/priv_include/bsp_err_check.h index b8c50a95..b2398acb 100644 --- a/esp32_s3_korvo_2/priv_include/bsp_err_check.h +++ b/esp32_s3_korvo_2/priv_include/bsp_err_check.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_s3_lcd_ev_board/esp32_s3_lcd_ev_board.c b/esp32_s3_lcd_ev_board/esp32_s3_lcd_ev_board.c index deebfc33..697860d3 100644 --- a/esp32_s3_lcd_ev_board/esp32_s3_lcd_ev_board.c +++ b/esp32_s3_lcd_ev_board/esp32_s3_lcd_ev_board.c @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #include "driver/i2c.h" diff --git a/esp32_s3_lcd_ev_board/include/bsp/esp-bsp.h b/esp32_s3_lcd_ev_board/include/bsp/esp-bsp.h index ec16bc9e..a1a433e1 100644 --- a/esp32_s3_lcd_ev_board/include/bsp/esp-bsp.h +++ b/esp32_s3_lcd_ev_board/include/bsp/esp-bsp.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_s3_lcd_ev_board/include/bsp/esp32_s3_lcd_ev_board.h b/esp32_s3_lcd_ev_board/include/bsp/esp32_s3_lcd_ev_board.h index 60ee4a12..54903a93 100644 --- a/esp32_s3_lcd_ev_board/include/bsp/esp32_s3_lcd_ev_board.h +++ b/esp32_s3_lcd_ev_board/include/bsp/esp32_s3_lcd_ev_board.h @@ -1,7 +1,7 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** @@ -223,19 +223,19 @@ esp_err_t bsp_audio_poweramp_enable(const bool enable); * * ESP32-S3-LCD-EV-BOARD supports three different LCD sub-boards with different resolution and interface: * - * ┌─────────────┬────────────────────┬───────────────────────────┬───────────────────────────┬─────────────────┬─────────┐ - * | │ Screen Size (inch) │ Resolution (width*height) │ LCD Driver IC (Interface) │ Touch Driver IC │ Support | - * ├─────────────┼────────────────────┼───────────────────────────┼───────────────────────────┼─────────────────┼─────────┤ - * | │ 0.9 │ 128 * 64 │ SSD1315 (I2C) │ None │ Not yet │ - * | Sub board 1 ├────────────────────┼───────────────────────────┼───────────────────────────┼─────────────────┼─────────┤ - * | │ 2.4 │ 320 * 240 │ ST7789V (SPI) │ XTP2046 │ Not yet │ - * ├─────────────┼────────────────────┼───────────────────────────┼───────────────────────────┼─────────────────┼─────────┤ - * | │ 3.5 │ 480 * 320 │ ST7796S (8080) │ GT911 │ Not yet │ - * | Sub board 2 ├────────────────────┼───────────────────────────┼───────────────────────────┼─────────────────┼─────────┤ - * | │ 3.95 │ 480 * 480 │ GC9503CV (RGB) │ FT5x06 │ Yes │ - * ├─────────────┼────────────────────┼───────────────────────────┼───────────────────────────┼─────────────────┼─────────┤ - * | Sub board 3 │ 4.3 │ 800 * 480 │ Unkonw (RGB) │ GT1151 │ Yes │ - * └─────────────┴────────────────────┴───────────────────────────┴───────────────────────────┴─────────────────┴─────────┘ + * |-------------|--------------------|---------------------------|---------------------------|-----------------|---------| + * | | Screen Size (inch) | Resolution (width*height) | LCD Driver IC (Interface) | Touch Driver IC | Support | + * |-------------|--------------------|---------------------------|---------------------------|-----------------|---------| + * | | 0.9 | 128 * 64 | SSD1315 (I2C) | None | Not yet | + * | Sub board 1 |--------------------|---------------------------|---------------------------|-----------------|---------| + * | | 2.4 | 320 * 240 | ST7789V (SPI) | XTP2046 | Not yet | + * |-------------|--------------------|---------------------------|---------------------------|-----------------|---------| + * | | 3.5 | 480 * 320 | ST7796S (8080) | GT911 | Not yet | + * | Sub board 2 |--------------------|---------------------------|---------------------------|-----------------|---------| + * | | 3.95 | 480 * 480 | GC9503CV (RGB) | FT5x06 | Yes | + * |-------------|--------------------|---------------------------|---------------------------|-----------------|---------| + * | Sub board 3 | 4.3 | 800 * 480 | Unkonw (RGB) | GT1151 | Yes | + * |-------------|--------------------|---------------------------|---------------------------|-----------------|---------| * * LVGL is used as graphics library. LVGL is NOT thread safe, therefore the user must take LVGL mutex * by calling `bsp_display_lock()` before calling any LVGL API (lv_...) and then give the mutex with diff --git a/esp32_s3_lcd_ev_board/priv_include/bsp_err_check.h b/esp32_s3_lcd_ev_board/priv_include/bsp_err_check.h index 181d72de..74def3d9 100644 --- a/esp32_s3_lcd_ev_board/priv_include/bsp_err_check.h +++ b/esp32_s3_lcd_ev_board/priv_include/bsp_err_check.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_s3_lcd_ev_board/priv_include/bsp_sub_board.h b/esp32_s3_lcd_ev_board/priv_include/bsp_sub_board.h index 59978b03..dd707f40 100644 --- a/esp32_s3_lcd_ev_board/priv_include/bsp_sub_board.h +++ b/esp32_s3_lcd_ev_board/priv_include/bsp_sub_board.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_s3_lcd_ev_board/sub_board/sub_board_480x480.c b/esp32_s3_lcd_ev_board/sub_board/sub_board_480x480.c index 777ee639..18d391c3 100644 --- a/esp32_s3_lcd_ev_board/sub_board/sub_board_480x480.c +++ b/esp32_s3_lcd_ev_board/sub_board/sub_board_480x480.c @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #include "freertos/FreeRTOS.h" diff --git a/esp32_s3_lcd_ev_board/sub_board/sub_board_800x480.c b/esp32_s3_lcd_ev_board/sub_board/sub_board_800x480.c index 6c941550..64051196 100644 --- a/esp32_s3_lcd_ev_board/sub_board/sub_board_800x480.c +++ b/esp32_s3_lcd_ev_board/sub_board/sub_board_800x480.c @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #include "freertos/FreeRTOS.h" diff --git a/esp32_s3_usb_otg/include/bsp/display.h b/esp32_s3_usb_otg/include/bsp/display.h index fe714b3b..c4a44b70 100644 --- a/esp32_s3_usb_otg/include/bsp/display.h +++ b/esp32_s3_usb_otg/include/bsp/display.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/esp32_s3_usb_otg/include/bsp/esp-bsp.h b/esp32_s3_usb_otg/include/bsp/esp-bsp.h index 7a658099..25fa38dd 100644 --- a/esp32_s3_usb_otg/include/bsp/esp-bsp.h +++ b/esp32_s3_usb_otg/include/bsp/esp-bsp.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp32_s3_usb_otg/priv_include/bsp_err_check.h b/esp32_s3_usb_otg/priv_include/bsp_err_check.h index b8c50a95..b2398acb 100644 --- a/esp32_s3_usb_otg/priv_include/bsp_err_check.h +++ b/esp32_s3_usb_otg/priv_include/bsp_err_check.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp_wrover_kit/esp_wrover_kit.c b/esp_wrover_kit/esp_wrover_kit.c index ad4d5f29..7387ea3d 100644 --- a/esp_wrover_kit/esp_wrover_kit.c +++ b/esp_wrover_kit/esp_wrover_kit.c @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #include diff --git a/esp_wrover_kit/include/bsp/display.h b/esp_wrover_kit/include/bsp/display.h index 96429095..bfe25dac 100644 --- a/esp_wrover_kit/include/bsp/display.h +++ b/esp_wrover_kit/include/bsp/display.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/esp_wrover_kit/include/bsp/esp-bsp.h b/esp_wrover_kit/include/bsp/esp-bsp.h index 65b1a964..fb97a640 100644 --- a/esp_wrover_kit/include/bsp/esp-bsp.h +++ b/esp_wrover_kit/include/bsp/esp-bsp.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/esp_wrover_kit/include/bsp/esp_wrover_kit.h b/esp_wrover_kit/include/bsp/esp_wrover_kit.h index c6bbfa00..4bba20a0 100644 --- a/esp_wrover_kit/include/bsp/esp_wrover_kit.h +++ b/esp_wrover_kit/include/bsp/esp_wrover_kit.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier: Apache-2.0 */ /** diff --git a/esp_wrover_kit/priv_include/bsp_err_check.h b/esp_wrover_kit/priv_include/bsp_err_check.h index b8c50a95..d45d3287 100644 --- a/esp_wrover_kit/priv_include/bsp_err_check.h +++ b/esp_wrover_kit/priv_include/bsp_err_check.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: CC0-1.0 + * SPDX-License-Identifier:Apache-2.0 */ #pragma once diff --git a/examples/bsp_ext.py b/examples/bsp_ext.py index 27a07794..f755a8cb 100644 --- a/examples/bsp_ext.py +++ b/examples/bsp_ext.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: Apache-2.0 import os from re import match, compile from pathlib import Path diff --git a/examples/display/main/esp_logo.c b/examples/display/main/esp_logo.c index af18a63a..a0c747f0 100644 --- a/examples/display/main/esp_logo.c +++ b/examples/display/main/esp_logo.c @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: CC0-1.0 + */ #include "lvgl.h" diff --git a/examples/display/main/esp_text.c b/examples/display/main/esp_text.c index 7f16ffc0..a76a49e3 100644 --- a/examples/display/main/esp_text.c +++ b/examples/display/main/esp_text.c @@ -1,3 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: CC0-1.0 + */ #include "lvgl.h" #ifndef LV_ATTRIBUTE_MEM_ALIGN diff --git a/examples/mqtt_example/main/mqtt_example_main.c b/examples/mqtt_example/main/mqtt_example_main.c index cf6a5335..f2df7675 100644 --- a/examples/mqtt_example/main/mqtt_example_main.c +++ b/examples/mqtt_example/main/mqtt_example_main.c @@ -1,16 +1,8 @@ -// Copyright 2015-2021 Espressif Systems (Shanghai) CO LTD -// -// 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. +/* + * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: CC0-1.0 + */ #include #include diff --git a/examples/mqtt_example/main/wifi.c b/examples/mqtt_example/main/wifi.c index 9614190c..95523710 100644 --- a/examples/mqtt_example/main/wifi.c +++ b/examples/mqtt_example/main/wifi.c @@ -1,11 +1,9 @@ -/* WiFi station Example +/* + * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: CC0-1.0 + */ - This example code is in the Public Domain (or CC0 licensed, at your option.) - - Unless required by applicable law or agreed to in writing, this - software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. -*/ #include #include "freertos/FreeRTOS.h" #include "freertos/task.h" diff --git a/examples/sensors_example/main/sensors_example.c b/examples/sensors_example/main/sensors_example.c index 4520de60..0312355d 100644 --- a/examples/sensors_example/main/sensors_example.c +++ b/examples/sensors_example/main/sensors_example.c @@ -1,16 +1,8 @@ -// Copyright 2015-2021 Espressif Systems (Shanghai) CO LTD -// -// 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. +/* + * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: CC0-1.0 + */ #include #include "hts221.h"