diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-10-09 15:14:17 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-10-09 15:14:17 +0000 |
commit | 99b19281e36f1c3a9743517dd97ebf2fdf7d4cf7 (patch) | |
tree | 3e91b938382c91bee097abefffaccbe4dcf6f67a /nuttx/include | |
parent | 62cb0dd59715da18e7f1c8383f8fe67f0648f86e (diff) | |
download | px4-nuttx-99b19281e36f1c3a9743517dd97ebf2fdf7d4cf7.tar.gz px4-nuttx-99b19281e36f1c3a9743517dd97ebf2fdf7d4cf7.tar.bz2 px4-nuttx-99b19281e36f1c3a9743517dd97ebf2fdf7d4cf7.zip |
Add last option to configure method
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1010 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/usbdev.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/nuttx/include/nuttx/usbdev.h b/nuttx/include/nuttx/usbdev.h index 9ab836406..b3e19b00e 100644 --- a/nuttx/include/nuttx/usbdev.h +++ b/nuttx/include/nuttx/usbdev.h @@ -56,10 +56,15 @@ /* Endpoint helpers *****************************************************************/ /* Configure endpoint, making it usable. The class driver may deallocate or re-use - * the 'desc' structure after returning + * the 'desc' structure after returning: + * + * ep - the struct usbdev_ep_s instance obtained from allocep() + * desc - A struct usb_epdesc_s instance describing the endpoint + * last - TRUE if this this last endpoint to be configured. Some hardware needs + * to take special action when all of the endpoints have been configured. */ -#define EP_CONFIGURE(ep,desc) (ep)->ops->configure(ep,desc) +#define EP_CONFIGURE(ep,desc,last) (ep)->ops->configure(ep,desc,last) /* The endpoint will no longer be used */ @@ -97,8 +102,9 @@ /* Allocate an endpoint: * - * epphy - 7-bit physical endpoint number (without diretion bit). Zero means - * that any endpoint matching the other requirements will suffice. + * ep - 7-bit logical endpoint number (direction bit ignored). Zero means + * that any endpoint matching the other requirements will suffice. The + * assigned endpoint can be found in the eplog field. * in - TRUE: IN (device-to-host) endpoint requested * eptype - Endpoint type. One of {USB_EP_ATTR_XFER_ISOC, USB_EP_ATTR_XFER_BULK, * USB_EP_ATTR_XFER_INT} @@ -197,7 +203,7 @@ struct usbdev_epops_s { /* Configure/enable and disable endpoint */ - int (*configure)(FAR struct usbdev_ep_s *ep, FAR const struct usb_epdesc_s *desc); + int (*configure)(FAR struct usbdev_ep_s *ep, FAR const struct usb_epdesc_s *desc, boolean last); int (*disable)(FAR struct usbdev_ep_s *ep); /* Allocate and free I/O requests */ @@ -227,6 +233,7 @@ struct usbdev_epops_s struct usbdev_ep_s { const struct usbdev_epops_s *ops; /* Endpoint operations */ + ubyte eplog; /* Logical endpoint address */ uint16 maxpacket; /* Maximum packet size for this endpoint */ void *private; /* For use by class driver */ }; |