diff --git a/.gitmodules b/.gitmodules index 66e04f9..15d750e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "extlibs/libespfs"] path = extlibs/libespfs url = https://github.com/userbogd/libespfs.git +[submodule "extlibs/ttn-esp32"] + path = extlibs/ttn-esp32 + url = https://github.com/userbogd/ttn-esp32.git diff --git a/CMakeLists.txt b/CMakeLists.txt index a92a8a3..835cf9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,17 +2,26 @@ include(${CMAKE_CURRENT_LIST_DIR}/extlibs/jReadWrite/include.cmake) include(${CMAKE_CURRENT_LIST_DIR}/extlibs/libespfs/cmake/include.cmake) if(CONFIG_WEBGUIAPP_LORAWAN_ENABLE) - set(lora_SRCS "src/LoRaWAN.c") - set(lora_REQUIRES ttn-esp32) + set(lora_SRCS "lorawan/LoRaWAN.c") + set(lora_PRIV_REQUIRES + ttn-esp32 + ) + set(lora_INCLUDE_DIRS + "../ttn-esp32/include" + "../ttn-esp32/src/hal" + ) endif() + idf_component_register( SRCS ${jreadwrite_SRCS} INCLUDE_DIRS ${jreadwrite_INCLUDE_DIRS} SRCS ${lora_SRCS} - + PRIV_REQUIRES ${lora_PRIV_REQUIRES} + INCLUDE_DIRS ${lora_INCLUDE_DIRS} + SRCS ${libespfs_SRCS} INCLUDE_DIRS ${libespfs_INCLUDE_DIRS} PRIV_INCLUDE_DIRS ${libespfs_PRIV_INCLUDE_DIRS} @@ -40,6 +49,7 @@ idf_component_register( "include" "src" "extlibs/jReadWrite" + EMBED_FILES "upload_script.html" @@ -52,6 +62,7 @@ idf_component_register( esp_modem esp_https_ota app_update - REQUIRES ${lora_REQUIRES} + + ) \ No newline at end of file diff --git a/extlibs/ttn-esp32 b/extlibs/ttn-esp32 new file mode 160000 index 0000000..f1f77e2 --- /dev/null +++ b/extlibs/ttn-esp32 @@ -0,0 +1 @@ +Subproject commit f1f77e22ba0adea75fa96d8edf53e609402707cb diff --git a/src/LoRaWAN.c b/lorawan/LoRaWAN.c similarity index 100% rename from src/LoRaWAN.c rename to lorawan/LoRaWAN.c