Hello,
I build a hardware with:
- 4 LEDs
- 4 Buttons
- 1 Rot Encoder
I already tried some of the examples and it worked well. But I have difficulties to understand the HID Report thing. Is it possible to handle input and output at the same time?
- What is the best way to build a HID Report for my hardware?
- What is the advantage using usbFunctionRead? Did I understand right that this is an alternative to sending data with usbSetInterrupt?
- I frequently call usbPoll(), and checking usbInterruptIsReady. Is it correct that usbInterruptIsReady returns true only one time when I do not call usbSetInterrupt after it?
Stefan
HID Report for custom hardware
Re: HID Report for custom hardware
1) guessing the buttons and Encoder are input you want to send to the host and you need the host to turn on your device leds? Normally to commune from host to device you need to use the vender specific feature. I never used that before but it requires a driver. For the descriptor I'd use the HID gamepad. Lots of examples out there on that. Any DX app can inquire that device easily.
2)Sorry I can not for the life of me recall the difference from usbSetInterrupt to usbFunctionRead but I'm certain you wont need it.
3 here is the best way to think of it
2)Sorry I can not for the life of me recall the difference from usbSetInterrupt to usbFunctionRead but I'm certain you wont need it.
3 here is the best way to think of it
Code: Select all
while ( !usbInterruptIsReady() ) //when not ready you must poll
{
usbPoll();
}
//pulling has stopped time to send
usbSetInterrupt( reportBuffer, 8);