blob: a6d74237e0fe7c02aa8302f277925c89aea944be [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/*******************************************************************************
2 * Copyright (C) 2014, ZTE Corporation.
3 *
4 * File Name: drvs_usbHost.h
5 * File Mark:
6 * Description:
7 * Others:
8 * Version: 1.0
9 * Author:
10 * Date: 2014-06-09
11 * History 1:
12 * Date:
13 * Version:
14 * Author:
15 * Modification:
16 * History 2:
17 ********************************************************************************/
18
19#ifndef DRVS_USBHOST
20#define DRVS_USBHOST
21#include "drvs_general.h"
22#include "usb.h"
23#include "hcd.h"
24
25typedef enum
26{
27 USBDEV_PLUGIN, /*usb on msg*/
28 USBDEV_PLUGOUT /*usb out msg*/
29} T_USBDEV_PLUGEVENT;
30
31typedef VOID (* UsbHostSetParam_cbk) (struct usb_device *dev, T_USBDEV_PLUGEVENT PlugIn);
32
33typedef struct _T_USBHOST_PARAM
34{
35 UINT16 VendorID;
36 UINT16 ProductID;
37 UsbHostSetParam_cbk UsbHostSetParam_CallBack;
38}
39T_USBHOST_PARAM;
40
41SINT32 zDrv_UsbHostSetParam(UINT16 vid, UINT16 pid, VOID *pParam);
42struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags);
43int usb_submit_urb(struct urb *urb, gfp_t mem_flags);
44void usb_kill_urb(struct urb *urb);
45void usb_free_urb(struct urb *urb);
46int usb_control_msg(struct usb_device *dev, unsigned int pipe, UINT8 request,
47 UINT8 requesttype, UINT16 value, UINT16 index, void *data,
48 UINT16 size, int timeout);
49
50
51#endif
52