forked from mirrors/qmk_userspace
2020 May 30 Breaking Changes Update (#9215)
* 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"
This commit is contained in:
parent
7b8a013826
commit
fced377ac0
460 changed files with 2624 additions and 12709 deletions
|
@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <avr/wdt.h>
|
||||
#include <util/delay.h>
|
||||
#include <stdint.h>
|
||||
#include "usbdrv.h"
|
||||
#include <usbdrv/usbdrv.h>
|
||||
#include "usbconfig.h"
|
||||
#include "host.h"
|
||||
#include "report.h"
|
||||
|
@ -290,12 +290,12 @@ usbMsgLen_t usbFunctionSetup(uchar data[8]) {
|
|||
if (rq->bRequest == USBRQ_HID_GET_REPORT) {
|
||||
debug("GET_REPORT:");
|
||||
/* we only have one report type, so don't look at wValue */
|
||||
usbMsgPtr = (void *)&keyboard_report;
|
||||
usbMsgPtr = (usbMsgPtr_t)&keyboard_report;
|
||||
return sizeof(keyboard_report);
|
||||
} else if (rq->bRequest == USBRQ_HID_GET_IDLE) {
|
||||
debug("GET_IDLE: ");
|
||||
// debug_hex(vusb_idle_rate);
|
||||
usbMsgPtr = &vusb_idle_rate;
|
||||
usbMsgPtr = (usbMsgPtr_t)&vusb_idle_rate;
|
||||
return 1;
|
||||
} else if (rq->bRequest == USBRQ_HID_SET_IDLE) {
|
||||
vusb_idle_rate = rq->wValue.bytes[1];
|
||||
|
@ -815,29 +815,29 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) {
|
|||
*/
|
||||
switch (rq->wValue.bytes[1]) {
|
||||
case USBDESCR_DEVICE:
|
||||
usbMsgPtr = (unsigned char *)&usbDeviceDescriptor;
|
||||
usbMsgPtr = (usbMsgPtr_t)&usbDeviceDescriptor;
|
||||
len = sizeof(usbDeviceDescriptor_t);
|
||||
break;
|
||||
case USBDESCR_CONFIG:
|
||||
usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor;
|
||||
usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor;
|
||||
len = sizeof(usbConfigurationDescriptor_t);
|
||||
break;
|
||||
case USBDESCR_STRING:
|
||||
switch (rq->wValue.bytes[0]) {
|
||||
case 0:
|
||||
usbMsgPtr = (unsigned char *)&usbStringDescriptorZero;
|
||||
usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorZero;
|
||||
len = usbStringDescriptorZero.header.bLength;
|
||||
break;
|
||||
case 1: // iManufacturer
|
||||
usbMsgPtr = (unsigned char *)&usbStringDescriptorManufacturer;
|
||||
usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorManufacturer;
|
||||
len = usbStringDescriptorManufacturer.header.bLength;
|
||||
break;
|
||||
case 2: // iProduct
|
||||
usbMsgPtr = (unsigned char *)&usbStringDescriptorProduct;
|
||||
usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorProduct;
|
||||
len = usbStringDescriptorProduct.header.bLength;
|
||||
break;
|
||||
case 3: // iSerialNumber
|
||||
usbMsgPtr = (unsigned char *)&usbStringDescriptorSerial;
|
||||
usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorSerial;
|
||||
len = usbStringDescriptorSerial.header.bLength;
|
||||
break;
|
||||
}
|
||||
|
@ -845,24 +845,24 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) {
|
|||
case USBDESCR_HID:
|
||||
switch (rq->wValue.bytes[0]) {
|
||||
case KEYBOARD_INTERFACE:
|
||||
usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor.keyboardHID;
|
||||
usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor.keyboardHID;
|
||||
len = sizeof(usbHIDDescriptor_t);
|
||||
break;
|
||||
#if defined(RAW_ENABLE)
|
||||
case RAW_INTERFACE:
|
||||
usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor.rawHID;
|
||||
usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor.rawHID;
|
||||
len = sizeof(usbHIDDescriptor_t);
|
||||
break;
|
||||
#endif
|
||||
#if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE)
|
||||
case MOUSE_EXTRA_INTERFACE:
|
||||
usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor.mouseExtraHID;
|
||||
usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor.mouseExtraHID;
|
||||
len = sizeof(usbHIDDescriptor_t);
|
||||
break;
|
||||
#endif
|
||||
#if defined(CONSOLE_ENABLE)
|
||||
case CONSOLE_INTERFACE:
|
||||
usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor.consoleHID;
|
||||
usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor.consoleHID;
|
||||
len = sizeof(usbHIDDescriptor_t);
|
||||
break;
|
||||
#endif
|
||||
|
@ -872,24 +872,24 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) {
|
|||
/* interface index */
|
||||
switch (rq->wIndex.word) {
|
||||
case KEYBOARD_INTERFACE:
|
||||
usbMsgPtr = (unsigned char *)keyboard_hid_report;
|
||||
usbMsgPtr = (usbMsgPtr_t)keyboard_hid_report;
|
||||
len = sizeof(keyboard_hid_report);
|
||||
break;
|
||||
#if defined(RAW_ENABLE)
|
||||
case RAW_INTERFACE:
|
||||
usbMsgPtr = (unsigned char *)raw_hid_report;
|
||||
usbMsgPtr = (usbMsgPtr_t)raw_hid_report;
|
||||
len = sizeof(raw_hid_report);
|
||||
break;
|
||||
#endif
|
||||
#if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE)
|
||||
case MOUSE_EXTRA_INTERFACE:
|
||||
usbMsgPtr = (unsigned char *)mouse_extra_hid_report;
|
||||
usbMsgPtr = (usbMsgPtr_t)mouse_extra_hid_report;
|
||||
len = sizeof(mouse_extra_hid_report);
|
||||
break;
|
||||
#endif
|
||||
#if defined(CONSOLE_ENABLE)
|
||||
case CONSOLE_INTERFACE:
|
||||
usbMsgPtr = (unsigned char *)console_hid_report;
|
||||
usbMsgPtr = (usbMsgPtr_t)console_hid_report;
|
||||
len = sizeof(console_hid_report);
|
||||
break;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue