Searched refs:usb (Results 1 – 25 of 42) sorted by relevance
12
/base/usb/usb_manager/test/native/js_unittest/ |
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(); 60 var strMaskCode = usb.usbFunctionsToString(maskCode) 62 var nMaskCode = usb.usbFunctionsFromString(strMaskCode) 76 var maskCode = usb.getCurrentFunctions(); 79 var strMaskCode = usb.usbFunctionsToString(maskCode) 81 var nMaskCode = usb.usbFunctionsFromString(strMaskCode) [all …]
|
D | UsbFunctionsJsunitEx.test.js | 16 import usb from '@ohos.usb'; 24 var Version = usb.getVersion() 27 var usbPortList = usb.getPorts() 30 usb.setPortRoles(usbPortList[0].id, usb.SINK, usb.DEVICE).then(data => { 59 var maskCode = usb.NONE 60 console.info('usb case maskCode : ' + usb.NONE); 61 var strMaskCode = usb.usbFunctionsToString(maskCode) 74 var maskCode = usb.ACM 75 console.info('usb case maskCode : ' + usb.ACM); 76 var strMaskCode = usb.usbFunctionsToString(maskCode) [all …]
|
D | UsbPortJsunitEx.test.js | 16 import usb from '@ohos.usb'; 26 var Version = usb.getVersion() 48 var usbPortList = usb.getPorts() 58 var maskCode = usb.getSupportedModes(portID) 59 expect(maskCode).assertEqual(usb.NONE); 72 var powerRole = usb.SINK; 73 var dataRole = usb.NONE - 1; 75 usb.setPortRoles(portId, powerRole, dataRole).then(data => { 95 var powerRole = usb.NONE - 1; 96 var dataRole = usb.DEVICE; [all …]
|
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(); 45 gPipe = usb.connectDevice(gDeviceList[0]) 57 var isPipClose = usb.closePipe(gPipe) 68 if (endpoint.direction == usb.USB_REQUEST_DIR_TO_DEVICE) { 71 } else if (endpoint.direction == usb.USB_REQUEST_DIR_FROM_DEVICE) { 146 testParam.isClaimed = usb.claimInterface(testParam.pip, testParam.interface, true); [all …]
|
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(); 88 var hasRight = usb.hasRight(gDeviceList[i].name) 111 usb.requestRight(gDeviceList[i].name).then(hasRight => { 134 var isRight = usb.hasRight(gDeviceList[0].name); 136 usb.requestRight(gDeviceList[0].name).then(hasRight => { 144 gPipe = usb.connectDevice(gDeviceList[0]) [all …]
|
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); 67 usb.requestRight(gDeviceList[0].name).then(hasRight => { 78 var usbDevicePipe = usb.connectDevice(device) 102 var isRight = usb.hasRight(gDeviceList[0].name); 104 usb.requestRight(gDeviceList[0].name).then(hasRight => { [all …]
|
D | UsbPortJsunit.test.js | 16 import usb from '@ohos.usb'; 25 var Version = usb.getVersion() 45 var usbPortList = usb.getPorts() 63 var usbPortList = usb.getPorts() 72 var maskCode = usb.getSupportedModes(usbPortList[i].id) 87 var usbPortList = usb.getPorts() 96 usb.setPortRoles(usbPortList[i].id, usb.SINK, usb.DEVICE).then(data => { 116 var usbPortList = usb.getPorts() 126 usb.setPortRoles(usbPortList[i].id, usb.SOURCE, usb.HOST).then(data => {
|
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) 69 if (endpoint.direction == usb.USB_REQUEST_DIR_TO_DEVICE) { 72 } else if (endpoint.direction == (usb.USB_REQUEST_DIR_FROM_DEVICE)) { 148 testParam.isClaimed = usb.claimInterface(testParam.pip, testParam.interface, true); [all …]
|
/base/update/updater/services/etc/ |
D | init.usb.configfs.cfg | 3 "name" : "param:sys.usb.config=none && param:sys.usb.configfs=1", 4 "condition" : "sys.usb.config=none && sys.usb.configfs=1", 7 "setparam sys.usb.ffs.ready 0", 12 "setparam sys.usb.state ${sys.usb.config}" 15 … "name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=hdc && param:sys.usb.configfs=1", 16 "condition" : "sys.usb.ffs.ready=1 && sys.usb.config=hdc && sys.usb.configfs=1", 20 "write /config/usb_gadget/g1/UDC ${sys.usb.controller}", 21 "setparam sys.usb.state ${sys.usb.config}"
|
D | init.usb.cfg | 5 "setparam sys.usb.configfs 0" 8 "name" : "boot && param:persist.sys.usb.config=*", 9 "condition" : "boot && persist.sys.usb.config=*", 11 "setparam sys.usb.config ${persist.sys.usb.config}"
|
D | init.cfg | 22 "mkdir /dev/usb-ffs 0770 shell shell", 23 "mkdir /dev/usb-ffs/hdc 0770 shell shell", 24 "mkdir /dev/usb-ffs/hdc 0770 shell shell", 44 "mount functionfs hdc /dev/usb-ffs/hdc uid=2000,gid=2000", 46 "setparam sys.usb.controller 100e0000.hidwc3_0", 47 "setparam sys.usb.config hdc", 48 "setparam sys.usb.configfs 1"
|
/base/usb/usb_manager/ |
D | README_zh.md | 13 ![](figures/usb-manager-architecture_zh.png "USB服务框架架图") 22 base/usb/usb_manager 34 ### [外部接口](https://gitee.com/openharmony/usb_manager/blob/master/interfaces/kits/js/@ohos.usb.d.ts) 79 // 导入usb接口api包 80 import usb from '@ohos.usb'; 82 var deviceList = usb.getDevices(); 89 usb.requestRight(deviceName).then(hasRight => { 90 console.info("usb device request right result: " + hasRight); 92 console.info("usb device request right failed : " + error); 98 var pipe = usb.connectDevice(deviceList[0]); [all …]
|
D | README.md | 14 ![](figures/usb-manager-architecture.png "USB_service_architecture") 25 base/usb/usb_manager 39 …rnal APIs](https://gitee.com/openharmony/usb_manager/blob/master/interfaces/kits/js/@ohos.usb.d.ts) 93 import usb from '@ohos.usb'; 95 var deviceList = usb.getDevices(); 104 usb.requestRight(deviceName).then(hasRight => { 105 console.info("usb device request right result: " + hasRight); 107 console.info("usb device request right failed : " + error); 115 var pipe = usb.connectDevice(deviceList[0]); 117 usb.claimInterface(pipe, interface, true); // Among the input arguments, interface refers to the on… [all …]
|
D | usbmgr.gni | 16 usb_manager_path = "//base/usb/usb_manager"
|
/base/startup/init/services/etc/ |
D | init.usb.cfg | 3 "/vendor/etc/init.${ohos.boot.hardware}.usb.cfg" 6 "name" : "boot && param:persist.sys.usb.config=*", 7 "condition" : "boot && persist.sys.usb.config=*", 9 "setparam sys.usb.config ${persist.sys.usb.config}" 12 "name" : "param:sys.usb.config=none && param:sys.usb.configfs=0", 13 "condition" : "sys.usb.config=none && sys.usb.configfs=0",
|
/base/usb/usb_manager/services/ |
D | usb_service.cfg | 6 "uid" : "usb", 7 "gid" : ["usb", "shell"],
|
D | BUILD.gn | 14 import("//base/usb/usb_manager/usbmgr.gni") 28 "//drivers/peripheral/usb/hdi_service/include",
|
/base/usb/usb_manager/interfaces/kits/js/napi/ |
D | BUILD.gn | 14 import("//base/usb/usb_manager/usbmgr.gni") 27 ohos_shared_library("usb") { 50 subsystem_name = "usb" 77 subsystem_name = "usb"
|
/base/usb/usb_manager/test/tool/ |
D | BUILD.gn | 14 import("//base/usb/usb_manager/usbmgr.gni") 38 subsystem_name = "usb"
|
/base/startup/init/services/etc/param/ |
D | ohos.startup.para | 14 persist.sys.usb.config=hdc
|
/base/usb/usb_manager/test/native/ |
D | BUILD.gn | 14 import("//base/usb/usb_manager/usbmgr.gni")
|
/base/usb/usb_manager/utils/ |
D | BUILD.gn | 14 import("//base/usb/usb_manager/usbmgr.gni")
|
/base/security/selinux/sepolicy/ohos_policy/drivers/adapter/vendor/ |
D | virtfs_contexts | 17 genfscon debugfs /usb u:object_r:debugfs_usb:s0
|
/base/usb/usb_manager/frameworks/dialog/dialog_ui/usb_right_dialog/ |
D | BUILD.gn | 27 module_install_dir = "app/com.usb.right"
|
/base/security/selinux/sepolicy/ohos_policy/usb/usb_manager/system/ |
D | normal_hap.te | 15 # avc: denied { getattr } for pid=1812 comm="com.usb.right" path="/data/storage/el1/bundle/entry…
|
12