G'day,
I'm currently writing a tutorial on programming HID devices with Linux
(basically, covering the various options like hiddev, event, the other input
layers).
I am curious about some of the aspects of hiddev.
Q1.
Why does hiddev_devinfo (the response to HIDIOCGDEVINFO) return a bustype? It
always has to be BUS_USB, so what is the point of this field?
Q2.
Is there any reason why the structures in <linux/hiddev.h> don't use
standardised types? For example, hiddev_devinfo should probably look
something like:
struct hiddev_devinfo {
uint32_t busnum;
uint32_t devnum;
uint32_t ifnum;
uint16_t vendor;
uint16_t product;
uint16_t version;
uint32_t num_applications;
};
I acknowledge that this is broken wrt <linux/usb.h> (which, for example,
thinks that the bus number should be a int, not an unsigned int equivalent),
but there are probably deeper problems with those <linux/usb.h> definitions,
such as why we use an int to store a value that is a maximum of 64 (for bus
number) or 127 (for device number).
Do we want to change part of the interface, all of the interface, or none of
the interface to userspace?
Brad
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel