taken from Hasu codebase (https://github.com/tmk/tmk_keyboard) usb.c/.h and usb_extra.c/.h, though these files only have the PJRC copyright/license in the header