To make the scanner module more understandable and more streamlined, I reworked the update mechanism of the scanner. The scanner tracks now the parameters that were used to enable it and the reason why it is running. This facilitates state logic and allows other modules to "start the scanner", altough it is already running. This is mostly a refactoring and not a functional change. Added a test to verify the behavior. Signed-off-by: Jan Müller <jan.mueller@nordicsemi.no> add to task
13 lines
276 B
C
13 lines
276 B
C
/*
|
|
* Copyright (c) 2022 Nordic Semiconductor ASA
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <zephyr/kernel.h>
|
|
|
|
#include <mocks/scan.h>
|
|
|
|
DEFINE_FAKE_VALUE_FUNC(int, bt_le_scan_set_enable, uint8_t);
|
|
DEFINE_FAKE_VALUE_FUNC(bool, bt_le_scan_active_scanner_running);
|