aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/protocol/chibios/usb_main.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/protocol/chibios/usb_main.h')
-rw-r--r--tmk_core/protocol/chibios/usb_main.h41
1 files changed, 25 insertions, 16 deletions
diff --git a/tmk_core/protocol/chibios/usb_main.h b/tmk_core/protocol/chibios/usb_main.h
index 3fd1e84fe8..5ba6fb1961 100644
--- a/tmk_core/protocol/chibios/usb_main.h
+++ b/tmk_core/protocol/chibios/usb_main.h
@@ -1,25 +1,21 @@
-/*
- * (c) 2015 flabberast <[email protected]>
- *
- * Based on the following work:
- * - Guillaume Duc's raw hid example (MIT License)
- * https://github.com/guiduc/usb-hid-chibios-example
- * - PJRC Teensy examples (MIT License)
- * https://www.pjrc.com/teensy/usb_keyboard.html
- * - hasu's TMK keyboard code (GPL v2 and some code Modified BSD)
- * https://github.com/tmk/tmk_keyboard/
- * - ChibiOS demo code (Apache 2.0 License)
- * http://www.chibios.org
- *
- * Since some GPL'd code is used, this work is licensed under
- * GPL v2 or later.
- */
+// Copyright 2023 Stefan Kerkmann (@KarlK90)
+// Copyright 2020 Ryan (@fauxpark)
+// Copyright 2020 Joel Challis (@zvecr)
+// Copyright 2018 James Laird-Wah
+// Copyright 2016 Fredizzimo
+// Copyright 2016 Giovanni Di Sirio
+// SPDX-License-Identifier: GPL-3.0-or-later OR Apache-2.0
#pragma once
#include <ch.h>
#include <hal.h>
+#include "usb_device_state.h"
+#include "usb_descriptor.h"
+#include "usb_driver.h"
+#include "usb_endpoints.h"
+
/* -------------------------
* General USB driver header
* -------------------------
@@ -36,6 +32,8 @@ void init_usb_driver(USBDriver *usbp);
/* Restart the USB driver and bus */
void restart_usb_driver(USBDriver *usbp);
+bool send_report(usb_endpoint_in_lut_t endpoint, void *report, size_t size);
+
/* ---------------
* USB Event queue
* ---------------
@@ -58,3 +56,14 @@ void usb_event_queue_task(void);
int8_t sendchar(uint8_t c);
#endif /* CONSOLE_ENABLE */
+
+/* --------------
+ * Virtser header
+ * --------------
+ */
+
+#if defined(VIRTSER_ENABLE)
+
+bool virtser_usb_request_cb(USBDriver *usbp);
+
+#endif