summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-07-28 04:00:16 -0700
committerGitHub <noreply@github.com>2021-07-28 12:00:16 +0100
commitc52c69d45f180e8ab677be4707ea2c8180a14254 (patch)
treecc8679da015eb812636deb156db37e67b65d65a7
parent2f4361c88fa754c42536dea7b84c5ac25f07593c (diff)
Allow for higher USB Polling rate on ATSAM boards (#13755)
-rw-r--r--tmk_core/protocol/arm_atsam/usb/udi_device_conf.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h b/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h
index 9c9d94789d..1c0983115c 100644
--- a/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h
+++ b/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h
@@ -23,6 +23,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "compiler.h"
#include "usb_protocol_hid.h"
+#ifndef USB_POLLING_INTERVAL_MS
+# define USB_POLLING_INTERVAL_MS 10
+#endif
+
#ifdef VIRTSER_ENABLE
// because CDC uses IAD (interface association descriptor
// per USB Interface Association Descriptor Device Class Code and Use Model 7/23/2003 Rev 1.0)
@@ -118,7 +122,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UDI_HID_KBD_EP_IN KEYBOARD_IN_EPNUM
#define NEXT_IN_EPNUM_1 (KEYBOARD_IN_EPNUM + 1)
#define UDI_HID_KBD_EP_SIZE KEYBOARD_EPSIZE
-#define KBD_POLLING_INTERVAL 10
+#define KBD_POLLING_INTERVAL USB_POLLING_INTERVAL_MS
#ifndef UDI_HID_KBD_STRING_ID
# define UDI_HID_KBD_STRING_ID 0
#endif
@@ -128,7 +132,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define NEXT_IN_EPNUM_2 (MOUSE_IN_EPNUM + 1)
# define UDI_HID_MOU_EP_IN MOUSE_IN_EPNUM
# define UDI_HID_MOU_EP_SIZE MOUSE_EPSIZE
-# define MOU_POLLING_INTERVAL 10
+# define MOU_POLLING_INTERVAL USB_POLLING_INTERVAL_MS
# ifndef UDI_HID_MOU_STRING_ID
# define UDI_HID_MOU_STRING_ID 0
# endif
@@ -141,7 +145,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define UDI_HID_EXK_EP_IN EXTRAKEY_IN_EPNUM
# define NEXT_IN_EPNUM_3 (EXTRAKEY_IN_EPNUM + 1)
# define UDI_HID_EXK_EP_SIZE EXTRAKEY_EPSIZE
-# define EXTRAKEY_POLLING_INTERVAL 10
+# define EXTRAKEY_POLLING_INTERVAL USB_POLLING_INTERVAL_MS
# ifndef UDI_HID_EXK_STRING_ID
# define UDI_HID_EXK_STRING_ID 0
# endif