|
Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
soc_device_control API More...
Data Structures | |
| struct | soc_device_control_state |
Functions | |
| int | soc_device_control_register (struct soc_device_control_state *state) |
| Register a device to be controlled. | |
| bool | soc_device_control_unregister (struct soc_device_control_state *state) |
| Unregister a controlled device. | |
soc_device_control API
| int soc_device_control_register | ( | struct soc_device_control_state * | state | ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/auto/soc_device_control.h>
Register a device to be controlled.
| state | State object containing device and thresholds |
| 0 | On success |
| -ENODEV | If state does not contain a valid device |
| -EINVAL | On invalid soc_enable or soc_disable configuration |
| bool soc_device_control_unregister | ( | struct soc_device_control_state * | state | ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/auto/soc_device_control.h>
Unregister a controlled device.
| state | State object previously provided to soc_device_control_register |
| true | Device unregistered |
| false | Device not previously registered |