summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@google.com>2016-11-09 17:35:22 +0800
committerchrome-bot <chrome-bot@chromium.org>2016-11-16 19:04:47 -0800
commit64f1823a742e4cd39e56f0621d86bae41c709210 (patch)
treef32024c26dd85c36a80021fb1d6f17f971568ff1 /include
parentb565e9223d3fe5131c380030155b90e327bc27ef (diff)
downloadchrome-ec-64f1823a742e4cd39e56f0621d86bae41c709210.tar.gz
chip/stm32/usb_hid: Separate HID keyboard support
In the future, we'd like to have different HID devices on different endpoints (keyboard, trackpad, etc.), so we'd like to separate the keyboard handling. For other chip implementing usb_hid.c (namely, chip/g), we, for now just rename the config option and endpoint/interface definitions. Making the code more generic can be done at a later stage. BRANCH=none BUG=chrome-os-partner:59083 TEST=make buildall -j TEST=make BOARD=hammer -j && util/flash_ec --board=hammer Change-Id: Iad1b00fa226f7635c0f34aae6a435dc53a3ea555 Reviewed-on: https://chromium-review.googlesource.com/409256 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config.h3
-rw-r--r--include/usb_hid.h3
-rw-r--r--include/usb_hid_keyboard.h14
3 files changed, 17 insertions, 3 deletions
diff --git a/include/config.h b/include/config.h
index 8690a7cf03..09468289e6 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2232,6 +2232,9 @@
/* Support USB HID interface. */
#undef CONFIG_USB_HID
+/* Support USB HID keyboard interface. */
+#undef CONFIG_USB_HID_KEYBOARD
+
/* USB device buffers and descriptors */
#undef CONFIG_USB_RAM_ACCESS_SIZE
#undef CONFIG_USB_RAM_ACCESS_TYPE
diff --git a/include/usb_hid.h b/include/usb_hid.h
index d21449d659..d5b86196a7 100644
--- a/include/usb_hid.h
+++ b/include/usb_hid.h
@@ -39,7 +39,4 @@ struct usb_hid_descriptor {
struct usb_hid_class_descriptor desc[1];
} __packed;
-/* class implementation interfaces */
-void set_keyboard_report(uint64_t rpt);
-
#endif /* USB_H */
diff --git a/include/usb_hid_keyboard.h b/include/usb_hid_keyboard.h
new file mode 100644
index 0000000000..92d8fd7a25
--- /dev/null
+++ b/include/usb_hid_keyboard.h
@@ -0,0 +1,14 @@
+/* Copyright 2016 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ *
+ * USB HID definitions.
+ */
+
+#ifndef __CROS_EC_USB_HID_KEYBOARD_H
+#define __CROS_EC_USB_HID_KEYBOARD_H
+
+/* class implementation interfaces */
+void set_keyboard_report(uint64_t rpt);
+
+#endif