usb_vendor_req.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #ifndef _USB_VENDOR_REQUEST_H_
  21. #define _USB_VENDOR_REQUEST_H_
  22. //4 Set/Get Register related wIndex/Data
  23. #define RT_USB_RESET_MASK_OFF 0
  24. #define RT_USB_RESET_MASK_ON 1
  25. #define RT_USB_SLEEP_MASK_OFF 0
  26. #define RT_USB_SLEEP_MASK_ON 1
  27. #define RT_USB_LDO_ON 1
  28. #define RT_USB_LDO_OFF 0
  29. //4 Set/Get SYSCLK related wValue or Data
  30. #define RT_USB_SYSCLK_32KHZ 0
  31. #define RT_USB_SYSCLK_40MHZ 1
  32. #define RT_USB_SYSCLK_60MHZ 2
  33. typedef enum _RT_USB_BREQUEST {
  34. RT_USB_SET_REGISTER = 1,
  35. RT_USB_SET_SYSCLK = 2,
  36. RT_USB_GET_SYSCLK = 3,
  37. RT_USB_GET_REGISTER = 4
  38. } RT_USB_BREQUEST;
  39. typedef enum _RT_USB_WVALUE {
  40. RT_USB_RESET_MASK = 1,
  41. RT_USB_SLEEP_MASK = 2,
  42. RT_USB_USB_HRCPWM = 3,
  43. RT_USB_LDO = 4,
  44. RT_USB_BOOT_TYPE = 5
  45. } RT_USB_WVALUE;
  46. //BOOLEAN usbvendorrequest(PCE_USB_DEVICE CEdevice, RT_USB_BREQUEST bRequest, RT_USB_WVALUE wValue, UCHAR wIndex, PVOID Data, UCHAR DataLength, BOOLEAN isDirectionIn);
  47. //BOOLEAN CEusbGetStatusRequest(PCE_USB_DEVICE CEdevice, IN USHORT Op, IN USHORT Index, PVOID Data);
  48. //BOOLEAN CEusbFeatureRequest(PCE_USB_DEVICE CEdevice, IN USHORT Op, IN USHORT FeatureSelector, IN USHORT Index);
  49. //BOOLEAN CEusbGetDescriptorRequest(PCE_USB_DEVICE CEdevice, IN short urbLength, IN UCHAR DescriptorType, IN UCHAR Index, IN USHORT LanguageId, IN PVOID TransferBuffer, IN ULONG TransferBufferLength);
  50. #endif