add hid_raw feature to VUSB (#8380)

* rewrite usbhid feature on vusb

* Apply suggestions from code review

Co-Authored-By: Ryan <fauxpark@gmail.com>

* fix typo

* fix typo again

* Update tmk_core/protocol/vusb/vusb.c

Co-Authored-By: Ryan <fauxpark@gmail.com>

* clean up defines

Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
Takuya Urakawa 2020-03-31 05:15:05 +09:00 committed by GitHub
parent b892a1429d
commit 89a675d57c
Failed to generate hash of commit
3 changed files with 174 additions and 1 deletions

View file

@ -97,6 +97,13 @@ typedef struct usbConfigurationDescriptor {
# ifdef USB_CFG_HAVE_INTRIN_ENDPOINT3
usbEndpointDescriptor_t mouseExtraINEndpoint;
# endif
#elif defined(RAW_ENABLE)
usbInterfaceDescriptor_t rawInterface;
usbHIDDescriptor_t rawHID;
# ifdef USB_CFG_HAVE_INTRIN_ENDPOINT3
usbEndpointDescriptor_t rawINEndpoint;
usbEndpointDescriptor_t rawOUTEndpoint;
# endif
#endif
} __attribute__((packed)) usbConfigurationDescriptor_t;
@ -104,3 +111,7 @@ typedef struct usbConfigurationDescriptor {
host_driver_t *vusb_driver(void);
void vusb_transfer_keyboard(void);
#if defined(RAW_ENABLE)
void raw_hid_task(void);
#endif