From 42b20013807a5983d8d08fe942c765e6d223eee2 Mon Sep 17 00:00:00 2001 From: Tobias Schramm Date: Thu, 4 Feb 2021 22:53:06 +0100 Subject: [PATCH] Add PineTime devkit target --- platformio.ini | 23 +++++++++++++++++++++++ src/covid.c | 4 ++++ 2 files changed, 27 insertions(+) diff --git a/platformio.ini b/platformio.ini index b32eea3..da66567 100644 --- a/platformio.ini +++ b/platformio.ini @@ -28,6 +28,29 @@ lib_deps = lib_ignore = mbedtls +[env:pinetime_dk] +platform = nordicnrf52 +board = pinetime_devkit0 +framework = zephyr +monitor_speed = 115200 +test_ignore = test_desktop +build_flags = + -Iinclude/tls_config + # For testing: -DUNITY_EXCLUDE_SETJMP_H=1 + -DEN_INCLUDE_ZEPHYR_DEPS=1 + -DEN_INIT_MBEDTLS_ENTROPY=0 + -DCOVID_MEASURE_PERFORMANCE=0 # Used to measure device performance + -DMAX_CONTACTS=10 + -DMAX_PERIOD_CONTACTS=10 + -DNO_DEPRECATED_BLE_OPTIONS=1 +lib_deps = + prathje/exposure-notification @ ^0.1 +lib_ignore = + mbedtls +platform_packages = + framework-zephyr @ file://C:\Users\Tobias\Documents\zephyr-v2.5.0-rc2 + framework-zephyr-hal-nordic @ file://C:\Users\Tobias\Documents\zephyr-hal-nordic-v2.5.0-rc2 + [env:desktop] platform = native test_ignore = test_embedded diff --git a/src/covid.c b/src/covid.c index cd9d8db..5beb889 100644 --- a/src/covid.c +++ b/src/covid.c @@ -331,7 +331,11 @@ K_TIMER_DEFINE(my_timer, my_timer_handler, NULL); static const struct bt_le_scan_param scan_param = { .type = BT_HCI_LE_SCAN_PASSIVE, +#if !defined(NO_DEPRECATED_BLE_OPTIONS) .filter_dup = BT_HCI_LE_SCAN_FILTER_DUP_DISABLE, +#else + .options = BT_LE_SCAN_OPT_FILTER_DUPLICATE, +#endif .interval = 0x0010, //Scan Interval (N * 0.625 ms), TODO: set to correct interval .window = 0x0010, //Scan Window (N * 0.625 ms), TODO: set to correct interval };