diff options
| author | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-05-30 13:14:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-30 13:14:59 -0700 |
| commit | fced377ac007d27f2650ccffbe0b18abcdcfe23d (patch) | |
| tree | bd5b141987394a5a16cfc416bfe2b9efdb14d067 /tmk_core/protocol/vusb/vusb.c | |
| parent | 7b8a013826ad90714a05ea522de53adf964ab3b9 (diff) | |
| download | qmk_firmware-fced377ac007d27f2650ccffbe0b18abcdcfe23d.tar.gz qmk_firmware-fced377ac007d27f2650ccffbe0b18abcdcfe23d.zip | |
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"
Diffstat (limited to 'tmk_core/protocol/vusb/vusb.c')
| -rw-r--r-- | tmk_core/protocol/vusb/vusb.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 4c8e6003f..5feff889a 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c | |||
| @@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 18 | #include <avr/wdt.h> | 18 | #include <avr/wdt.h> |
| 19 | #include <util/delay.h> | 19 | #include <util/delay.h> |
| 20 | #include <stdint.h> | 20 | #include <stdint.h> |
| 21 | #include "usbdrv.h" | 21 | #include <usbdrv/usbdrv.h> |
| 22 | #include "usbconfig.h" | 22 | #include "usbconfig.h" |
| 23 | #include "host.h" | 23 | #include "host.h" |
| 24 | #include "report.h" | 24 | #include "report.h" |
| @@ -290,12 +290,12 @@ usbMsgLen_t usbFunctionSetup(uchar data[8]) { | |||
| 290 | if (rq->bRequest == USBRQ_HID_GET_REPORT) { | 290 | if (rq->bRequest == USBRQ_HID_GET_REPORT) { |
| 291 | debug("GET_REPORT:"); | 291 | debug("GET_REPORT:"); |
| 292 | /* we only have one report type, so don't look at wValue */ | 292 | /* we only have one report type, so don't look at wValue */ |
| 293 | usbMsgPtr = (void *)&keyboard_report; | 293 | usbMsgPtr = (usbMsgPtr_t)&keyboard_report; |
| 294 | return sizeof(keyboard_report); | 294 | return sizeof(keyboard_report); |
| 295 | } else if (rq->bRequest == USBRQ_HID_GET_IDLE) { | 295 | } else if (rq->bRequest == USBRQ_HID_GET_IDLE) { |
| 296 | debug("GET_IDLE: "); | 296 | debug("GET_IDLE: "); |
| 297 | // debug_hex(vusb_idle_rate); | 297 | // debug_hex(vusb_idle_rate); |
| 298 | usbMsgPtr = &vusb_idle_rate; | 298 | usbMsgPtr = (usbMsgPtr_t)&vusb_idle_rate; |
| 299 | return 1; | 299 | return 1; |
| 300 | } else if (rq->bRequest == USBRQ_HID_SET_IDLE) { | 300 | } else if (rq->bRequest == USBRQ_HID_SET_IDLE) { |
| 301 | vusb_idle_rate = rq->wValue.bytes[1]; | 301 | vusb_idle_rate = rq->wValue.bytes[1]; |
| @@ -815,29 +815,29 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { | |||
| 815 | */ | 815 | */ |
| 816 | switch (rq->wValue.bytes[1]) { | 816 | switch (rq->wValue.bytes[1]) { |
| 817 | case USBDESCR_DEVICE: | 817 | case USBDESCR_DEVICE: |
| 818 | usbMsgPtr = (unsigned char *)&usbDeviceDescriptor; | 818 | usbMsgPtr = (usbMsgPtr_t)&usbDeviceDescriptor; |
| 819 | len = sizeof(usbDeviceDescriptor_t); | 819 | len = sizeof(usbDeviceDescriptor_t); |
| 820 | break; | 820 | break; |
| 821 | case USBDESCR_CONFIG: | 821 | case USBDESCR_CONFIG: |
| 822 | usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor; | 822 | usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor; |
| 823 | len = sizeof(usbConfigurationDescriptor_t); | 823 | len = sizeof(usbConfigurationDescriptor_t); |
| 824 | break; | 824 | break; |
| 825 | case USBDESCR_STRING: | 825 | case USBDESCR_STRING: |
| 826 | switch (rq->wValue.bytes[0]) { | 826 | switch (rq->wValue.bytes[0]) { |
| 827 | case 0: | 827 | case 0: |
| 828 | usbMsgPtr = (unsigned char *)&usbStringDescriptorZero; | 828 | usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorZero; |
| 829 | len = usbStringDescriptorZero.header.bLength; | 829 | len = usbStringDescriptorZero.header.bLength; |
| 830 | break; | 830 | break; |
| 831 | case 1: // iManufacturer | 831 | case 1: // iManufacturer |
| 832 | usbMsgPtr = (unsigned char *)&usbStringDescriptorManufacturer; | 832 | usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorManufacturer; |
| 833 | len = usbStringDescriptorManufacturer.header.bLength; | 833 | len = usbStringDescriptorManufacturer.header.bLength; |
| 834 | break; | 834 | break; |
| 835 | case 2: // iProduct | 835 | case 2: // iProduct |
| 836 | usbMsgPtr = (unsigned char *)&usbStringDescriptorProduct; | 836 | usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorProduct; |
| 837 | len = usbStringDescriptorProduct.header.bLength; | 837 | len = usbStringDescriptorProduct.header.bLength; |
| 838 | break; | 838 | break; |
| 839 | case 3: // iSerialNumber | 839 | case 3: // iSerialNumber |
| 840 | usbMsgPtr = (unsigned char *)&usbStringDescriptorSerial; | 840 | usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorSerial; |
| 841 | len = usbStringDescriptorSerial.header.bLength; | 841 | len = usbStringDescriptorSerial.header.bLength; |
| 842 | break; | 842 | break; |
| 843 | } | 843 | } |
| @@ -845,24 +845,24 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { | |||
| 845 | case USBDESCR_HID: | 845 | case USBDESCR_HID: |
| 846 | switch (rq->wValue.bytes[0]) { | 846 | switch (rq->wValue.bytes[0]) { |
| 847 | case KEYBOARD_INTERFACE: | 847 | case KEYBOARD_INTERFACE: |
| 848 | usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor.keyboardHID; | 848 | usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor.keyboardHID; |
| 849 | len = sizeof(usbHIDDescriptor_t); | 849 | len = sizeof(usbHIDDescriptor_t); |
| 850 | break; | 850 | break; |
| 851 | #if defined(RAW_ENABLE) | 851 | #if defined(RAW_ENABLE) |
| 852 | case RAW_INTERFACE: | 852 | case RAW_INTERFACE: |
| 853 | usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor.rawHID; | 853 | usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor.rawHID; |
| 854 | len = sizeof(usbHIDDescriptor_t); | 854 | len = sizeof(usbHIDDescriptor_t); |
| 855 | break; | 855 | break; |
| 856 | #endif | 856 | #endif |
| 857 | #if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) | 857 | #if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) |
| 858 | case MOUSE_EXTRA_INTERFACE: | 858 | case MOUSE_EXTRA_INTERFACE: |
| 859 | usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor.mouseExtraHID; | 859 | usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor.mouseExtraHID; |
| 860 | len = sizeof(usbHIDDescriptor_t); | 860 | len = sizeof(usbHIDDescriptor_t); |
| 861 | break; | 861 | break; |
| 862 | #endif | 862 | #endif |
| 863 | #if defined(CONSOLE_ENABLE) | 863 | #if defined(CONSOLE_ENABLE) |
| 864 | case CONSOLE_INTERFACE: | 864 | case CONSOLE_INTERFACE: |
| 865 | usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor.consoleHID; | 865 | usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor.consoleHID; |
| 866 | len = sizeof(usbHIDDescriptor_t); | 866 | len = sizeof(usbHIDDescriptor_t); |
| 867 | break; | 867 | break; |
| 868 | #endif | 868 | #endif |
| @@ -872,24 +872,24 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { | |||
| 872 | /* interface index */ | 872 | /* interface index */ |
| 873 | switch (rq->wIndex.word) { | 873 | switch (rq->wIndex.word) { |
| 874 | case KEYBOARD_INTERFACE: | 874 | case KEYBOARD_INTERFACE: |
| 875 | usbMsgPtr = (unsigned char *)keyboard_hid_report; | 875 | usbMsgPtr = (usbMsgPtr_t)keyboard_hid_report; |
| 876 | len = sizeof(keyboard_hid_report); | 876 | len = sizeof(keyboard_hid_report); |
| 877 | break; | 877 | break; |
| 878 | #if defined(RAW_ENABLE) | 878 | #if defined(RAW_ENABLE) |
| 879 | case RAW_INTERFACE: | 879 | case RAW_INTERFACE: |
| 880 | usbMsgPtr = (unsigned char *)raw_hid_report; | 880 | usbMsgPtr = (usbMsgPtr_t)raw_hid_report; |
| 881 | len = sizeof(raw_hid_report); | 881 | len = sizeof(raw_hid_report); |
| 882 | break; | 882 | break; |
| 883 | #endif | 883 | #endif |
| 884 | #if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) | 884 | #if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) |
| 885 | case MOUSE_EXTRA_INTERFACE: | 885 | case MOUSE_EXTRA_INTERFACE: |
| 886 | usbMsgPtr = (unsigned char *)mouse_extra_hid_report; | 886 | usbMsgPtr = (usbMsgPtr_t)mouse_extra_hid_report; |
| 887 | len = sizeof(mouse_extra_hid_report); | 887 | len = sizeof(mouse_extra_hid_report); |
| 888 | break; | 888 | break; |
| 889 | #endif | 889 | #endif |
| 890 | #if defined(CONSOLE_ENABLE) | 890 | #if defined(CONSOLE_ENABLE) |
| 891 | case CONSOLE_INTERFACE: | 891 | case CONSOLE_INTERFACE: |
| 892 | usbMsgPtr = (unsigned char *)console_hid_report; | 892 | usbMsgPtr = (usbMsgPtr_t)console_hid_report; |
| 893 | len = sizeof(console_hid_report); | 893 | len = sizeof(console_hid_report); |
| 894 | break; | 894 | break; |
| 895 | #endif | 895 | #endif |
