samples: subsys: lorawan: class_a: add clock sync option
Add an option to build the sample with application-layer clock sync service running in the background. This will also add a build-check for the clock sync service in CI. Signed-off-by: Martin Jäger <martin@libre.solar>
This commit is contained in:
parent
5b4920c81b
commit
5dd50f9232
4 changed files with 28 additions and 0 deletions
|
@ -24,3 +24,19 @@ The following commands build and flash the sample.
|
||||||
:board: nucleo_wl55jc
|
:board: nucleo_wl55jc
|
||||||
:goals: build flash
|
:goals: build flash
|
||||||
:compact:
|
:compact:
|
||||||
|
|
||||||
|
Extended Configuration
|
||||||
|
**********************
|
||||||
|
|
||||||
|
This sample can be configured to run the application-layer clock
|
||||||
|
synchronization service in the background.
|
||||||
|
|
||||||
|
The following commands build and flash the sample with clock synchronization
|
||||||
|
enabled.
|
||||||
|
|
||||||
|
.. zephyr-app-commands::
|
||||||
|
:zephyr-app: samples/subsys/lorawan/class_a
|
||||||
|
:board: nucleo_wl55jc
|
||||||
|
:goals: build flash
|
||||||
|
:gen-args: -DOVERLAY_CONFIG=overlay-clock-sync.conf
|
||||||
|
:compact:
|
||||||
|
|
3
samples/subsys/lorawan/class_a/overlay-clock-sync.conf
Normal file
3
samples/subsys/lorawan/class_a/overlay-clock-sync.conf
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
CONFIG_LORAWAN_SERVICES=y
|
||||||
|
CONFIG_LORAWAN_SERVICES_LOG_LEVEL_DBG=y
|
||||||
|
CONFIG_LORAWAN_APP_CLOCK_SYNC=y
|
|
@ -44,3 +44,8 @@ tests:
|
||||||
extra_configs:
|
extra_configs:
|
||||||
- CONFIG_LORAMAC_REGION_EU868=y
|
- CONFIG_LORAMAC_REGION_EU868=y
|
||||||
- CONFIG_LORAMAC_REGION_US915=y
|
- CONFIG_LORAMAC_REGION_US915=y
|
||||||
|
sample.lorawan.class_a.clock_sync:
|
||||||
|
extra_args: OVERLAY_CONFIG="overlay-clock-sync.conf"
|
||||||
|
filter: CONFIG_ENTROPY_HAS_DRIVER
|
||||||
|
integration_platforms:
|
||||||
|
- nucleo_wl55jc
|
||||||
|
|
|
@ -98,6 +98,10 @@ void main(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_LORAWAN_APP_CLOCK_SYNC
|
||||||
|
lorawan_clock_sync_run();
|
||||||
|
#endif
|
||||||
|
|
||||||
LOG_INF("Sending data...");
|
LOG_INF("Sending data...");
|
||||||
while (1) {
|
while (1) {
|
||||||
ret = lorawan_send(2, data, sizeof(data),
|
ret = lorawan_send(2, data, sizeof(data),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue