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
29
32 sys_snode_t _node;
34 /* Device that is being controlled based on charge state */
35 const struct device *device;
36 /* Enable device when charge state reaches at least this value */
37 uint8_t soc_enable;
38 /* Disable device when charge state falls below this value */
39 uint8_t soc_disable;
41 bool requested;
43};
44
58
70
74
75#ifdef __cplusplus
76}
77#endif
78
79#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.
Definition soc_device_control.h:30
uint8_t soc_enable
Definition soc_device_control.h:37
uint8_t soc_disable
Definition soc_device_control.h:39
const struct device * device
Definition soc_device_control.h:35