|
Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
Generic simulated sensor. More...
#include <zephyr/device.h>#include <zephyr/drivers/sensor.h>Go to the source code of this file.
Functions | |
| void | generic_sim_reset (const struct device *dev, bool reset_rc) |
| Reset all channels back to unconfigured. | |
| void | generic_sim_func_rc (const struct device *dev, int resume_rc, int suspend_rc, int fetch_rc) |
| Configure return value for generic sensor device. | |
| int | generic_sim_channel_set (const struct device *dev, enum sensor_channel chan, struct sensor_value val) |
| Set the value to be returned for a given channel. | |
Generic simulated sensor.
SPDX-License-Identifier: FSL-1.1-ALv2
| int generic_sim_channel_set | ( | const struct device * | dev, |
| enum sensor_channel | chan, | ||
| struct sensor_value | val ) |
Set the value to be returned for a given channel.
| dev | Generic simulator sensor device |
| chan | Channel to configure |
| val | Value to return when channel queried |
| 0 | on success |
| -EINVAL | on invalid channel |
| void generic_sim_func_rc | ( | const struct device * | dev, |
| int | resume_rc, | ||
| int | suspend_rc, | ||
| int | fetch_rc ) |
Configure return value for generic sensor device.
| dev | Generic simulator sensor device to reset |
| resume_rc | Return code for PM_DEVICE_ACTION_RESUME |
| suspend_rc | Return code for PM_DEVICE_ACTION_SUSPEND |
| fetch_rc | Return code for sensor_sample_fetch |
| void generic_sim_reset | ( | const struct device * | dev, |
| bool | reset_rc ) |
Reset all channels back to unconfigured.
| dev | Generic simulator sensor device to reset |
| reset_rc | Reset the return codes |