I think the eCos-USB-slave endpoint data structures should be changed. The USB-slave-package should define one struct for all endpoint types whitout the control-endpoint.

The device-driver should define an array of all working endpoint-structs ep1..n. All enndpoint-functions should get an index variable, so that they can address the right struct from the array.

The device-driver and the USBS-interface should define a function to control the type and state of an working endpoint.

I don't see any reason in using blabla_ep1(&ep1) and so on, instead of something like blabla_ep(ep_array, 1);

Are there other ideas how to improve the USBS and USB-driver APIs?



Thanks
Oliver Munz

Reply via email to