diff --git a/connectivity/CMakeLists.txt b/connectivity/CMakeLists.txt index b8673be172..ed6c4cbde9 100644 --- a/connectivity/CMakeLists.txt +++ b/connectivity/CMakeLists.txt @@ -6,18 +6,16 @@ add_library(mbed-802.15.4-rf INTERFACE) add_library(mbed-ble INTERFACE) add_library(mbed-ble-cordio INTERFACE) add_library(mbed-ble-cordio_ll INTERFACE) -add_library(mbed-lorawan INTERFACE) -add_library(mbed-mbedtls STATIC EXCLUDE_FROM_ALL) add_library(mbed-nfc INTERFACE) add_subdirectory(nanostack) add_subdirectory(cellular) +add_subdirectory(mbedtls) add_subdirectory(drivers) add_subdirectory(FEATURE_BLE) add_subdirectory(libraries) add_subdirectory(lorawan) add_subdirectory(lwipstack) -add_subdirectory(mbedtls) add_subdirectory(netsocket) add_subdirectory(nfc) \ No newline at end of file diff --git a/connectivity/drivers/lora/COMPONENT_SX126X/CMakeLists.txt b/connectivity/drivers/lora/COMPONENT_SX126X/CMakeLists.txt index f9ae4c4817..73b512f6f2 100644 --- a/connectivity/drivers/lora/COMPONENT_SX126X/CMakeLists.txt +++ b/connectivity/drivers/lora/COMPONENT_SX126X/CMakeLists.txt @@ -2,11 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 target_include_directories(mbed-lorawan - INTERFACE + PUBLIC . ) target_sources(mbed-lorawan - INTERFACE + PRIVATE SX126X_LoRaRadio.cpp ) diff --git a/connectivity/drivers/lora/COMPONENT_SX1272/CMakeLists.txt b/connectivity/drivers/lora/COMPONENT_SX1272/CMakeLists.txt index 72919db2d7..6c847cf83c 100644 --- a/connectivity/drivers/lora/COMPONENT_SX1272/CMakeLists.txt +++ b/connectivity/drivers/lora/COMPONENT_SX1272/CMakeLists.txt @@ -2,12 +2,12 @@ # SPDX-License-Identifier: Apache-2.0 target_include_directories(mbed-lorawan - INTERFACE + PUBLIC . ./registers ) target_sources(mbed-lorawan - INTERFACE + PRIVATE SX1272_LoRaRadio.cpp ) diff --git a/connectivity/drivers/lora/COMPONENT_SX1276/CMakeLists.txt b/connectivity/drivers/lora/COMPONENT_SX1276/CMakeLists.txt index b84d8fa92a..cca2533ca0 100644 --- a/connectivity/drivers/lora/COMPONENT_SX1276/CMakeLists.txt +++ b/connectivity/drivers/lora/COMPONENT_SX1276/CMakeLists.txt @@ -2,12 +2,12 @@ # SPDX-License-Identifier: Apache-2.0 target_include_directories(mbed-lorawan - INTERFACE + PUBLIC . ./registers ) target_sources(mbed-lorawan - INTERFACE + PRIVATE SX1276_LoRaRadio.cpp ) diff --git a/connectivity/drivers/lora/TARGET_STM32WL/CMakeLists.txt b/connectivity/drivers/lora/TARGET_STM32WL/CMakeLists.txt index e8b564563f..02cc71cb8a 100644 --- a/connectivity/drivers/lora/TARGET_STM32WL/CMakeLists.txt +++ b/connectivity/drivers/lora/TARGET_STM32WL/CMakeLists.txt @@ -2,12 +2,12 @@ # SPDX-License-Identifier: Apache-2.0 target_include_directories(mbed-lorawan - INTERFACE + PUBLIC . ) target_sources(mbed-lorawan - INTERFACE + PRIVATE STM32WL_LoRaRadio.cpp STM32WL_radio_driver.cpp ) diff --git a/connectivity/lorawan/CMakeLists.txt b/connectivity/lorawan/CMakeLists.txt index 9e5a5dcb12..901e1e212d 100644 --- a/connectivity/lorawan/CMakeLists.txt +++ b/connectivity/lorawan/CMakeLists.txt @@ -9,11 +9,13 @@ if(MBED_OS_ENABLE_TESTS) endif() endif() +add_library(mbed-lorawan STATIC EXCLUDE_FROM_ALL) + add_subdirectory(lorastack) add_subdirectory(system) target_include_directories(mbed-lorawan - INTERFACE + PUBLIC .. . ./include @@ -21,18 +23,18 @@ target_include_directories(mbed-lorawan ) target_sources(mbed-lorawan - INTERFACE + PRIVATE source/LoRaWANInterface.cpp source/LoRaWANStack.cpp ) target_compile_definitions(mbed-lorawan - INTERFACE + PUBLIC MBED_CONF_LORAWAN_PRESENT=1 ) target_link_libraries(mbed-lorawan - INTERFACE + PUBLIC mbed-events mbed-mbedtls ) diff --git a/connectivity/lorawan/lorastack/CMakeLists.txt b/connectivity/lorawan/lorastack/CMakeLists.txt index bcd87adcab..3b04cd1abf 100644 --- a/connectivity/lorawan/lorastack/CMakeLists.txt +++ b/connectivity/lorawan/lorastack/CMakeLists.txt @@ -2,14 +2,14 @@ # SPDX-License-Identifier: Apache-2.0 target_include_directories(mbed-lorawan - INTERFACE + PUBLIC . ./mac ./phy ) target_sources(mbed-lorawan - INTERFACE + PRIVATE mac/LoRaMac.cpp mac/LoRaMacChannelPlan.cpp mac/LoRaMacCommand.cpp diff --git a/connectivity/lorawan/source/LoRaWANStack.cpp b/connectivity/lorawan/source/LoRaWANStack.cpp index 22d4545473..a5162b9e05 100644 --- a/connectivity/lorawan/source/LoRaWANStack.cpp +++ b/connectivity/lorawan/source/LoRaWANStack.cpp @@ -49,6 +49,7 @@ SPDX-License-Identifier: BSD-3-Clause using namespace mbed; using namespace events; +using namespace std::chrono_literals; /** * Bit mask for message flags @@ -740,7 +741,7 @@ void LoRaWANStack::process_reception_timeout(bool is_timeout) if (slot == RX_SLOT_WIN_2 && !_loramac.nwk_joined()) { const int ret = _queue->call_in( - 500, this, &LoRaWANStack::state_controller, DEVICE_STATE_JOINING); + 500ms, this, &LoRaWANStack::state_controller, DEVICE_STATE_JOINING); MBED_ASSERT(ret != 0); (void)ret; return; diff --git a/connectivity/lorawan/system/CMakeLists.txt b/connectivity/lorawan/system/CMakeLists.txt index f5f687dd31..7cd481c3e9 100644 --- a/connectivity/lorawan/system/CMakeLists.txt +++ b/connectivity/lorawan/system/CMakeLists.txt @@ -2,11 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 target_sources(mbed-lorawan - INTERFACE + PRIVATE LoRaWANTimer.cpp ) target_include_directories(mbed-lorawan - INTERFACE + PUBLIC . ) diff --git a/connectivity/mbedtls/CMakeLists.txt b/connectivity/mbedtls/CMakeLists.txt index 3089a86a80..ea13ae8da1 100644 --- a/connectivity/mbedtls/CMakeLists.txt +++ b/connectivity/mbedtls/CMakeLists.txt @@ -7,6 +7,8 @@ if(MBED_OS_ENABLE_TESTS) endif() endif() +add_library(mbed-mbedtls STATIC EXCLUDE_FROM_ALL) + target_include_directories(mbed-mbedtls PUBLIC .