2 * (c) 2015 flabberast <s3+flabbergast@sdfeu.org>
4 * Based on the following work:
5 * - Guillaume Duc's raw hid example (MIT License)
6 * https://github.com/guiduc/usb-hid-chibios-example
7 * - PJRC Teensy examples (MIT License)
8 * https://www.pjrc.com/teensy/usb_keyboard.html
9 * - hasu's TMK keyboard code (GPL v2 and some code Modified BSD)
10 * https://github.com/tmk/tmk_keyboard/
11 * - ChibiOS demo code (Apache 2.0 License)
12 * http://www.chibios.org
14 * Since some GPL'd code is used, this work is licensed under
23 // extern uint8_t blinkLed;
28 /* -------------------------
29 * General USB driver header
30 * -------------------------
33 /* The USB driver to use */
34 #define USB_DRIVER USBD1
36 /* Initialize the USB driver and bus */
37 void init_usb_driver(USBDriver *usbp);
44 /* extern report_keyboard_t keyboard_report_sent; */
46 /* keyboard IN request callback handler */
47 void kbd_in_cb(USBDriver *usbp, usbep_t ep);
49 /* start-of-frame handler */
50 void kbd_sof_cb(USBDriver *usbp);
53 /* nkro IN callback hander */
54 void nkro_in_cb(USBDriver *usbp, usbep_t ep);
55 #endif /* NKRO_ENABLE */
64 /* mouse IN request callback handler */
65 void mouse_in_cb(USBDriver *usbp, usbep_t ep);
66 #endif /* MOUSE_ENABLE */
73 /* shared IN request callback handler */
74 void shared_in_cb(USBDriver *usbp, usbep_t ep);
81 #ifdef EXTRAKEY_ENABLE
83 /* extra report structure */
87 } __attribute__ ((packed)) report_extra_t;
88 #endif /* EXTRAKEY_ENABLE */
97 /* Putchar over the USB console */
98 int8_t sendchar(uint8_t c);
100 /* Flush output (send everything immediately) */
101 void console_flush_output(void);
103 #endif /* CONSOLE_ENABLE */
105 void sendchar_pf(void *p, char c);
107 #endif /* _USB_MAIN_H_ */