Hi, On Thu, Jan 31, 2013 at 06:10:10PM +0800, victor yeo wrote: > Hi, > > >> In the udc driver, i can't assign a single ep0 descriptor to both > >> ep0_in_desc and ep0_out_desc. i think i should skip ep0_out_desc. Bear > >> in mind that i only define 3 endpoints in udc driver: ep0, ep1 bulk > >> in, ep1 bulk out. Will it cause any problem to gadget driver? > > > > There is no such thing as an ep0 descriptor. > > > > Alan Stern > > When ep1 receives CBW data, the isr routine is called. Then in isr, to > get the usb_request: > > usb_request * req; > req = list_entry(dev->ep[2].queue.next, struct kagen2_request, queue); try to use list_for_entry() instead, or list_first_entry(). BTW your usage of list_entry() is wrong. > however, the list_empty(&dev->ep[2].queue) is true. Where is the > appropriate place to add list entry? only you will know, but your implementation of ep_queue is a nice bet. -- balbi
Attachment:
signature.asc
Description: Digital signature