From 5b1d2b878da4e76870642a2fa2caef9d18fc8355 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Tue, 16 May 2017 13:04:31 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/515282 Commit-Ready: Wei-Ning Huang Tested-by: Wei-Ning Huang Reviewed-by: Rong Chang --- include/ec_commands.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'include') 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 @@ -4267,6 +4267,32 @@ struct __ec_align4 ec_params_fp_frame { uint32_t size; }; +/*****************************************************************************/ +/* 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 -- cgit v1.2.1