We’ve written a driver for a touchscreen (eGalax), but ran into a few
problems with the usb.c module of the input DDK:
void * devi_usb_register_client(input_module_t * pInput_module, int nDev,
_uint32 nVendor,
_uint32 nClass, _uint32 nSubClass)
The “nSubClass” variable in this function is not used; this causes us
problems, as our device returns a nSubClass value of 255. In the
insertion() function, our device is ignored as the nSubType is not
USBD_CONNECT_WILDCARD (which we specified in the devi_usb_register_client()
call). Any particular reason why the nSubClass member of the newly
allocated structure was not being set? Setting it accordingly fixed this
problem.
Another issue we have is in the usb_dev_init() function. For some strange
reason, the usbd_urb_status() keeps retuning 0x2000009, even though the
packet we’ve received from the device is correct (all bytes accounted for).
I’m at a lost to explain why this is. For the time being, ignoring the
error from the usbd_urb_status() call fixed our problem, but this can cause
us to process incorrect data if there ever was an error encountered.