#ifndef USB_PROTOCOL_H_
#define USB_PROTOCOL_H_



/* Descriptor Types */
typedef enum{
    DC_DEV_DESC_TYPE            = 0x01,
    DC_CONFIG_DESC_TYPE         = 0x02,
    DC_STRING_DESC_TYPE         = 0x03,
    DC_INTF_DESC_TYPE           = 0x04,
    DC_EP_DESC_TYPE             = 0x05,
    DC_CONFIG_QUALIFIER_TYPE    = 0x06,
    DC_OTHER_DESC_TYPE          = 0x07,
    DC_INTF_POWER_DESC_TYPE     = 0x08
}USBD_DESCRIPTOR_TYPE;

/* Added for compliance */
#define DC_OTG_DESC_TYPE                       0x09
#define DC_DEV_DESC_LEN                        0x12
#define DC_CONFIG_DESC_LEN                     0x09
#define DC_INTF_DESC_LEN                       0x09
#define DC_EP_DESC_LEN                         0x07
#define DC_OTG_DESC_LEN                        0x03
#define DC_QUALIFIER_SIZE                      0x0a

/*
 * bRequest Values
 */
#define DC_REQTYPE_DIR_MASK                  0x80 
typedef enum{ 
    GET_STATUS=                              0x00,
    CLEAR_FEATURE=                           0x01,
    SET_FEATURE=                             0x03,
    SET_ADDRESS=                             0x05,
    GET_DESCRIPTOR=                          0x06,
    SET_DESCRIPTOR=                          0x07,
    GET_CONFIGURATION=                       0x08,
    SET_CONFIGURATION=                       0x09,
    GET_INTERFACE=                           0x0A,
    SET_INTERFACE=                           0x0B,
    SYNCH_FRAME=                             0x0C,
    REQ_DONE=                                0xFF    /*private code: request done*/
}USBD_REQUST_TYPE;

/*
 * bmRequestType Values
 */

typedef enum{
    STANDARD_REQUEST=                        0x00,
    CLASS_REQUEST=                           0x20,
    VENDOR_REQUEST=                          0x40
}USBD_REQUEST_TYPE;

#endif /*USB_PROTOCOL_H_*/
