-
Notifications
You must be signed in to change notification settings - Fork 3
/
v261_nRF52840_sidewalk_lr11xx.diff
106 lines (95 loc) · 4.49 KB
/
v261_nRF52840_sidewalk_lr11xx.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
diff -urN '--exclude=.git' '--exclude=build' '--exclude=.github' '--exclude=version.conf' sidewalk/Kconfig.dependencies sidewalk_with_lr/Kconfig.dependencies
--- sidewalk/Kconfig.dependencies 2024-05-23 13:53:14.017676539 -0700
+++ sidewalk_with_lr/Kconfig.dependencies 2024-05-23 13:52:39.704938865 -0700
@@ -172,7 +172,7 @@
config SIDEWALK_GPIO_MAX
int
- default 6 if SIDEWALK_SUBGHZ_SUPPORT
+ default 12 if SIDEWALK_SUBGHZ_SUPPORT
default 0
help
Maximum number of GPIO assigned for use with Sidewalk GPIO API
diff -urN '--exclude=.git' '--exclude=build' '--exclude=.github' '--exclude=version.conf' sidewalk/subsys/config/common/CMakeLists.txt sidewalk_with_lr/subsys/config/common/CMakeLists.txt
--- sidewalk/subsys/config/common/CMakeLists.txt 2024-05-23 13:53:14.045677140 -0700
+++ sidewalk_with_lr/subsys/config/common/CMakeLists.txt 2024-05-23 10:14:18.792084848 -0700
@@ -8,6 +8,8 @@
zephyr_library_sources_ifdef(CONFIG_SIDEWALK src/app_ble_config.c)
-zephyr_library_sources_ifdef(CONFIG_SIDEWALK_SUBGHZ_SUPPORT src/app_subGHz_config.c)
+if(NOT CONFIG_RADIO_LR11XX)
+ zephyr_library_sources_ifdef(CONFIG_SIDEWALK_SUBGHZ_SUPPORT src/app_subGHz_config.c)
+endif()
zephyr_library_sources_ifndef(CONFIG_SIDEWALK_SUBGHZ_SUPPORT src/app_subGHz_config_empty.c)
diff -urN '--exclude=.git' '--exclude=build' '--exclude=.github' '--exclude=version.conf' sidewalk/subsys/config/common/include/app_subGHz_config.h sidewalk_with_lr/subsys/config/common/include/app_subGHz_config.h
--- sidewalk/subsys/config/common/include/app_subGHz_config.h 2024-05-23 13:53:14.045677140 -0700
+++ sidewalk_with_lr/subsys/config/common/include/app_subGHz_config.h 2024-05-23 09:39:15.946953949 -0700
@@ -16,11 +16,19 @@
#ifndef APP_900_CONFIG_H
#define APP_900_CONFIG_H
+#if defined(CONFIG_RADIO_LR11XX)
+#include <lr11xx_config.h>
+#else
#include <sx126x_config.h>
+#endif
#include <sid_pal_mfg_store_ifc.h>
#include <sid_900_cfg.h>
-const radio_sx126x_device_config_t* get_radio_cfg(void);
+#if defined(CONFIG_RADIO_LR11XX)
+const radio_lr11xx_device_config_t *get_radio_cfg(void);
+#else
+const radio_sx126x_device_config_t *get_radio_cfg(void);
+#endif
const sid_pal_mfg_store_region_t* get_mfg_cfg(void);
struct sid_sub_ghz_links_config* app_get_sub_ghz_config(void);
#endif
diff -urN '--exclude=.git' '--exclude=build' '--exclude=.github' '--exclude=version.conf' sidewalk/subsys/sal/common/sid_pal_ifc/sid_pal_platform_init_types.h sidewalk_with_lr/subsys/sal/common/sid_pal_ifc/sid_pal_platform_init_types.h
--- sidewalk/subsys/sal/common/sid_pal_ifc/sid_pal_platform_init_types.h 2024-05-23 13:53:14.045677140 -0700
+++ sidewalk_with_lr/subsys/sal/common/sid_pal_ifc/sid_pal_platform_init_types.h 2024-05-23 10:23:45.460148547 -0700
@@ -17,14 +17,22 @@
#define SID_PAL_PLATFORM_INIT_TYPES_H
#if defined(CONFIG_SIDEWALK_SUBGHZ_SUPPORT)
+#if defined(CONFIG_RADIO_LR11XX)
+#include <lr11xx_config.h>
+#else
#include <sx126x_config.h>
-#endif
+#endif /* CONFIG_RADIO_LR11XX */
+#endif /* CONFIG_SIDEWALK_SUBGHZ_SUPPORT */
typedef struct {
//place holder for platform specific init parameters
#if defined(CONFIG_SIDEWALK_SUBGHZ_SUPPORT)
+#if defined(CONFIG_RADIO_LR11XX)
+ radio_lr11xx_device_config_t * radio_cfg;
+#else
radio_sx126x_device_config_t * radio_cfg;
-#endif
+#endif /* CONFIG_RADIO_LR11XX */
+#endif /* CONFIG_SIDEWALK_SUBGHZ_SUPPORT */
} platform_specific_init_parameters_t;
#endif
diff -urN '--exclude=.git' '--exclude=build' '--exclude=.github' '--exclude=version.conf' sidewalk/subsys/sal/sid_pal/src/sid_common.c sidewalk_with_lr/subsys/sal/sid_pal/src/sid_common.c
--- sidewalk/subsys/sal/sid_pal/src/sid_common.c 2024-05-23 13:53:14.049677227 -0700
+++ sidewalk_with_lr/subsys/sal/sid_pal/src/sid_common.c 2024-05-23 10:20:59.916632544 -0700
@@ -12,8 +12,12 @@
#endif /* defined(CONFIG_SOC_SERIES_NRF53X) && defined(CONFIG_SIDEWALK_SUBGHZ_SUPPORT) */
#if defined(CONFIG_SIDEWALK_SUBGHZ_SUPPORT)
+#if defined(CONFIG_RADIO_LR11XX)
+#include <lr11xx_config.h>
+#else
#include <sx126x_config.h>
-#endif
+#endif /* CONFIG_RADIO_LR11XX */
+#endif /* CONFIG_SIDEWALK_SUBGHZ_SUPPORT */
#include <zephyr/kernel.h>
#include <zephyr/storage/flash_map.h>
@@ -31,7 +35,11 @@
return SID_ERROR_INCOMPATIBLE_PARAMS;
}
#if defined(CONFIG_SIDEWALK_SUBGHZ_SUPPORT)
+#if defined(CONFIG_RADIO_LR11XX)
+ set_radio_lr11xx_device_config(platform_init_parameters->radio_cfg);
+#else
set_radio_sx126x_device_config(platform_init_parameters->radio_cfg);
+#endif
#if defined(CONFIG_SOC_SERIES_NRF53X)
(void)bt_enable(NULL);
(void)bt_disable();