Is the issue with btnState just that all the HID values being sent down USB will be expected to be 8 bits? If you want to do 16 you'd need to do something like: [...,btnState,btnState>>8,....] to get the two bytes that make up the full 16 bits?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Is the issue with
btnState
just that all the HID values being sent down USB will be expected to be 8 bits? If you want to do 16 you'd need to do something like:[...,btnState,btnState>>8,....]
to get the two bytes that make up the full 16 bits?With the STM32F4 USB I think this is probably of most interest: https://github.com/espruino/Espruino/blob/master/targetlibs/stm32usb/usbd_cdc_hid.c#L79
As the descriptors for HID are there and I guess it's them that might need tweaking?