diff options
author | Vic (Chun-Ju) Yang <victoryang@chromium.org> | 2014-04-30 14:22:44 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-04-30 21:03:10 +0000 |
commit | 870d15f4d1ce529eb9ac8e54cf5c4bf0fa26d224 (patch) | |
tree | 5f908f25b9ce34ba1d60d3e8e160ec5e41064651 | |
parent | dd702e8447f278a322115c3ec1ce839db425c387 (diff) | |
download | chrome-ec-870d15f4d1ce529eb9ac8e54cf5c4bf0fa26d224.tar.gz |
Keyborg: Fix column ordering
Column 0 is on the slave side. Fix this.
BUG=None
TEST=Press a finger at the center of the panel. See a single shape in
touch data.
BRANCH=None
Change-Id: Ic3a9a4fafc6e7ee39a1c3422905cf3b1758f335a
Signed-off-by: Vic (Chun-Ju) Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/197641
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | board/keyborg/touch_scan.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/board/keyborg/touch_scan.c b/board/keyborg/touch_scan.c index 3867a4ee96..0728595c5a 100644 --- a/board/keyborg/touch_scan.c +++ b/board/keyborg/touch_scan.c @@ -149,9 +149,9 @@ void touch_scan_slave_start(void) struct spi_comm_packet *resp = (struct spi_comm_packet *)buf; for (col = 0; col < COL_COUNT * 2; ++col) { - if (col >= COL_COUNT) { - enable_col(col - COL_COUNT, 1); - STM32_PMSE_MCCR = mccr_list[col - COL_COUNT]; + if (col < COL_COUNT) { + enable_col(col, 1); + STM32_PMSE_MCCR = mccr_list[col]; } if (master_slave_sync(20) != EC_SUCCESS) @@ -175,8 +175,8 @@ void touch_scan_slave_start(void) /* Start sending the response for the current column */ spi_slave_send_response_async(resp); - if (col >= COL_COUNT) { - enable_col(col - COL_COUNT, 0); + if (col < COL_COUNT) { + enable_col(col, 0); STM32_PMSE_MCCR = 0; } } @@ -199,9 +199,9 @@ int touch_scan_full_matrix(void) return EC_ERROR_UNKNOWN; for (col = 0; col < COL_COUNT * 2; ++col) { - if (col < COL_COUNT) { - enable_col(col, 1); - STM32_PMSE_MCCR = mccr_list[col]; + if (col >= COL_COUNT) { + enable_col(col - COL_COUNT, 1); + STM32_PMSE_MCCR = mccr_list[col - COL_COUNT]; } if (master_slave_sync(20) != EC_SUCCESS) @@ -232,8 +232,8 @@ int touch_scan_full_matrix(void) if (spi_master_wait_response_async() != EC_SUCCESS) return EC_ERROR_UNKNOWN; - if (col < COL_COUNT) { - enable_col(col, 0); + if (col >= COL_COUNT) { + enable_col(col - COL_COUNT, 0); STM32_PMSE_MCCR = 0; } } |