Convert lorawan to a STATIC library

pull/15339/head
Jamie Smith 2022-06-05 13:08:08 -07:00 committed by Jay Sridharan
parent 3cf77c2ca1
commit f47bbf82da
10 changed files with 23 additions and 20 deletions

View File

@ -6,18 +6,16 @@ add_library(mbed-802.15.4-rf INTERFACE)
add_library(mbed-ble INTERFACE) add_library(mbed-ble INTERFACE)
add_library(mbed-ble-cordio INTERFACE) add_library(mbed-ble-cordio INTERFACE)
add_library(mbed-ble-cordio_ll 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_library(mbed-nfc INTERFACE)
add_subdirectory(nanostack) add_subdirectory(nanostack)
add_subdirectory(cellular) add_subdirectory(cellular)
add_subdirectory(mbedtls)
add_subdirectory(drivers) add_subdirectory(drivers)
add_subdirectory(FEATURE_BLE) add_subdirectory(FEATURE_BLE)
add_subdirectory(libraries) add_subdirectory(libraries)
add_subdirectory(lorawan) add_subdirectory(lorawan)
add_subdirectory(lwipstack) add_subdirectory(lwipstack)
add_subdirectory(mbedtls)
add_subdirectory(netsocket) add_subdirectory(netsocket)
add_subdirectory(nfc) add_subdirectory(nfc)

View File

@ -2,11 +2,11 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
target_include_directories(mbed-lorawan target_include_directories(mbed-lorawan
INTERFACE PUBLIC
. .
) )
target_sources(mbed-lorawan target_sources(mbed-lorawan
INTERFACE PRIVATE
SX126X_LoRaRadio.cpp SX126X_LoRaRadio.cpp
) )

View File

@ -2,12 +2,12 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
target_include_directories(mbed-lorawan target_include_directories(mbed-lorawan
INTERFACE PUBLIC
. .
./registers ./registers
) )
target_sources(mbed-lorawan target_sources(mbed-lorawan
INTERFACE PRIVATE
SX1272_LoRaRadio.cpp SX1272_LoRaRadio.cpp
) )

View File

@ -2,12 +2,12 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
target_include_directories(mbed-lorawan target_include_directories(mbed-lorawan
INTERFACE PUBLIC
. .
./registers ./registers
) )
target_sources(mbed-lorawan target_sources(mbed-lorawan
INTERFACE PRIVATE
SX1276_LoRaRadio.cpp SX1276_LoRaRadio.cpp
) )

View File

@ -2,12 +2,12 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
target_include_directories(mbed-lorawan target_include_directories(mbed-lorawan
INTERFACE PUBLIC
. .
) )
target_sources(mbed-lorawan target_sources(mbed-lorawan
INTERFACE PRIVATE
STM32WL_LoRaRadio.cpp STM32WL_LoRaRadio.cpp
STM32WL_radio_driver.cpp STM32WL_radio_driver.cpp
) )

View File

@ -9,11 +9,13 @@ if(MBED_OS_ENABLE_TESTS)
endif() endif()
endif() endif()
add_library(mbed-lorawan STATIC EXCLUDE_FROM_ALL)
add_subdirectory(lorastack) add_subdirectory(lorastack)
add_subdirectory(system) add_subdirectory(system)
target_include_directories(mbed-lorawan target_include_directories(mbed-lorawan
INTERFACE PUBLIC
.. ..
. .
./include ./include
@ -21,18 +23,18 @@ target_include_directories(mbed-lorawan
) )
target_sources(mbed-lorawan target_sources(mbed-lorawan
INTERFACE PRIVATE
source/LoRaWANInterface.cpp source/LoRaWANInterface.cpp
source/LoRaWANStack.cpp source/LoRaWANStack.cpp
) )
target_compile_definitions(mbed-lorawan target_compile_definitions(mbed-lorawan
INTERFACE PUBLIC
MBED_CONF_LORAWAN_PRESENT=1 MBED_CONF_LORAWAN_PRESENT=1
) )
target_link_libraries(mbed-lorawan target_link_libraries(mbed-lorawan
INTERFACE PUBLIC
mbed-events mbed-events
mbed-mbedtls mbed-mbedtls
) )

View File

@ -2,14 +2,14 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
target_include_directories(mbed-lorawan target_include_directories(mbed-lorawan
INTERFACE PUBLIC
. .
./mac ./mac
./phy ./phy
) )
target_sources(mbed-lorawan target_sources(mbed-lorawan
INTERFACE PRIVATE
mac/LoRaMac.cpp mac/LoRaMac.cpp
mac/LoRaMacChannelPlan.cpp mac/LoRaMacChannelPlan.cpp
mac/LoRaMacCommand.cpp mac/LoRaMacCommand.cpp

View File

@ -49,6 +49,7 @@ SPDX-License-Identifier: BSD-3-Clause
using namespace mbed; using namespace mbed;
using namespace events; using namespace events;
using namespace std::chrono_literals;
/** /**
* Bit mask for message flags * 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()) { if (slot == RX_SLOT_WIN_2 && !_loramac.nwk_joined()) {
const int ret = _queue->call_in( 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); MBED_ASSERT(ret != 0);
(void)ret; (void)ret;
return; return;

View File

@ -2,11 +2,11 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
target_sources(mbed-lorawan target_sources(mbed-lorawan
INTERFACE PRIVATE
LoRaWANTimer.cpp LoRaWANTimer.cpp
) )
target_include_directories(mbed-lorawan target_include_directories(mbed-lorawan
INTERFACE PUBLIC
. .
) )

View File

@ -7,6 +7,8 @@ if(MBED_OS_ENABLE_TESTS)
endif() endif()
endif() endif()
add_library(mbed-mbedtls STATIC EXCLUDE_FROM_ALL)
target_include_directories(mbed-mbedtls target_include_directories(mbed-mbedtls
PUBLIC PUBLIC
. .