From c1517d3c82110c1c2a9cf4e7703f32b3e238255a Mon Sep 17 00:00:00 2001 From: niki aigner Date: Tue, 20 Sep 2022 18:56:29 +0200 Subject: [PATCH 1/2] fix compilation issues --- CMakeLists.txt | 3 +++ src/ttn_provisioning.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 504ba88..0f8f82a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,9 @@ set(COMPONENT_ADD_INCLUDEDIRS set(COMPONENT_REQUIRES nvs_flash mbedtls + driver + esp_event + esp_timer ) register_component() diff --git a/src/ttn_provisioning.c b/src/ttn_provisioning.c index a851ec4..16f5606 100644 --- a/src/ttn_provisioning.c +++ b/src/ttn_provisioning.c @@ -15,6 +15,7 @@ #include "esp_event.h" #include "esp_log.h" #include "esp_system.h" +#include "esp_mac.h" #include "freertos/FreeRTOS.h" #include "hal/hal_esp32.h" #include "lmic/lmic.h" @@ -605,4 +606,4 @@ bool is_all_zeros(const uint8_t *buf, int len) if (buf[i] != 0) return false; return true; -} \ No newline at end of file +} From 1b7279518b6927a64a9f2763442776fe9742c7c1 Mon Sep 17 00:00:00 2001 From: Manuel Bleichenbacher Date: Wed, 21 Sep 2022 20:29:52 +0200 Subject: [PATCH 2/2] Add backward compatibility with v4.x --- src/ttn_provisioning.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ttn_provisioning.c b/src/ttn_provisioning.c index 16f5606..80cf7b9 100644 --- a/src/ttn_provisioning.c +++ b/src/ttn_provisioning.c @@ -15,7 +15,9 @@ #include "esp_event.h" #include "esp_log.h" #include "esp_system.h" +#if ESP_IDF_VERSION_MAJOR >= 5 #include "esp_mac.h" +#endif #include "freertos/FreeRTOS.h" #include "hal/hal_esp32.h" #include "lmic/lmic.h"