HID Mouse Configuration
Posted: Mon May 12, 2008 11:06 pm
Hello,
I've made a mouse using the HID descriptor of a typical mouse (3 buttons information + X/Y). This works fine with the AVR-USB stack just like it does with a keypad and HIDkeys.
I have now 2 requirements and as I'm new to USB, I don't really know what's possible :
- I would like to send/get 2 bytes of data to/from the mouse
- and if possible, I would like to send/get these 2 bytes using standard (HID) APIs from Windows, that means with just an user application and no driver instalation
These 2 bytes are for configuration purpose of the internal working of the mouse and doesn't have to do with the mouse HID report.
* Could this be done using a control IN/OUT on endpoint 0?
If yes can someone show me an usbFunctionSetup example with what needs to be tested in usbRequest_t to detect a control IN or OUT and return the correct value for usbFunctionWrite/Read to be called or not.
They are examples of HID or Control application with AVR-USB but not both at the same time. Can an user application send/receive these types of transferts with existing APIs (without drivers like libusb)?
* Could this be done ussing a set/get feature or some kind of vendor specific request?
In this case, does the HID mouse descriptor has to be updated and will it still be recognised as a mouse by Windows? Can AVR-USB manage this and how?
That's a lot of questions! Sorry for keeping things rather vague but I have difficulties with all this new USB language terms (report, descriptor, device.... )
regards
I've made a mouse using the HID descriptor of a typical mouse (3 buttons information + X/Y). This works fine with the AVR-USB stack just like it does with a keypad and HIDkeys.
I have now 2 requirements and as I'm new to USB, I don't really know what's possible :
- I would like to send/get 2 bytes of data to/from the mouse
- and if possible, I would like to send/get these 2 bytes using standard (HID) APIs from Windows, that means with just an user application and no driver instalation
These 2 bytes are for configuration purpose of the internal working of the mouse and doesn't have to do with the mouse HID report.
* Could this be done using a control IN/OUT on endpoint 0?
If yes can someone show me an usbFunctionSetup example with what needs to be tested in usbRequest_t to detect a control IN or OUT and return the correct value for usbFunctionWrite/Read to be called or not.
They are examples of HID or Control application with AVR-USB but not both at the same time. Can an user application send/receive these types of transferts with existing APIs (without drivers like libusb)?
* Could this be done ussing a set/get feature or some kind of vendor specific request?
In this case, does the HID mouse descriptor has to be updated and will it still be recognised as a mouse by Windows? Can AVR-USB manage this and how?
That's a lot of questions! Sorry for keeping things rather vague but I have difficulties with all this new USB language terms (report, descriptor, device.... )
regards