lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /*******************************************************************************
|
| 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 |
|
| 25 | typedef enum
|
| 26 | {
|
| 27 | USBDEV_PLUGIN, /*usb on msg*/
|
| 28 | USBDEV_PLUGOUT /*usb out msg*/
|
| 29 | } T_USBDEV_PLUGEVENT;
|
| 30 |
|
| 31 | typedef VOID (* UsbHostSetParam_cbk) (struct usb_device *dev, T_USBDEV_PLUGEVENT PlugIn);
|
| 32 |
|
| 33 | typedef struct _T_USBHOST_PARAM
|
| 34 | {
|
| 35 | UINT16 VendorID;
|
| 36 | UINT16 ProductID;
|
| 37 | UsbHostSetParam_cbk UsbHostSetParam_CallBack;
|
| 38 | }
|
| 39 | T_USBHOST_PARAM;
|
| 40 |
|
| 41 | SINT32 zDrv_UsbHostSetParam(UINT16 vid, UINT16 pid, VOID *pParam);
|
| 42 | struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags);
|
| 43 | int usb_submit_urb(struct urb *urb, gfp_t mem_flags);
|
| 44 | void usb_kill_urb(struct urb *urb);
|
| 45 | void usb_free_urb(struct urb *urb);
|
| 46 | int 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 |
|