/ohos5.0/docs/zh-cn/release-notes/api-diff/v3.1-Release/ |
H A D | js-apidiff-usb.md | 61 | ohos.usb | usb | closePipe(pipe: USBDevicePipe): number; | 新增 | 64 | ohos.usb | usb | getFileDescriptor(pipe: USBDevicePipe): number; | 新增 | 65 | ohos.usb | usb | getRawDescriptor(pipe: USBDevicePipe): Uint8Array; | 新增 | 66 | ohos.usb | usb | setInterface(pipe: USBDevicePipe, iface: USBInterface): number; | 新增 | 67 | ohos.usb | usb | setConfiguration(pipe: USBDevicePipe, config: USBConfig): number; | 新增 | 68 | ohos.usb | usb | releaseInterface(pipe: USBDevicePipe, iface: USBInterface): number; | 新增 | 69 | ohos.usb | usb | claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): numbe… 70 | ohos.usb | usb | requestRight(deviceName: string): Promise\<boolean>; | 新增 | 71 | ohos.usb | usb | hasRight(deviceName: string): boolean; | 新增 | 72 | ohos.usb | usb | connectDevice(device: USBDevice): Readonly\<USBDevicePipe>; | 新增 | [all …]
|
/ohos5.0/docs/en/release-notes/api-diff/v3.1-Release/ |
H A D | js-apidiff-usb.md | 61 | ohos.usb | usb | closePipe(pipe: USBDevicePipe): number; | Added| 64 | ohos.usb | usb | getFileDescriptor(pipe: USBDevicePipe): number; | Added| 65 | ohos.usb | usb | getRawDescriptor(pipe: USBDevicePipe): Uint8Array; | Added| 66 | ohos.usb | usb | setInterface(pipe: USBDevicePipe, iface: USBInterface): number; | Added| 67 | ohos.usb | usb | setConfiguration(pipe: USBDevicePipe, config: USBConfig): number; | Added| 68 | ohos.usb | usb | releaseInterface(pipe: USBDevicePipe, iface: USBInterface): number; | Added| 69 | ohos.usb | usb | claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): numbe… 70 | ohos.usb | usb | requestRight(deviceName: string): Promise\<boolean>; | Added| 71 | ohos.usb | usb | hasRight(deviceName: string): boolean; | Added| 72 | ohos.usb | usb | connectDevice(device: USBDevice): Readonly\<USBDevicePipe>; | Added| [all …]
|
/ohos5.0/docs/zh-cn/release-notes/api-diff/v3.2-beta2/ |
H A D | js-apidiff-usb.md | 9 | ohos.usb | FunctionType | NCM = 256 | 新增 | 11 | ohos.usb | FunctionType | MIDI = 64 | 新增 | 13 | ohos.usb | FunctionType | PTP = 16 | 新增 | 14 | ohos.usb | FunctionType | MTP = 8 | 新增 | 15 | ohos.usb | FunctionType | HDC = 4 | 新增 | 37 | ohos.usb | usb | getSupportedModes(portId: number): PortModeType; | 新增 | 38 | ohos.usb | usb | getPorts(): Array\<USBPort>; | 新增 | 39 | ohos.usb | usb | getCurrentFunctions(): FunctionType; | 新增 | 40 | ohos.usb | usb | setCurrentFunctions(funcs: FunctionType): Promise\<boolean>; | 新增 | 41 | ohos.usb | usb | usbFunctionsToString(funcs: FunctionType): string; | 新增 | [all …]
|
/ohos5.0/docs/en/release-notes/api-diff/v3.2-beta2/ |
H A D | js-apidiff-usb.md | 9 | ohos.usb | FunctionType | NCM = 256 | Added| 14 | ohos.usb | FunctionType | MTP = 8 | Added| 15 | ohos.usb | FunctionType | HDC = 4 | Added| 16 | ohos.usb | FunctionType | ECM = 2 | Added| 21 | ohos.usb | USBPort | id: number; | Added| 37 | ohos.usb | usb | getSupportedModes(portId: number): PortModeType; | Added| 38 | ohos.usb | usb | getPorts(): Array\<USBPort>; | Added| 39 | ohos.usb | usb | getCurrentFunctions(): FunctionType; | Added| 40 | ohos.usb | usb | setCurrentFunctions(funcs: FunctionType): Promise\<boolean>; | Added| 41 | ohos.usb | usb | usbFunctionsToString(funcs: FunctionType): string; | Added| [all …]
|
/ohos5.0/drivers/peripheral/usb/cfg/ |
H A D | init.usb.configfs.cfg | 10 "condition" : "sys.usb.config=none && sys.usb.configfs=1", 22 "setparam sys.usb.state ${sys.usb.config}" 37 …"name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=hdc && param:sys.usb.configfs=1 && par… 38 …"condition" : "sys.usb.ffs.ready=1 && sys.usb.config=hdc && sys.usb.configfs=1 && sys.usb.ffs.read… 56 "setparam sys.usb.state ${sys.usb.config}" 68 "condition" : "sys.usb.ffs.ready=1 && sys.usb.config=hdc_debug && sys.usb.configfs=1", 84 "setparam sys.usb.state ${sys.usb.config}" 94 "setparam sys.usb.state ${sys.usb.config}" 106 "condition" : "sys.usb.ffs.ready=1 && sys.usb.config=rndis_hdc && sys.usb.configfs=1", 111 "setparam sys.usb.state ${sys.usb.config}" [all …]
|
/ohos5.0/base/usb/usb_manager/test/native/js_unittest/ |
H A D | UsbFunctionsJsunitEx.test.js | 16 import usb from '@ohos.usb'; 30 usb.setPortRoles(usbPortList[0].id, usb.SINK, usb.DEVICE).then(data => { 59 var maskCode = usb.NONE 74 var maskCode = usb.ACM 89 var maskCode = usb.ECM 104 var maskCode = usb.ACM | usb.ECM 134 var maskCode = usb.ACM | usb.HDC 149 var maskCode = usb.ECM | usb.HDC 208 expect(nMaskCode).assertEqual(usb.ACM | usb.ECM); 236 expect(nMaskCode).assertEqual(usb.HDC | usb.ACM); [all …]
|
H A D | UsbFunctionsJsunit.test.js | 16 import usb from '@ohos.usb'; 25 var Version = usb.getVersion() 28 var usbPortList = usb.getPorts() 31 usb.setPortRoles(usbPortList[0].id, usb.SINK, usb.DEVICE).then(data => { 57 var maskCode = usb.getCurrentFunctions(); 76 var maskCode = usb.getCurrentFunctions(); 91 expect(nMaskCode).assertEqual(usb.NONE); 120 var maskCode = usb.getCurrentFunctions(); 154 callSetCurFunction('set_current_functions_test_04 ACM ECM 3', (usb.ACM | usb.ECM)) 184 callSetCurFunction('set_current_functions_test_06 ACM HDC 5', (usb.HDC | usb.ACM)) [all …]
|
H A D | UsbDevicePipeJsunit.test.js | 16 import usb from '@ohos.usb'; 29 var Version = usb.getVersion() 32 var usbPortList = usb.getPorts() 35 usb.setPortRoles(usbPortList[0].id, usb.SOURCE, usb.HOST).then(data => { 44 gDeviceList = usb.getDevices(); 406 | (usb.USB_REQUEST_TYPE_STANDARD << 5) | (usb.USB_REQUEST_TARGET_DEVICE & 0x1f), 0, 0) 425 | (usb.USB_REQUEST_TYPE_STANDARD << 5) | (usb.USB_REQUEST_TARGET_DEVICE & 0x1f), 0, 0) 444 | (usb.USB_REQUEST_TYPE_STANDARD << 5) | (usb.USB_REQUEST_TARGET_INTERFACE & 0x1f), 0, 1) 463 | (usb.USB_REQUEST_TYPE_STANDARD << 5) | (usb.USB_REQUEST_TARGET_DEVICE & 0x1f), 0, 0) 501 | (usb.USB_REQUEST_TYPE_CLASS << 5) | (usb.USB_REQUEST_TARGET_ENDPOINT & 0x1f), (2 << 8), 0) [all …]
|
H A D | UsbCoreJsunitEx.test.js | 16 import usb from '@ohos.usb'; 26 var Version = usb.getVersion() 29 var usbPortList = usb.getPorts() 32 usb.setPortRoles(usbPortList[0].id, usb.SOURCE, usb.HOST).then(data => { 40 gDeviceList = usb.getDevices(); 65 var isRight = usb.hasRight(gDeviceList[0].name); 78 var usbDevicePipe = usb.connectDevice(device) 115 var usbDevicePipe = usb.connectDevice(device) 159 var isPipClose = usb.closePipe(usbDevicePipe); 528 var hasRight = usb.hasRight(deviceName) [all …]
|
H A D | UsbCoreJsunit.test.js | 16 import usb from '@ohos.usb'; 26 var Version = usb.getVersion() 29 var usbPortList = usb.getPorts() 32 usb.setPortRoles(usbPortList[0].id, usb.SOURCE, usb.HOST).then(data => { 62 gDeviceList = usb.getDevices(); 230 var isPipClose = usb.closePipe(gPipe); 254 var isPipClose = usb.closePipe(gPipe); 276 var isPipClose = usb.closePipe(gPipe); 299 var isPipClose = usb.closePipe(gPipe); 321 var isPipClose = usb.closePipe(gPipe); [all …]
|
H A D | UsbPortJsunitEx.test.js | 16 import usb from '@ohos.usb'; 26 var Version = usb.getVersion() 72 var powerRole = usb.SINK; 73 var dataRole = usb.NONE - 1; 95 var powerRole = usb.NONE - 1; 96 var dataRole = usb.DEVICE; 118 var powerRole = usb.SINK; 119 var dataRole = usb.NONE - 1; 141 var powerRole = usb.NONE - 1; 142 var dataRole = usb.NONE - 1; [all …]
|
H A D | UsbDevicePipeJsunitEx.test.js | 16 import usb from '@ohos.usb'; 28 var Version = usb.getVersion() 32 var usbPortList = usb.getPorts() 35 usb.setPortRoles(usbPortList[0].id, usb.SOURCE, usb.HOST).then(data => { 46 gDeviceList = usb.getDevices(); 47 gPipe = usb.connectDevice(gDeviceList[0]) 57 var isPipClose = usb.closePipe(gPipe) 426 gPipe = usb.connectDevice(gDeviceList[0]) 462 gPipe = usb.connectDevice(gDeviceList[0]) 498 gPipe = usb.connectDevice(gDeviceList[0]) [all …]
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-basic-services-kit/ |
H A D | js-apis-usb-deprecated.md | 1 # @ohos.usb (USB管理)(已停止维护) 14 import usb from "@ohos.usb"; 17 ## usb.getDevices 88 ## usb.connectDevice 117 ## usb.hasRight 145 ## usb.requestRight 265 ## usb.setInterface 391 ## usb.bulkTransfer 420 //把获取到的设备对象作为参数传入usb.connectDevice;当usb.connectDevice接口成功返回之后; 421 //才可以调用第三个接口usb.claimInterface.当usb.claimInterface 调用成功以后,再调用该接口。 [all …]
|
H A D | js-apis-usb-deprecated-sys.md | 1 # @ohos.usb (USB管理)(系统接口) 11 > 当前页面仅包含本模块的系统接口,其他公开接口参见[@ohos.usb (USB管理)(已停止维护)](js-apis-usb-deprecated.md)。 16 import usb from "@ohos.usb"; 20 ## usb.usbFunctionsFromString<sup>9+</sup> 74 let funcs = usb.FunctionType.ACM | usb.FunctionType.ECM; 130 let ret = usb.getCurrentFunctions(); 133 ## usb.getPorts<sup>9+</sup> 152 let ret = usb.getPorts(); 180 let ret = usb.getSupportedModes(0); 183 ## usb.setPortRoles<sup>9+</sup> [all …]
|
/ohos5.0/foundation/ability/idl_tool/test/hdi_unittest/usb_v1_0/dump_ast_target/ |
H A D | dump.txt | 2 package ohos.hdi.usb.v1_0; 4 import ohos.hdi.usb.v1_0.IUsbdBulkCallback; 5 import ohos.hdi.usb.v1_0.IUsbdSubscriber; 6 import ohos.hdi.usb.v1_0.UsbTypes; 10 [in] ohos.hdi.usb.v1_0.UsbDev dev); 13 [in] ohos.hdi.usb.v1_0.UsbDev dev); 16 [in] ohos.hdi.usb.v1_0.UsbDev dev, 175 package ohos.hdi.usb.v1_0; 177 import ohos.hdi.usb.v1_0.UsbTypes; 189 package ohos.hdi.usb.v1_0; [all …]
|
/ohos5.0/docs/zh-cn/release-notes/api-diff/v3.2-Release/ |
H A D | js-apidiff-usb.md | 3 |新增|NA|类名:USBPort;<br>方法or属性:id: number;|@ohos.usb.d.ts| 4 |新增|NA|类名:usb;<br>方法or属性:function usbFunctionsFromString(funcs: string): number;|@ohos.usb.d.ts| 5 |新增|NA|类名:usb;<br>方法or属性:function usbFunctionsToString(funcs: FunctionType): string;|@ohos.usb.d.ts| 6 |新增|NA|类名:usb;<br>方法or属性:function setCurrentFunctions(funcs: FunctionType): Promise\<boolean>;|@oho… 7 |新增|NA|类名:usb;<br>方法or属性:function getCurrentFunctions(): FunctionType;|@ohos.usb.d.ts| 8 |新增|NA|类名:usb;<br>方法or属性:function getPorts(): Array\<USBPort>;|@ohos.usb.d.ts| 9 |新增|NA|类名:usb;<br>方法or属性:function getSupportedModes(portId: number): PortModeType;|@ohos.usb.d.ts| 138 |废弃版本有变化|类名:usb;<br>方法or属性:declare usb<br>旧版本信息:|类名:usb;<br>方法or属性:declare usb<br>新版本信息:9<br>代替接口: … 139 …usb;<br>方法or属性:function getDevices(): Array\<Readonly\<USBDevice>>;<br>旧版本信息:|类名:usb;<br>方法or属性:fu… 141 …usb;<br>方法or属性:function hasRight(deviceName: string): boolean;<br>旧版本信息:|类名:usb;<br>方法or属性:functio… [all …]
|
/ohos5.0/docs/zh-cn/device-dev/reference/hdi-apis/usb/ |
H A D | _hdi_usbfn_mtp.md | 6 为mtp服务提供统一的API,以访问usb mtp/ptp驱动程序。 8 mtp服务可以获得usb mtp/ptp驱动程序对象或代理,然后调用该对象或代理提供的API来传输不同类型的mtp/ptp数据包。 20 …idl](_i_usbfn_mtp_interface_8idl.md) | 声明usb模块提供的API,用于获取usb信息、订阅或取消订阅usb数据、启用或禁用usb、设置usb数据报告模式以及… 21 | [UsbfnMtpTypes.idl](_usbfn_mtp_types_8idl.md) | 定义usb模块使用的数据,包括usb信息,并上报了usb数据。 | 28 | interface [IUsbfnMtpInterface](interface_i_usbfn_mtp_interface.md) | 定义在usb上执行基本操作的函数。…
|
H A D | _i_usbfn_mtp_interface_8idl.md | 6 声明usb模块提供的API,用于获取usb信息、订阅或取消订阅usb数据、启用或禁用usb、设置usb数据报告模式以及设置准确性和测量范围等usb选项。 8 模块包路径:ohos.hdi.usb.gadget.mtp.v1_0 10 引用:ohos.hdi.usb.gadget.mtp.v1_0.UsbfnMtpTypes 24 | interface [IUsbfnMtpInterface](interface_i_usbfn_mtp_interface.md) | 定义在usb上执行基本操作的函数。…
|
/ohos5.0/drivers/interface/usb/v1_0/ |
H A D | IUsbdSubscriber.idl | 20 * @brief Provides unified APIs for usb services to access usb drivers. 22 …* A usb service can obtain a usb driver object or agent and then call APIs provided by this object… 23 * access different types of usb devices based on the usb IDs, thereby obtaining usb information, 24 * subscribing to or unsubscribing from usb data, enabling or disabling a usb, 25 …* setting the usb data reporting mode, and setting usb options such as the accuracy and measuremen… 30 package ohos.hdi.usb.v1_0; 32 import ohos.hdi.usb.v1_0.UsbTypes; 35 * @brief Defines the callback for reporting usb data. This callback needs to be registered when 36 …* a usb user subscribes to usb data. Only after the usb is enabled, the usb data subscriber can re… 37 * usb data. For details, see {@link IUsbInterface}.
|
H A D | IUsbdBulkCallback.idl | 20 * @brief Provides unified APIs for usb services to access usb drivers. 22 …* A usb service can obtain a usb driver object or agent and then call APIs provided by this object… 23 * access different types of usb devices based on the usb IDs, thereby obtaining usb information, 24 * subscribing to or unsubscribing from usb data, enabling or disabling a usb, 25 …* setting the usb data reporting mode, and setting usb options such as the accuracy and measuremen… 30 package ohos.hdi.usb.v1_0; 33 * @brief Defines the callback for reporting usb data. This callback needs to be registered when 34 …* a usb user subscribes to usb data. Only after the usb is enabled, the usb data subscriber can re… 35 * usb data. For details, see {@link IUsbInterface}.
|
H A D | UsbTypes.idl | 20 * @brief Provides unified APIs for usb services to access usb drivers. 22 …* A usb service can obtain a usb driver object or agent and then call APIs provided by this object… 23 * access different types of usb devices based on the usb IDs, thereby obtaining usb information, 24 * subscribing to or unsubscribing from usb data, enabling or disabling a usb, 25 …* setting the usb data reporting mode, and setting usb options such as the accuracy and measuremen… 33 * @brief Defines the data used by the usb module, including the usb information, 34 * and reported usb data. 40 package ohos.hdi.usb.v1_0;
|
/ohos5.0/foundation/ability/idl_tool/test/hdi_unittest/usb_v1_0/foo/usb/v1_0/ |
H A D | IUsbdSubscriber.idl | 20 * @brief Provides unified APIs for usb services to access usb drivers. 22 …* A usb service can obtain a usb driver object or agent and then call APIs provided by this object… 23 * access different types of usb devices based on the usb IDs, thereby obtaining usb information, 24 * subscribing to or unsubscribing from usb data, enabling or disabling a usb, 25 …* setting the usb data reporting mode, and setting usb options such as the accuracy and measuremen… 30 package ohos.hdi.usb.v1_0; 32 import ohos.hdi.usb.v1_0.UsbTypes; 35 * @brief Defines the callback for reporting usb data. This callback needs to be registered when 36 …* a usb user subscribes to usb data. Only after the usb is enabled, the usb data subscriber can re… 37 * usb data. For details, see {@link IUsbInterface}.
|
H A D | IUsbdBulkCallback.idl | 20 * @brief Provides unified APIs for usb services to access usb drivers. 22 …* A usb service can obtain a usb driver object or agent and then call APIs provided by this object… 23 * access different types of usb devices based on the usb IDs, thereby obtaining usb information, 24 * subscribing to or unsubscribing from usb data, enabling or disabling a usb, 25 …* setting the usb data reporting mode, and setting usb options such as the accuracy and measuremen… 30 package ohos.hdi.usb.v1_0; 33 * @brief Defines the callback for reporting usb data. This callback needs to be registered when 34 …* a usb user subscribes to usb data. Only after the usb is enabled, the usb data subscriber can re… 35 * usb data. For details, see {@link IUsbInterface}.
|
/ohos5.0/drivers/interface/usb/v1_1/ |
H A D | UsbTypes.idl | 20 * @brief Provides unified APIs for usb services to access usb drivers. 22 …* A usb service can obtain a usb driver object or agent and then call APIs provided by this object… 23 * access different types of usb devices based on the usb IDs, thereby obtaining usb information, 24 * subscribing to or unsubscribing from usb data, enabling or disabling a usb, 25 …* setting the usb data reporting mode, and setting usb options such as the accuracy and measuremen… 33 * @brief Defines the data used by the usb module, including the usb information, 34 * and reported usb data. 40 package ohos.hdi.usb.v1_1; 42 import ohos.hdi.usb.v1_0.UsbTypes;
|
/ohos5.0/base/usb/usb_manager/ |
H A D | README_zh.md | 13  22 base/usb/usb_manager 79 // 导入usb接口api包 80 import usb from '@ohos.usb'; 82 var deviceList = usb.getDevices(); 89 usb.requestRight(deviceName).then(hasRight => { 98 var pipe = usb.connectDevice(deviceList[0]); 129 usb.releaseInterface(pipe, interface); 130 usb.closePipe(pipe); 136 usb.setCurrentFunctions(funType).then(data => { [all …]
|