![]() |
nRF Connect SDK Bare Metal API 2.0.99
|
| int sensorsim_init | ( | struct sensorsim_state * | state, |
| const struct sensorsim_cfg * | cfg ) |
#include <sensorsim.h>
Function for initializing a simple triangular waveform sensor simulator.
| [out] | state | Current state of simulator. |
| [in] | cfg | Simulator configuration. It is safe to deallocate or let this go out of scope after returning from the function. |
| 0 | On success. |
| -EFAULT | If state or cfg is NULL. |
| -EINVAL | If minimum simulated value is greater than maximum simulated value in cfg. |