From d58019403007d18ba10c0f490f0338747d577500 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Tue, 31 Oct 2023 17:34:09 +0100 Subject: [PATCH] Fix reading OTP packets from HID interface. Signed-off-by: Pol Henarejos --- src/usb/hid/hid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usb/hid/hid.c b/src/usb/hid/hid.c index 57b9b66..26b380b 100644 --- a/src/usb/hid/hid.c +++ b/src/usb/hid/hid.c @@ -293,9 +293,9 @@ void tud_hid_set_report_cb(uint8_t itf, (void) report_id; (void) report_type; printf("set_report %d %d %d\n", itf, report_id, report_type); - if (itf == ITF_KEYBOARD && report_type == 3) { + if (report_type == 3) { DEBUG_PAYLOAD(buffer, bufsize); - if (buffer[7] == 0xFF) { // reset + if (itf == ITF_KEYBOARD && buffer[7] == 0xFF) { // reset send_buffer_size[ITF_KEYBOARD] = 0; otp_curr_seq = otp_exp_seq = 0; memset(otp_frame_tx, 0, sizeof(otp_frame_tx));