diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2018-01-10 11:14:20 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-12 03:27:08 -0800 |
commit | 0207f0c53ba644a3fc2a4df8ce6f316faf6b7033 (patch) | |
tree | 2ef6a454828f21159c596dcc846589a8f0181a2b /include | |
parent | 25b59e26caa0fc1a8593d98ea5fc0af2a7650d09 (diff) | |
download | chrome-ec-0207f0c53ba644a3fc2a4df8ce6f316faf6b7033.tar.gz |
pp: add API to show when press is expected
This patch adds an API which exports current physical presence state
machine state to allow the caller to see if the state machine is in
one of the three distinct states:
- no PP process in progress
- user PP input is expected
- PP process in progress, user input is not currently expected
BRANCH=cr50
BUG=b:62537474
TEST=with the rest of the patches applied verified that PP state is
properly communicated through this API.
Change-Id: Ia10cd20c490dadef595f30e0b7257e51b6abf8fa
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/860998
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/physical_presence.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/physical_presence.h b/include/physical_presence.h index f2678993fc..0acbc65691 100644 --- a/include/physical_presence.h +++ b/include/physical_presence.h @@ -61,4 +61,16 @@ int physical_detect_press(void); */ void board_physical_presence_enable(int enable); +/** + * An API to report physical presence FSM state to an external entity. Of + * interest are states when key press is currently required or is expected + * soon. + */ +enum pp_fsm_state { + PP_OTHER = 0, + PP_AWAITING_PRESS = 1, + PP_BETWEEN_PRESSES = 2, +}; +enum pp_fsm_state physical_presense_fsm_state(void); + #endif /* __CROS_EC_PHYSICAL_PRESENCE_H */ |