/******************************************************************************* | |
* Copyright (C) 2014, ZTE Corporation. | |
* | |
* File Name: drvs_usbHost.h | |
* File Mark: | |
* Description: | |
* Others: | |
* Version: 1.0 | |
* Author: | |
* Date: 2014-06-09 | |
* History 1: | |
* Date: | |
* Version: | |
* Author: | |
* Modification: | |
* History 2: | |
********************************************************************************/ | |
#ifndef DRVS_USBHOST | |
#define DRVS_USBHOST | |
#include "drvs_general.h" | |
#include "usb.h" | |
#include "hcd.h" | |
typedef enum | |
{ | |
USBDEV_PLUGIN, /*usb on msg*/ | |
USBDEV_PLUGOUT /*usb out msg*/ | |
} T_USBDEV_PLUGEVENT; | |
typedef VOID (* UsbHostSetParam_cbk) (struct usb_device *dev, T_USBDEV_PLUGEVENT PlugIn); | |
typedef struct _T_USBHOST_PARAM | |
{ | |
UINT16 VendorID; | |
UINT16 ProductID; | |
UsbHostSetParam_cbk UsbHostSetParam_CallBack; | |
} | |
T_USBHOST_PARAM; | |
SINT32 zDrv_UsbHostSetParam(UINT16 vid, UINT16 pid, VOID *pParam); | |
struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags); | |
int usb_submit_urb(struct urb *urb, gfp_t mem_flags); | |
void usb_kill_urb(struct urb *urb); | |
void usb_free_urb(struct urb *urb); | |
int usb_control_msg(struct usb_device *dev, unsigned int pipe, UINT8 request, | |
UINT8 requesttype, UINT16 value, UINT16 index, void *data, | |
UINT16 size, int timeout); | |
#endif | |