1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

examples/nimble_heart_rate_sensor: use event_timeout_ztimer

This commit is contained in:
Francisco Molina 2021-10-06 18:23:09 +02:00
parent 81c5d5dbcc
commit 39b896e933
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ BOARD ?= nrf52dk
RIOTBASE ?= $(CURDIR)/../..
# Some RIOT modules needed for this example
USEMODULE += event_timeout
USEMODULE += event_timeout_ztimer
# Include NimBLE
USEPKG += nimble

View File

@ -36,7 +36,7 @@
#define HRS_FLAGS_DEFAULT (0x01) /* 16-bit BPM value */
#define SENSOR_LOCATION (0x02) /* wrist sensor */
#define UPDATE_INTERVAL (250U * US_PER_MS)
#define UPDATE_INTERVAL (250U)
#define BPM_MIN (80U)
#define BPM_MAX (210U)
#define BPM_STEP (2)
@ -287,7 +287,7 @@ int main(void)
/* setup local event queue (for handling heart rate updates) */
event_queue_init(&_eq);
_update_evt.handler = _hr_update;
event_timeout_init(&_update_timeout_evt, &_eq, &_update_evt);
event_timeout_ztimer_init(&_update_timeout_evt, ZTIMER_MSEC, &_eq, &_update_evt);
/* verify and add our custom services */
res = ble_gatts_count_cfg(gatt_svr_svcs);