summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/body_detection.h5
-rw-r--r--include/ec_commands.h15
2 files changed, 17 insertions, 3 deletions
diff --git a/include/body_detection.h b/include/body_detection.h
index d3c1865e36..59af6580c6 100644
--- a/include/body_detection.h
+++ b/include/body_detection.h
@@ -7,6 +7,7 @@
#define __CROS_EC_BODY_DETECTION_H
#include <stdint.h>
+#include <stdbool.h>
enum body_detect_states {
BODY_DETECTION_OFF_BODY,
@@ -15,7 +16,7 @@ enum body_detect_states {
/* get/set the state of body detection */
enum body_detect_states body_detect_get_state(void);
-void body_detect_change_state(enum body_detect_states state);
+void body_detect_change_state(enum body_detect_states state, bool spoof);
/* Reset the data. This should be called when ODR is changed*/
void body_detect_reset(void);
@@ -29,5 +30,7 @@ void body_detect_set_enable(int enable);
/* get enable state of body detection */
int body_detect_get_enable(void);
+void body_detect_set_spoof(int enable);
+bool body_detect_get_spoof(void);
#endif /* __CROS_EC_BODY_DETECTION_H */
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 190f44f981..ebef2b69dd 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -2877,8 +2877,19 @@ struct ec_params_motion_sense {
/* Ignored, used for alignment. */
uint8_t reserved;
- /* Individual component values to spoof. */
- int16_t components[3];
+ union {
+ /* Individual component values to spoof. */
+ int16_t components[3];
+
+ /* Used when spoofing an activity */
+ struct {
+ /* enum motionsensor_activity */
+ uint8_t activity_num;
+
+ /* spoof activity state */
+ uint8_t activity_state;
+ };
+ };
} spoof;
/* Used for MOTIONSENSE_CMD_TABLET_MODE_LID_ANGLE. */