1. Add more detail info to make the purpose and process of the test cases more clear which include test goal, test step, input, judging criteria, constraints, etc., and these can be seen in our Zephyr documentations. 2. Add some negative test code. Signed-off-by: YouhuaX Zhu <youhuax.zhu@intel.com>
28 lines
569 B
C
28 lines
569 B
C
/*
|
|
* Copyright (c) 2020 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef __TEST_DUMMY_SENSOR_H__
|
|
#define __TEST_DUMMY_SENSOR_H__
|
|
|
|
#include <zephyr.h>
|
|
#include <device.h>
|
|
#include <drivers/sensor.h>
|
|
#define DUMMY_SENSOR_NAME "dummy_sensor"
|
|
#define DUMMY_SENSOR_NAME_NO_TRIG "dummy_sensor_no_trig"
|
|
#define SENSOR_CHANNEL_NUM 5
|
|
|
|
struct dummy_sensor_data {
|
|
sensor_trigger_handler_t handler;
|
|
struct sensor_value val[SENSOR_CHANNEL_NUM];
|
|
};
|
|
|
|
struct dummy_sensor_config {
|
|
char *i2c_name;
|
|
uint8_t i2c_address;
|
|
};
|
|
|
|
#endif //__TEST_DUMMY_SENSOR_H__
|