[ECOS] USB on the AT91SAM7S
Andrew Lunn
andrew@lunn.ch
Mon Mar 3 14:36:00 GMT 2008
> Ah, so since they're binary compatible, the driver just overlays a
> 'usbs_tx_endpoint' over one of the defined 'usbs_rx_endpoint'
> structures? So, say, if you define EP2 as IN (tx) then you can just cast
> the struct like this:
>
> usbs_tx_endpoint* tx_ep = (usbs_tx_endpoint*) &usbs_at91_ep2;
>
> Is this correct?
It is a while since i used this code. What i have in my protocol
driver package is:
extern usbs_control_endpoint CYGDAT_IO_USB_RUP_EP0_STRUCT;
extern usbs_rx_endpoint CYGDAT_IO_USB_RUP_OUT_EP_STRUCT;
extern usbs_tx_endpoint CYGDAT_IO_USB_RUP_IN_EP_STRUCT;
Where CYGDAT_IO_USB_RUP_*_STRUCT are defined in my CDL for this
package. They default to usbs_at91_ep0, usbs_at91_ep1, usbs_at91_ep2
etc, but if i wanted to run this over a different USB device i can
just change the values of the CDL variables.
What you suggest should also work for the AT91.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list