summaryrefslogtreecommitdiff
path: root/include/physical_presence.h
diff options
context:
space:
mode:
authorVadim Sukhomlinov <sukhomlinov@google.com>2021-07-16 23:51:06 -0700
committerCommit Bot <commit-bot@chromium.org>2021-08-24 23:49:46 +0000
commit5ae1c684271a117539858cb12252959dfe46803c (patch)
tree6c792a27812fdc159723bda6b768b210b88b3f28 /include/physical_presence.h
parentea35354507745b5763bb85479a26409920ed37b0 (diff)
downloadchrome-ec-5ae1c684271a117539858cb12252959dfe46803c.tar.gz
u2f: refactoring to split command processing and crypto
Split U2F crypto from U2F command processing by moving all crypto code into boards/cr50 (platform hooks). U2F state management is part of common code and passed to U2F crypto as a parameter. BUG=b:134594373 TEST=make BOARD=cr50 CRYPTO_TEST=1 console: u2f_test test/tpmtest.py FAFT U2F tests pass Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: I85442cddb2959bd3102f7f6e6047134ede90951b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3034852 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Diffstat (limited to 'include/physical_presence.h')
-rw-r--r--include/physical_presence.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/physical_presence.h b/include/physical_presence.h
index 0acbc65691..c71c6af1ea 100644
--- a/include/physical_presence.h
+++ b/include/physical_presence.h
@@ -73,4 +73,18 @@ enum pp_fsm_state {
};
enum pp_fsm_state physical_presense_fsm_state(void);
+/* ---- Physical presence ---- */
+enum touch_state {
+ POP_TOUCH_NO = 0, /* waiting for a user touch */
+ POP_TOUCH_YES = 1, /* touch recorded and latched */
+};
+
+/*
+ * Check whether the user presence event was latched.
+ *
+ * @param consume reset the latched touch event and the presence LED.
+ * @return POP_TOUCH_NO or POP_TOUCH_YES.
+ */
+enum touch_state pop_check_presence(int consume);
+
#endif /* __CROS_EC_PHYSICAL_PRESENCE_H */