Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
SoC Device Control API

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.

Detailed Description

soc_device_control API

Function Documentation

◆ soc_device_control_register()

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.

Note
state object must remain valid in memory until soc_device_control_unregister is called
Parameters
stateState object containing device and thresholds
Return values
0On success
-ENODEVIf state does not contain a valid device
-EINVALOn invalid soc_enable or soc_disable configuration

◆ soc_device_control_unregister()

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.

Note
Unregistering a device releases any active power state claim
Parameters
stateState object previously provided to soc_device_control_register
Return values
trueDevice unregistered
falseDevice not previously registered