From 3658dc68f3736765246eedec7a70a6dd79884365 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Wed, 13 Jan 2021 07:44:36 +0100 Subject: [PATCH] Increase USBHID::maxHidInterfaces from 3 to 5 It's not that uncommon to have more than three HID interfaces in a USB device - even an Arduino Leonardo (or Pro Micro) always has two just for the CDC; if you add a Boot Keyboard HID interface and one generic HID interface for consumer control (multimedia) keys you already have four.. Many commercial gaming keyboards also have more then three interfaces (I don't think they really need that many but it is what it is). --- usbhid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usbhid.h b/usbhid.h index cf74f57d..e85ca575 100644 --- a/usbhid.h +++ b/usbhid.h @@ -149,7 +149,7 @@ protected: static const uint8_t epInterruptInIndex = 1; // InterruptIN endpoint index static const uint8_t epInterruptOutIndex = 2; // InterruptOUT endpoint index - static const uint8_t maxHidInterfaces = 3; + static const uint8_t maxHidInterfaces = 5; static const uint8_t maxEpPerInterface = 2; static const uint8_t totalEndpoints = (maxHidInterfaces * maxEpPerInterface + 1); // We need to make room for the control endpoint