InterfaceAdapter.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #ifndef _INTERFACE_ADAPTER_H
  2. #define _INTERFACE_ADAPTER_H
  3. typedef struct _BULK_ENDP_IN
  4. {
  5. PCHAR bulk_in_buffer;
  6. size_t bulk_in_size;
  7. UCHAR bulk_in_endpointAddr;
  8. UINT bulk_in_pipe;
  9. }BULK_ENDP_IN, *PBULK_ENDP_IN;
  10. typedef struct _BULK_ENDP_OUT
  11. {
  12. UCHAR bulk_out_buffer;
  13. size_t bulk_out_size;
  14. UCHAR bulk_out_endpointAddr;
  15. UINT bulk_out_pipe;
  16. //this is used when int out endpoint is used as bulk out end point
  17. UCHAR int_out_interval;
  18. }BULK_ENDP_OUT, *PBULK_ENDP_OUT;
  19. typedef struct _INTR_ENDP_IN
  20. {
  21. PCHAR int_in_buffer;
  22. size_t int_in_size;
  23. UCHAR int_in_endpointAddr;
  24. UCHAR int_in_interval;
  25. UINT int_in_pipe;
  26. }INTR_ENDP_IN, *PINTR_ENDP_IN;
  27. typedef struct _INTR_ENDP_OUT
  28. {
  29. PCHAR int_out_buffer;
  30. size_t int_out_size;
  31. UCHAR int_out_endpointAddr;
  32. UCHAR int_out_interval;
  33. UINT int_out_pipe;
  34. }INTR_ENDP_OUT, *PINTR_ENDP_OUT;
  35. typedef struct _USB_TCB
  36. {
  37. struct urb *urb;
  38. PVOID psIntfAdapter;
  39. BOOLEAN bUsed;
  40. }USB_TCB, *PUSB_TCB;
  41. typedef struct _USB_RCB
  42. {
  43. struct urb *urb;
  44. PVOID psIntfAdapter;
  45. BOOLEAN bUsed;
  46. }USB_RCB, *PUSB_RCB;
  47. /*
  48. //This is the interface specific Sub-Adapter
  49. //Structure.
  50. */
  51. typedef struct _S_INTERFACE_ADAPTER
  52. {
  53. struct usb_device * udev;
  54. struct usb_interface * interface;
  55. /* Bulk endpoint in info */
  56. BULK_ENDP_IN sBulkIn;
  57. /* Bulk endpoint out info */
  58. BULK_ENDP_OUT sBulkOut;
  59. /* Interrupt endpoint in info */
  60. INTR_ENDP_IN sIntrIn;
  61. /* Interrupt endpoint out info */
  62. INTR_ENDP_OUT sIntrOut;
  63. ULONG ulInterruptData[2];
  64. struct urb *psInterruptUrb;
  65. USB_TCB asUsbTcb[MAXIMUM_USB_TCB];
  66. USB_RCB asUsbRcb[MAXIMUM_USB_RCB];
  67. atomic_t uNumTcbUsed;
  68. atomic_t uCurrTcb;
  69. atomic_t uNumRcbUsed;
  70. atomic_t uCurrRcb;
  71. PMINI_ADAPTER psAdapter;
  72. BOOLEAN bFlashBoot;
  73. BOOLEAN bHighSpeedDevice ;
  74. BOOLEAN bSuspended;
  75. BOOLEAN bPreparingForBusSuspend;
  76. struct work_struct usbSuspendWork;
  77. }S_INTERFACE_ADAPTER,*PS_INTERFACE_ADAPTER;
  78. #endif