Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
soc_device_control.h
Go to the documentation of this file.
1
13
14#ifndef INFUSE_SDK_INCLUDE_INFUSE_AUTO_SOC_DEVICE_CONTROL_H_
15#define INFUSE_SDK_INCLUDE_INFUSE_AUTO_SOC_DEVICE_CONTROL_H_
16
17#include <zephyr/sys/slist.h>
18#include <zephyr/device.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
30
34 sys_snode_t _node;
37 const struct device *device;
39 uint8_t soc_enable;
41 uint8_t soc_disable;
43 bool requested;
45};
46
61
73
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif /* INFUSE_SDK_INCLUDE_INFUSE_AUTO_SOC_DEVICE_CONTROL_H_ */
bool soc_device_control_unregister(struct soc_device_control_state *state)
Unregister a controlled device.
int soc_device_control_register(struct soc_device_control_state *state)
Register a device to be controlled.
Device control state and thresholds.
Definition soc_device_control.h:32
uint8_t soc_enable
Enable device when charge state reaches at least this value (%)
Definition soc_device_control.h:39
uint8_t soc_disable
Disable device when charge state falls below this value (%)
Definition soc_device_control.h:41
const struct device * device
Device that is being controlled based on charge state.
Definition soc_device_control.h:37