From f745166bfdce064d2fca2c1e3b5594552f9ff302 Mon Sep 17 00:00:00 2001 From: Jeff Theusch Date: Wed, 23 Oct 2019 08:39:09 -0600 Subject: [PATCH] drivers/usbhost/usbhost_hidkbd.c: Fix keyboard debounce algorithm used when CONFIG_HIDKBD_NODEBOUNCE is undefined. --- drivers/usbhost/usbhost_hidkbd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/usbhost/usbhost_hidkbd.c b/drivers/usbhost/usbhost_hidkbd.c index 84e954b941..8afa119f68 100644 --- a/drivers/usbhost/usbhost_hidkbd.c +++ b/drivers/usbhost/usbhost_hidkbd.c @@ -1118,7 +1118,12 @@ static int usbhost_kbdpoll(int argc, char *argv[]) if (rpt->key[i] != USBHID_KBDUSE_NONE #ifndef CONFIG_HIDKBD_NODEBOUNCE - && rpt->key[i] != lastkey[i] + && rpt->key[i] != lastkey[0] + && rpt->key[i] != lastkey[1] + && rpt->key[i] != lastkey[2] + && rpt->key[i] != lastkey[3] + && rpt->key[i] != lastkey[4] + && rpt->key[i] != lastkey[5] #endif ) {