Skip to content

Commit c006947

Browse files
committed
lorawan_lbm: Add LoRa Basics Modem LoRaWAN stack
This stack is based on the lora_basics_modem external module. It provides configuration for LBM as well as a standalone "main" LBM thread that needs to be manually started. Signed-off-by: Félix Piédallu <[email protected]>
1 parent f580fb6 commit c006947

File tree

6 files changed

+473
-0
lines changed

6 files changed

+473
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2024 Semtech Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef SUBSYS_LORAWAN_LBM_LBM_MAIN_THREAD_H
8+
#define SUBSYS_LORAWAN_LBM_LBM_MAIN_THREAD_H
9+
10+
#include <zephyr/lorawan_lbm/lorawan_hal_init.h>
11+
12+
#ifdef __cplusplus
13+
extern "C" {
14+
#endif
15+
16+
/**
17+
* @brief Initializes the LoRa Basics Modem callbacks and starts its work thread.
18+
*
19+
* @param event_callback The callback that will be called each time an modem event
20+
* is raised internally
21+
*/
22+
23+
void lora_basics_modem_start_work_thread(void (*event_callback)(void));
24+
25+
#ifdef __cplusplus
26+
}
27+
#endif
28+
29+
#endif /* SUBSYS_LORAWAN_LBM_LBM_MAIN_THREAD_H */

subsys/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ add_subdirectory_ifdef(CONFIG_IMG_MANAGER dfu)
4646
add_subdirectory_ifdef(CONFIG_INPUT input)
4747
add_subdirectory_ifdef(CONFIG_JWT jwt)
4848
add_subdirectory_ifdef(CONFIG_LLEXT llext)
49+
add_subdirectory_ifdef(CONFIG_LORA_BASICS_MODEM lorawan_lbm)
4950
add_subdirectory_ifdef(CONFIG_MCTP mctp)
5051
add_subdirectory_ifdef(CONFIG_MODEM_MODULES modem)
5152
add_subdirectory_ifdef(CONFIG_NETWORKING net)

subsys/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ source "subsys/jwt/Kconfig"
2626
source "subsys/llext/Kconfig"
2727
source "subsys/logging/Kconfig"
2828
source "subsys/lorawan/Kconfig"
29+
source "subsys/lorawan_lbm/Kconfig"
2930
source "subsys/mctp/Kconfig"
3031
source "subsys/mem_mgmt/Kconfig"
3132
source "subsys/mgmt/Kconfig"

subsys/lorawan_lbm/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2024 Semtech Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
5+
if(CONFIG_LORA_BASICS_MODEM)
6+
7+
8+
if(CONFIG_LORA_BASICS_MODEM_MAIN_THREAD)
9+
zephyr_library()
10+
zephyr_library_sources(
11+
${CMAKE_CURRENT_LIST_DIR}/lbm_main_thread.c
12+
)
13+
endif()
14+
15+
endif()

0 commit comments

Comments
 (0)