1 /****************************************************************************** 2 * 3 * Copyright(c) 2007 - 2017 Realtek Corporation. 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 *****************************************************************************/ 15 #ifndef _USB_VENDOR_REQUEST_H_ 16 #define _USB_VENDOR_REQUEST_H_ 17 18 /* 4 Set/Get Register related wIndex/Data */ 19 #define RT_USB_RESET_MASK_OFF 0 20 #define RT_USB_RESET_MASK_ON 1 21 #define RT_USB_SLEEP_MASK_OFF 0 22 #define RT_USB_SLEEP_MASK_ON 1 23 #define RT_USB_LDO_ON 1 24 #define RT_USB_LDO_OFF 0 25 26 /* 4 Set/Get SYSCLK related wValue or Data */ 27 #define RT_USB_SYSCLK_32KHZ 0 28 #define RT_USB_SYSCLK_40MHZ 1 29 #define RT_USB_SYSCLK_60MHZ 2 30 31 32 typedef enum _RT_USB_BREQUEST { 33 RT_USB_SET_REGISTER = 1, 34 RT_USB_SET_SYSCLK = 2, 35 RT_USB_GET_SYSCLK = 3, 36 RT_USB_GET_REGISTER = 4 37 } RT_USB_BREQUEST; 38 39 40 typedef enum _RT_USB_WVALUE { 41 RT_USB_RESET_MASK = 1, 42 RT_USB_SLEEP_MASK = 2, 43 RT_USB_USB_HRCPWM = 3, 44 RT_USB_LDO = 4, 45 RT_USB_BOOT_TYPE = 5 46 } RT_USB_WVALUE; 47 48 49 #if 0 50 BOOLEAN usbvendorrequest(PCE_USB_DEVICE CEdevice, RT_USB_BREQUEST bRequest, RT_USB_WVALUE wValue, u8 wIndex, void *Data, u8 DataLength, BOOLEAN isDirectionIn); 51 BOOLEAN CEusbGetStatusRequest(PCE_USB_DEVICE CEdevice, u16 Op, u16 Index, void *Data); 52 BOOLEAN CEusbFeatureRequest(PCE_USB_DEVICE CEdevice, u16 Op, u16 FeatureSelector, u16 Index); 53 BOOLEAN CEusbGetDescriptorRequest(PCE_USB_DEVICE CEdevice, short urbLength, u8 DescriptorType, u8 Index, u16 LanguageId, void *TransferBuffer, u32 TransferBufferLength); 54 #endif 55 56 #endif 57