usb_updater2: Increase touchpad debug buffer length to 50 bytes.

We would like to use all 64-bytes of the buffer as parameter to
UPDATE_EXTRA_CMD_TOUCHPAD_DEBUG (12 bytes for update_frame_header,
2 bytes for the extra command type, leaving 50 bytes of payload).

BRANCH=none
BUG=b:63993891
TEST=./usb_updater2 -g 00 -d 18d1:502b

Change-Id: I023aa760f1a4cf9cacf9262a758cba1120d4f380
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/780372
Reviewed-by: Chun-ta Lin <itspeter@chromium.org>
This commit is contained in:
Nicolas Boichat
2017-11-20 19:11:18 -08:00
committed by chrome-bot
parent 313ea684c3
commit 27c01992fc

View File

@@ -916,7 +916,7 @@ int main(int argc, char *argv[])
int show_fw_ver = 0;
int touchpad_update = 0;
int extra_command = -1;
uint8_t extra_command_data[32];
uint8_t extra_command_data[50];
int extra_command_data_len = 0;
uint8_t extra_command_answer[64];
int extra_command_answer_len = 1;
@@ -949,7 +949,7 @@ int main(int argc, char *argv[])
case 'g':
extra_command = UPDATE_EXTRA_CMD_TOUCHPAD_DEBUG;
/* Maximum length. */
extra_command_data_len = 32;
extra_command_data_len = 50;
str2hex(optarg,
extra_command_data, &extra_command_data_len);
hexdump(extra_command_data, extra_command_data_len);