diff options
author | Wei-Ning Huang <wnhuang@google.com> | 2017-05-16 13:04:31 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-06-07 05:22:56 -0700 |
commit | 5b1d2b878da4e76870642a2fa2caef9d18fc8355 (patch) | |
tree | ca385b95bfd7ac92e9796a10d12cd4d03b1a9e5c /include | |
parent | 859a33ff46c78bd47075c9fd57b88b88df593634 (diff) | |
download | chrome-ec-5b1d2b878da4e76870642a2fa2caef9d18fc8355.tar.gz |
rose: add touchpad related host commands
Add touchpad related host commands:
1) EC_CMD_TP_SELF_TEST: run open short test.
2) EC_CMD_TP_FRAME_INFO: get number of frame and frame size.
3) EC_CMD_TP_FRAME_SNAPSHOT: make a snapshot of the frame.
4) EC_CMD_TP_FRAME_GET: get frame data.
BRANCH=none
BUG=b:62077098
TEST=`make BOARD=rose -j`
`ectool --name=cros_tp tpselftest` and
`ectool --name=cros_tp tpframeget` works
Change-Id: I43db82278e556b1e6f6301fe88233fe7c4a18a14
Signed-off-by: Wei-Ning Huang <wnhuang@google.com>
Reviewed-on: https://chromium-review.googlesource.com/515282
Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ec_commands.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 67e2f0926d..a2ee8bd15b 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -4268,6 +4268,32 @@ struct __ec_align4 ec_params_fp_frame { }; /*****************************************************************************/ +/* Touchpad MCU commands: range 0x0500-0x05FF */ + +/* Perform touchpad self test */ +#define EC_CMD_TP_SELF_TEST 0x0500 + +/* Get number of frame types, and the size of each type */ +#define EC_CMD_TP_FRAME_INFO 0x0501 + +struct __ec_align4 ec_response_tp_frame_info { + uint32_t n_frames; + uint32_t frame_sizes[0]; +}; + +/* Create a snapshot of current frame readings */ +#define EC_CMD_TP_FRAME_SNAPSHOT 0x0502 + +/* Read the frame */ +#define EC_CMD_TP_FRAME_GET 0x0503 + +struct __ec_align4 ec_params_tp_frame_get { + uint32_t frame_index; + uint32_t offset; + uint32_t size; +}; + +/*****************************************************************************/ /* * Reserve a range of host commands for board-specific, experimental, or * special purpose features. These can be (re)used without updating this file. |