Skip to content

Commit 6d6d932

Browse files
authored
Merge pull request #5 from Kampi/0.0.1_Dev
Release 0.0.1
2 parents 9a5be95 + d3c9d45 commit 6d6d932

27 files changed

+3590
-1566
lines changed

.astyle.cfg

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Configuration file for AStyle
2+
# Config same as in ubxlib
3+
# K&R style
4+
--style=kr
5+
# space padding around operators: a = bar((b - c) * a, d--);
6+
--pad-oper
7+
# space padding between a header (e.g. 'if', 'for', 'while'...) and the following bracket
8+
--pad-header
9+
# Pointer sticks to the name: char *pThing
10+
--align-pointer=name
11+
# Reference sticks to the name: char &thing
12+
--align-reference=name
13+
# Nice long max continuation indent, as long as the line length
14+
--max-continuation-indent=100
15+
# No minimum conditional indent, align everything wherever it occurs
16+
--min-conditional-indent=0
17+
# All conditions have braces
18+
--add-braces
19+
# Indent the case in switch statements
20+
--indent-switches
21+
# All tabs become [4] spaces
22+
--convert-tabs
23+
# Max line length
24+
--max-code-length=120
25+
# When breaking lines, leave the logical operator on the end of the line
26+
--break-after-logical
27+
# Ignore unfound excludes
28+
--ignore-exclude-errors
29+
30+
# Other config used
31+
--suffix=none
32+
--verbose
33+
--errors-to-stdout

.astylerc

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

.github/workflows/astyle.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
- name: Install AStyle
2424
run: |
25-
sudo apt-get update && apt-get install -y lbzip2 build-essential cmake pkg-config libsdl2-dev || true
25+
sudo apt-get update && sudo apt-get install -y lbzip2 build-essential cmake pkg-config libsdl2-dev || true
2626
sudo apt-get install -f -y
2727
wget https://sourceforge.net/projects/astyle/files/astyle/astyle%203.4/astyle-3.4.10.tar.bz2/download -O astyle.tar.bz2
2828
tar -xf astyle.tar.bz2
@@ -53,7 +53,7 @@ jobs:
5353
echo "$FORMATTED"
5454
echo ""
5555
echo "To fix formatting, run:"
56-
echo " astyle --options=.astylerc --recursive 'src/*' 'include/*'"
56+
echo " astyle --options=.astyle.cfg --recursive *.c,*.cpp,*.h"
5757
exit 1
5858
else
5959
echo "✅ All files are properly formatted!"

CMakeLists.txt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,8 @@ set(COMPONENT_PRIV_INCLUDEDIRS
2020

2121
set(COMPONENT_PRIV_REQUIRES freertos driver)
2222

23-
if((IDF_TARGET STREQUAL "esp32") OR (IDF_TARGET STREQUAL "esp32s2") OR (IDF_TARGET STREQUAL "esp32s3") OR (IDF_TARGET STREQUAL "esp32c2") OR (IDF_TARGET STREQUAL "esp32c3") OR (IDF_TARGET STREQUAL "esp32c6"))
23+
if((IDF_TARGET STREQUAL "esp32s3"))
2424
list(APPEND COMPONENT_PRIV_REQUIRES esp_timer)
2525
endif()
2626

27-
idf_component_register(SRCS ${COMPONENT_SRCS}
28-
INCLUDE_DIRS ${COMPONENT_ADD_INCLUDEDIRS}
29-
PRIV_INCLUDE_DIRS ${COMPONENT_PRIV_INCLUDEDIRS}
30-
PRIV_REQUIRES ${COMPONENT_PRIV_REQUIRES}
31-
)
32-
33-
target_compile_definitions(${COMPONENT_LIB} PUBLIC LEPTON_LIB_MAJOR=main)
34-
target_compile_definitions(${COMPONENT_LIB} PUBLIC LEPTON_LIB_MINOR=)
35-
target_compile_definitions(${COMPONENT_LIB} PUBLIC LEPTON_LIB_BUILD=)
27+
register_component()

Kconfig

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
menu "Lepton"
1+
menu "ESP32-Lepton"
22
menu "GPIO"
33
menu "V-Sync"
4+
config LEPTON_GPIO_USE_VSYNC
5+
bool "Use V-Sync"
6+
default n
7+
48
config LEPTON_GPIO_VSYNC_PIN
9+
depends on LEPTON_GPIO_USE_VSYNC
510
int "V-Sync pin"
611
range 0 48
7-
default 45
812

913
config LEPTON_VSYNC_PLACE_IRAM
14+
depends on LEPTON_GPIO_USE_VSYNC
1015
bool "Place the V-Sync ISR in the IRAM"
1116
default y
1217
endmenu
@@ -53,52 +58,45 @@ menu "Lepton"
5358
int "CS pin number"
5459
range -1 48
5560
default 19
61+
62+
config LEPTON_VOSPI_FRAME_BUFFERS
63+
int "Number of image buffers"
64+
range 1 8
65+
default 2
66+
help
67+
Number of image buffers.
5668
endmenu
5769

5870
menu "Capture Task"
59-
config LEPTON_TASK_CORE_AFFINITY
71+
config LEPTON_CAPTURE_TASK_CORE_AFFINITY
6072
bool "Use core affinity"
6173
default y
6274
help
6375
Enable this option if you want to use a specific core for the driver.
6476

65-
config LEPTON_TASK_CORE
66-
depends on LEPTON_TASK_CORE_AFFINITY
77+
config LEPTON_CAPTURE_TASK_CORE
78+
depends on LEPTON_CAPTURE_TASK_CORE_AFFINITY
6779
int "Core used for the capture task"
68-
range 0 1 if SOC_CPU_CORES_NUM > 2
69-
default 0
80+
range 0 1 if SOC_CPU_CORES_NUM > 1
81+
default 1
7082
help
7183
Use a specific core for the capture task.
7284

73-
config LEPTON_TASK_STACK
85+
config LEPTON_CAPTURE_TASK_STACK
7486
int "Stack size for the capture task"
75-
range 4096 16384
76-
default 8192
87+
range 2048 16384
88+
default 4096
7789
help
7890
Stack size of the capture task.
7991

80-
config LEPTON_TASK_PRIORITY
92+
config LEPTON_CAPTURE_TASK_PRIORITY
8193
int "Priority for the capture task"
8294
range 0 31
83-
default 12
95+
default 16
8496
help
8597
Capture task priority.
8698
endmenu
8799

88-
menu "Memory"
89-
config LEPTON_MEMORY_SPIRAM
90-
depends on SPIRAM
91-
bool "Use the SPI RAM for memory allocations"
92-
default y
93-
help
94-
Enable this option to use external SPI RAM for memory allocations.
95-
96-
config LEPTON_MEMORY_BUFFERS
97-
int "Number of image buffers"
98-
range 0 8
99-
default 2
100-
endmenu
101-
102100
menu "Misc"
103101
config LEPTON_MISC_ERROR_BASE
104102
hex "Lepton driver error base code definition"

0 commit comments

Comments
 (0)