From cf027dfe4d0fe82d7f5a3284d512100ecc463613 Mon Sep 17 00:00:00 2001 From: "Thiago H. Deicke" Date: Fri, 9 Sep 2022 00:12:12 -0300 Subject: [PATCH] Init function now returns the device version. Added CMakeLists.txt for ESP-IDF v4.4.2+ support. Signed-off-by: Thiago H. Deicke --- components/lora/CMakeLists.txt | 2 ++ components/lora/lora.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 components/lora/CMakeLists.txt diff --git a/components/lora/CMakeLists.txt b/components/lora/CMakeLists.txt new file mode 100644 index 0000000..55018a1 --- /dev/null +++ b/components/lora/CMakeLists.txt @@ -0,0 +1,2 @@ +idf_component_register(SRCS "lora.c" + INCLUDE_DIRS "./include") diff --git a/components/lora/lora.c b/components/lora/lora.c index 952b0ea..c9712ce 100644 --- a/components/lora/lora.c +++ b/components/lora/lora.c @@ -375,7 +375,7 @@ lora_init(void) lora_set_tx_power(17); lora_idle(); - return 1; + return version; } /**