This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
Changing the USB-driver datas... Using an array: usb_working_endpoint ep[ENDPOINTS-1]
- From: "oliver munz @ s p e a g" <munz at speag dot ch>
- To: <ecos-devel at sourceware dot org>
- Date: Tue, 7 Feb 2006 01:04:13 +0100
- Subject: Changing the USB-driver datas... Using an array: usb_working_endpoint ep[ENDPOINTS-1]
- Reply-to: "oliver munz @ s p e a g" <munz at speag dot ch>
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