fced377ac0
* Branch point for 2020 May 30 Breaking Change * Migrate `ACTION_LAYER_TOGGLE` to `TG()` (#8954) * Migrate `ACTION_MODS_ONESHOT` to `OSM()` (#8957) * Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (#8958) * Migrate `ACTION_LAYER_MODS` to `LM()` (#8959) * Migrate `ACTION_MODS_TAP_KEY` to `MT()` (#8968) * Convert V-USB usbdrv to a submodule (#8321) * Unify Tap Hold functions and documentation (#8348) * Changing board names to prevent confusion (#8412) * Move the Keyboardio Model01 to a keyboardio/ subdir (#8499) * Move spaceman keyboards (#8830) * Migrate miscellaneous `fn_actions` entries (#8977) * Migrate `ACTION_MODS_KEY` to chained mod keycodes (#8979) * Organizing my keyboards (plaid, tartan, ergoinu) (#8537) * Refactor Lily58 to use split_common (#6260) * Refactor zinc to use split_common (#7114) * Add a message if bin/qmk doesn't work (#9000) * Fix conflicting types for 'tfp_printf' (#8269) * Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (#6480) * Refactor and updates to TKC1800 code (#8472) * Switch to qmk forks for everything (#9019) * audio refactor: replace deprecated PLAY_NOTE_ARRAY (#8484) * Audio enable corrections (2/3) (#8903) * Split HHKB to ANSI and JP layouts and Add VIA support for each (#8582) * Audio enable corrections (Part 4) (#8974) * Fix typo from PR7114 (#9171) * Augment future branch Changelogs (#8978) * Revert "Branch point for 2020 May 30 Breaking Change"
90 lines
1.9 KiB
C
90 lines
1.9 KiB
C
/*
|
|
* (c) 2015 flabberast <s3+flabbergast@sdfeu.org>
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef _USB_MAIN_H_
|
|
#define _USB_MAIN_H_
|
|
|
|
// TESTING
|
|
// extern uint8_t blinkLed;
|
|
|
|
#include "ch.h"
|
|
#include "hal.h"
|
|
|
|
/* -------------------------
|
|
* General USB driver header
|
|
* -------------------------
|
|
*/
|
|
|
|
/* The USB driver to use */
|
|
#define USB_DRIVER USBD1
|
|
|
|
/* Initialize the USB driver and bus */
|
|
void init_usb_driver(USBDriver *usbp);
|
|
|
|
/* ---------------
|
|
* Keyboard header
|
|
* ---------------
|
|
*/
|
|
|
|
/* extern report_keyboard_t keyboard_report_sent; */
|
|
|
|
/* keyboard IN request callback handler */
|
|
void kbd_in_cb(USBDriver *usbp, usbep_t ep);
|
|
|
|
/* start-of-frame handler */
|
|
void kbd_sof_cb(USBDriver *usbp);
|
|
|
|
#ifdef NKRO_ENABLE
|
|
/* nkro IN callback hander */
|
|
void nkro_in_cb(USBDriver *usbp, usbep_t ep);
|
|
#endif /* NKRO_ENABLE */
|
|
|
|
/* ------------
|
|
* Mouse header
|
|
* ------------
|
|
*/
|
|
|
|
#ifdef MOUSE_ENABLE
|
|
|
|
/* mouse IN request callback handler */
|
|
void mouse_in_cb(USBDriver *usbp, usbep_t ep);
|
|
#endif /* MOUSE_ENABLE */
|
|
|
|
/* ---------------
|
|
* Shared EP header
|
|
* ---------------
|
|
*/
|
|
|
|
/* shared IN request callback handler */
|
|
void shared_in_cb(USBDriver *usbp, usbep_t ep);
|
|
|
|
/* --------------
|
|
* Console header
|
|
* --------------
|
|
*/
|
|
|
|
#ifdef CONSOLE_ENABLE
|
|
|
|
/* Putchar over the USB console */
|
|
int8_t sendchar(uint8_t c);
|
|
|
|
/* Flush output (send everything immediately) */
|
|
void console_flush_output(void);
|
|
|
|
#endif /* CONSOLE_ENABLE */
|
|
|
|
#endif /* _USB_MAIN_H_ */
|