1. Create a dummy sensor driver and implement the sensor interfaces:
.sample_fetch = &dummy_sensor_sample_fetch,
.channel_get = &dummy_sensor_channel_get,
.attr_set = dummy_sensor_attr_set,
.trigger_set = dummy_sensor_trigger_set.
2. Create below two test cases to verify the sensor subsys APIs:
test_sensor_get_channels() for verifying sensor channel APIs,
test_sensor_handle_triggers for verifying sensor trigger APIs.
Signed-off-by: YouhuaX Zhu <youhuax.zhu@intel.com>
9 lines
223 B
CMake
9 lines
223 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
cmake_minimum_required(VERSION 3.13.1)
|
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
|
project(device)
|
|
|
|
FILE(GLOB app_sources src/*.c)
|
|
target_sources(app PRIVATE ${app_sources})
|