/* drivers/dfu/usb/dfu/dfudescr.h
 *
 * (c) 2002 Simtec Electronics
 *
 * Ben Dooks
 *
 * USB DFU Class - class specific descriptors
 *
 * $Id: dfudescr.h,v 1.3 2003/08/08 10:19:17 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_DFU_DFUDESCR_H
#define __USB_DFU_DFUDESCR_H "$Id: dfudescr.h,v 1.3 2003/08/08 10:19:17 ben Exp $"

#define DFU_DESCR_FUNCTIONAL     (0x21)

/* see USB DFU Spec, revision 1.0, p10 */

#define DFU_DESCR_FUNC_SIZE            (7)
#define DFU_DESCR_FUNC_bmAttributes    (0x00010002)
#define DFU_DESCR_FUNC_wDetachTimeout  (0x00020003)  /* see DFU_ATTR_* */
#define DFU_DESCR_FUNC_wTransferSize   (0x00020005)  /* max bytes per write */

/* DFU_DESCR_FUNC_bmAttributes
 *
 * bits in the bmAttributes field
*/

#define DFU_ATTR_MASK          (0x07)
#define DFU_ATTR_DOWNLOADABLE  (0x01)   /* download capability if set */
#define DFU_ATTR_UPLOADABLE    (0x02)   /* upload capability */
#define DFU_ATTR_MANIFESTTOL   (0x04)   /* device ca continue after manifest */

#endif /* __USB_DFU_DFUDESCR_H */
