/* usb/urb.h
 *
 * (c) 2002 Simtec Electronics
 *
 * Ben Dooks
 *
 * host-controller structures - urb
 *
 * $Id: urb.h,v 1.1 2003/08/11 08:21:35 ben Exp $
 *
 * This Library file is part of the Simtec Electronics USB stack development
 *   suite.
 * Specific licence is granted to use this file by third parties for the
 *   development of USB device drivers.
 *
 */

#ifndef __USB_HC_URB_H
#define __USB_HC_URB_H "$Id: urb.h,v 1.1 2003/08/11 08:21:35 ben Exp $"


/* usbcore_urbinfo -
 *
 * this is created by the urb alloc function in the core to pass to anything
 * that may wish to allocate an urb.
*/

struct usbnew_urbinfo {
  size_t         data_size;
  void           *ext_data;
};

/* usbcore_urb -
 *
 * this structure wrappers the public facing urb structure to allow extra
 * information to be held about the urb and the buffer involved.
*/

struct usbnew_urb;

struct usbnew_urb {
  usb_buffer_t       ext_urb;     /* export to the clients */

  usbnew_hc_ep_t    *ep;          /* endpoint allocated to */
  void              *hc_pw;       /* hc's pw */

  /* free entry is called by the routine that does the freeing of the
   * urb to ensure any private data for the hc is cleared up... */
  int               (*free)(struct usbnew_urb *urb);
};


#endif /* __USB_HC_URB_H */
