Initial refactors to support esp32 boards

This commit is contained in:
Lorow
2025-10-30 15:06:26 +01:00
parent 3494edc822
commit 3b66642a83
38 changed files with 2901 additions and 949 deletions

View File

@@ -1,4 +1,32 @@
idf_component_register(SRCS "SerialManager/SerialManager.cpp"
INCLUDE_DIRS "SerialManager"
REQUIRES esp_driver_uart CommandManager ProjectConfig tinyusb
set (
requires
esp_driver_uart
CommandManager
ProjectConfig
)
if ("$ENV{IDF_ETARGET}" STREQUAL "esp32s3")
list(APPEND requires
tinyusb
)
endif()
set (
source_files
"SerialManager/SerialManager.cpp"
)
if ("$ENV{IDF_ETARGET}" STREQUAL "esp32s3" OR "$ENV{IDF_ETARGET}" STREQUAL "esp32s2" )
list(APPEND source_files
"SerialManager/SerialManager_esp32s3.cpp"
)
else()
list(APPEND source_files
"SerialManager/SerialManager_esp32.cpp"
)
endif()
idf_component_register(SRCS ${source_files}
INCLUDE_DIRS "SerialManager"
REQUIRES ${requires}
)