Skip to content

Commit bd59067

Browse files
committed
feat: update with arduino-esp32 v3.0.0-alpha3 (idf v5.1.1)
1 parent 2622eec commit bd59067

File tree

281 files changed

+25068
-8623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

281 files changed

+25068
-8623
lines changed

.flake8

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
[flake8]
2+
3+
select =
4+
# Full lists are given in order to suppress all errors from other plugins
5+
# Full list of pyflakes error codes:
6+
F401, # module imported but unused
7+
F402, # import module from line N shadowed by loop variable
8+
F403, # 'from module import *' used; unable to detect undefined names
9+
F404, # future import(s) name after other statements
10+
F405, # name may be undefined, or defined from star imports: module
11+
F406, # 'from module import *' only allowed at module level
12+
F407, # an undefined __future__ feature name was imported
13+
F601, # dictionary key name repeated with different values
14+
F602, # dictionary key variable name repeated with different values
15+
F621, # too many expressions in an assignment with star-unpacking
16+
F622, # two or more starred expressions in an assignment (a, *b, *c = d)
17+
F631, # assertion test is a tuple, which are always True
18+
F701, # a break statement outside of a while or for loop
19+
F702, # a continue statement outside of a while or for loop
20+
F703, # a continue statement in a finally block in a loop
21+
F704, # a yield or yield from statement outside of a function
22+
F705, # a return statement with arguments inside a generator
23+
F706, # a return statement outside of a function/method
24+
F707, # an except: block as not the last exception handler
25+
F721, F722, # doctest syntax error syntax error in forward type annotation
26+
F811, # redefinition of unused name from line N
27+
F812, # list comprehension redefines name from line N
28+
F821, # undefined name name
29+
F822, # undefined name name in __all__
30+
F823, # local variable name referenced before assignment
31+
F831, # duplicate argument name in function definition
32+
F841, # local variable name is assigned to but never used
33+
F901, # raise NotImplemented should be raise NotImplementedError
34+
35+
# Full list of pycodestyle violations:
36+
E101, # indentation contains mixed spaces and tabs
37+
E111, # indentation is not a multiple of four
38+
E112, # expected an indented block
39+
E113, # unexpected indentation
40+
E114, # indentation is not a multiple of four (comment)
41+
E115, # expected an indented block (comment)
42+
E116, # unexpected indentation (comment)
43+
E121, # continuation line under-indented for hanging indent
44+
E122, # continuation line missing indentation or outdented
45+
E123, # closing bracket does not match indentation of opening bracket's line
46+
E124, # closing bracket does not match visual indentation
47+
E125, # continuation line with same indent as next logical line
48+
E126, # continuation line over-indented for hanging indent
49+
E127, # continuation line over-indented for visual indent
50+
E128, # continuation line under-indented for visual indent
51+
E129, # visually indented line with same indent as next logical line
52+
E131, # continuation line unaligned for hanging indent
53+
E133, # closing bracket is missing indentation
54+
E201, # whitespace after '('
55+
E202, # whitespace before ')'
56+
E203, # whitespace before ':'
57+
E211, # whitespace before '('
58+
E221, # multiple spaces before operator
59+
E222, # multiple spaces after operator
60+
E223, # tab before operator
61+
E224, # tab after operator
62+
E225, # missing whitespace around operator
63+
E226, # missing whitespace around arithmetic operator
64+
E227, # missing whitespace around bitwise or shift operator
65+
E228, # missing whitespace around modulo operator
66+
E231, # missing whitespace after ',', ';', or ':'
67+
E241, # multiple spaces after ','
68+
E242, # tab after ','
69+
E251, # unexpected spaces around keyword / parameter equals
70+
E261, # at least two spaces before inline comment
71+
E262, # inline comment should start with '# '
72+
E265, # block comment should start with '# '
73+
E266, # too many leading '#' for block comment
74+
E271, # multiple spaces after keyword
75+
E272, # multiple spaces before keyword
76+
E273, # tab after keyword
77+
E274, # tab before keyword
78+
E275, # missing whitespace after keyword
79+
E301, # expected 1 blank line, found 0
80+
E302, # expected 2 blank lines, found 0
81+
E303, # too many blank lines
82+
E304, # blank lines found after function decorator
83+
E305, # expected 2 blank lines after end of function or class
84+
E306, # expected 1 blank line before a nested definition
85+
E401, # multiple imports on one line
86+
E402, # module level import not at top of file
87+
E501, # line too long (82 > 79 characters)
88+
E502, # the backslash is redundant between brackets
89+
E701, # multiple statements on one line (colon)
90+
E702, # multiple statements on one line (semicolon)
91+
E703, # statement ends with a semicolon
92+
E704, # multiple statements on one line (def)
93+
E711, # comparison to None should be 'if cond is None:'
94+
E712, # comparison to True should be 'if cond is True:' or 'if cond:'
95+
E713, # test for membership should be 'not in'
96+
E714, # test for object identity should be 'is not'
97+
E721, # do not compare types, use 'isinstance()'
98+
E722, # do not use bare except, specify exception instead
99+
E731, # do not assign a lambda expression, use a def
100+
E741, # do not use variables named 'l', 'O', or 'I'
101+
E742, # do not define classes named 'l', 'O', or 'I'
102+
E743, # do not define functions named 'l', 'O', or 'I'
103+
E901, # SyntaxError or IndentationError
104+
E902, # IOError
105+
W191, # indentation contains tabs
106+
W291, # trailing whitespace
107+
W292, # no newline at end of file
108+
W293, # blank line contains whitespace
109+
W391, # blank line at end of file
110+
W503, # line break before binary operator
111+
W504, # line break after binary operator
112+
W505, # doc line too long (82 > 79 characters)
113+
W601, # .has_key() is deprecated, use 'in'
114+
W602, # deprecated form of raising exception
115+
W603, # '<>' is deprecated, use '!='
116+
W604, # backticks are deprecated, use 'repr()'
117+
W605, # invalid escape sequence 'x'
118+
W606, # 'async' and 'await' are reserved keywords starting with Python 3.7
119+
120+
# Full list of flake8 violations
121+
E999, # failed to compile a file into an Abstract Syntax Tree for the plugins that require it
122+
123+
# Full list of mccabe violations
124+
C901 # complexity value provided by the user
125+
126+
ignore =
127+
E221, # multiple spaces before operator
128+
E231, # missing whitespace after ',', ';', or ':'
129+
E241, # multiple spaces after ','
130+
W503, # line break before binary operator
131+
W504 # line break after binary operator
132+
133+
max-line-length = 160
134+
135+
show_source = True
136+
137+
statistics = True
138+
139+
exclude =
140+
.git,
141+
__pycache__,

.github/ci/sync_conf_files.py

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
import os
5+
import sys
6+
import shutil
7+
8+
9+
exclude_dirs = ["./build"]
10+
11+
12+
def is_in_directory(file_path, directory):
13+
directory = os.path.realpath(directory)
14+
file_path = os.path.realpath(file_path)
15+
16+
return file_path.startswith(directory)
17+
18+
19+
def is_same_file(file1, file2):
20+
with open(file1, 'r') as f1, open(file2, 'r') as f2:
21+
file1_content = f1.read()
22+
file2_content = f2.read()
23+
24+
return file1_content == file2_content
25+
26+
27+
def replace_files(search_directory, file_path):
28+
if os.path.dirname(file_path) == "":
29+
file_path = os.path.join(search_directory, file_path)
30+
31+
filename = os.path.basename(file_path)
32+
src_file = os.path.join(search_directory, filename)
33+
34+
if file_path == src_file:
35+
for root, dirs, files in os.walk(search_directory):
36+
need_exclude = False
37+
for exclude_dir in exclude_dirs:
38+
if is_in_directory(root, exclude_dir):
39+
need_exclude = True
40+
break
41+
42+
if root == search_directory or need_exclude:
43+
continue
44+
45+
for file in files:
46+
if file == filename:
47+
dst_file = os.path.join(root, file)
48+
if not is_same_file(src_file, dst_file):
49+
print(f"Replacing '{dst_file}' with '{src_file}'...")
50+
shutil.copy(src_file, dst_file)
51+
else:
52+
if not is_same_file(src_file, file_path):
53+
print(f"Restoring '{file_path}' with '{src_file}'...")
54+
shutil.copy(src_file, file_path)
55+
56+
57+
if __name__ == "__main__":
58+
if len(sys.argv) >= 3:
59+
search_directory = sys.argv[1]
60+
61+
for i in range(2, len(sys.argv)):
62+
file_path = sys.argv[i]
63+
replace_files(search_directory, file_path)
64+
65+
print("Replacement completed.")

.github/workflows/build_test.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,44 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
14
exclude: 'libraries/ui/'
25
repos:
3-
- repo: https://github.com/igrr/astyle_py.git
4-
rev: master
6+
- repo: https://github.com/igrr/astyle_py.git
7+
rev: v1.0.5
58
hooks:
6-
- id: astyle_py
9+
- id: astyle_py
710
args: ['--style=otbs', '--attach-namespaces', '--attach-classes', '--indent=spaces=4', '--convert-tabs', '--align-pointer=name', '--align-reference=name', '--keep-one-line-statements', '--pad-header', '--pad-oper']
811

9-
- repo: https://github.com/pre-commit/pre-commit-hooks
12+
- repo: https://github.com/espressif/check-copyright/
13+
rev: v1.0.3
14+
hooks:
15+
- id: check-copyright
16+
args: ['--config', 'check_copyright_config.yaml']
17+
18+
- repo: https://github.com/PyCQA/flake8
19+
rev: 5.0.4
20+
hooks:
21+
- id: flake8
22+
types: [python]
23+
args: ['--config=.flake8', '--tee', '--benchmark']
24+
25+
- repo: https://github.com/pre-commit/pre-commit-hooks
1026
rev: v4.3.0
1127
hooks:
12-
- id: trailing-whitespace
13-
types_or: [c, c++]
14-
- id: end-of-file-fixer
28+
- id: trailing-whitespace
1529
types_or: [c, c++]
16-
- id: check-merge-conflict
17-
- id: mixed-line-ending
30+
- id: end-of-file-fixer
1831
types_or: [c, c++]
32+
- id: check-merge-conflict
33+
- id: mixed-line-ending
34+
types_or: [c, c++, text]
1935
args: ['--fix=lf']
2036
description: Forces to replace line ending by the UNIX 'lf' character
2137

22-
- repo: https://github.com/espressif/check-copyright/
23-
rev: v1.0.3
24-
hooks:
25-
- id: check-copyright
26-
args: ['--config', 'check_copyright_config.yaml']
38+
- repo: local
39+
hooks:
40+
- id: sync-conf-files
41+
name: Update when configuration files change
42+
entry: python .github/ci/sync_conf_files.py ./
43+
language: system
44+
files: '.*ESP_Panel_(Board_Custom|Board_Supported|Conf)\.h'

CHANGELOG.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
# ChangeLog
22

3-
## v0.0.1 - 2023-09-20
3+
## v0.1.0 - 2024-03-07
4+
5+
### Breaking changes:
6+
7+
* Restructure the driver framework based on **arduino-esp32 v3** version and is not compatible with the v2 version
8+
* Add and modify some APIs for `bus`, `LCD` and `touch` object classes
9+
* Temporarily remove `Kconfig` and `test_apps`, which are used for ESP-IDF. Remove action `build_test`.
10+
* Support using independent drivers instead of the entire `ESP_Panel`. In this case, users don't need to enter the *ESP32_Display_Panel* folder and copy `ESP_Panel_Conf_Template.h`.
411

512
### Enhancements:
613

7-
* Supports various Espressif official development boards
8-
* Supports custom boards
9-
* Supports multiple types of drivers, including **Bus**, **LCD**, **Touch**, **Backlight**
14+
* Add new bus type: `QSPI`
15+
* Add new LCD controllers: `GC9B71`, `NV3022B`, `ST7701`, `ST7789V`, `ST77916`, `ST77922`
16+
* Add new touch controllers: `ST7123`
17+
* Add new supported boards: `ESP32-4848S040C_I_Y_3`
18+
* Add `LCD` and `Touch` examples for using standalone drivers
19+
* `LCD` supports to reconfigure the vendor specific initialization sequence
20+
* `Touch` supports to use ISR pin for interruption
21+
* `LVLG` examples support **RGB LCD avoid tearing** function
22+
* Update all README.md files and add FAQ section
1023

1124
## v0.0.2 - 2023-11-09
1225

@@ -15,3 +28,11 @@
1528
* Move extra boards configuration into panel
1629
* Update all README.md files
1730
* Add Squareline porting examples
31+
32+
## v0.0.1 - 2023-09-20
33+
34+
### Enhancements:
35+
36+
* Supports various Espressif official development boards
37+
* Supports custom boards
38+
* Supports multiple types of drivers, including **Bus**, **LCD**, **Touch**, **Backlight**

0 commit comments

Comments
 (0)