Home
last modified time | relevance | path

Searched refs:usb (Results 1 – 25 of 42) sorted by relevance

12

/base/usb/usb_manager/test/native/js_unittest/
DUsbFunctionsJsunit.test.js16 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 …]
DUsbFunctionsJsunitEx.test.js16 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 …]
DUsbPortJsunitEx.test.js16 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 …]
DUsbDevicePipeJsunit.test.js16 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 …]
DUsbCoreJsunit.test.js16 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 …]
DUsbCoreJsunitEx.test.js16 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 …]
DUsbPortJsunit.test.js16 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 => {
DUsbDevicePipeJsunitEx.test.js16 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/
Dinit.usb.configfs.cfg3 "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}"
Dinit.usb.cfg5 "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}"
Dinit.cfg22 "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/
DREADME_zh.md13 ![](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 …]
DREADME.md14 ![](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 …]
Dusbmgr.gni16 usb_manager_path = "//base/usb/usb_manager"
/base/startup/init/services/etc/
Dinit.usb.cfg3 "/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/
Dusb_service.cfg6 "uid" : "usb",
7 "gid" : ["usb", "shell"],
DBUILD.gn14 import("//base/usb/usb_manager/usbmgr.gni")
28 "//drivers/peripheral/usb/hdi_service/include",
/base/usb/usb_manager/interfaces/kits/js/napi/
DBUILD.gn14 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/
DBUILD.gn14 import("//base/usb/usb_manager/usbmgr.gni")
38 subsystem_name = "usb"
/base/startup/init/services/etc/param/
Dohos.startup.para14 persist.sys.usb.config=hdc
/base/usb/usb_manager/test/native/
DBUILD.gn14 import("//base/usb/usb_manager/usbmgr.gni")
/base/usb/usb_manager/utils/
DBUILD.gn14 import("//base/usb/usb_manager/usbmgr.gni")
/base/security/selinux/sepolicy/ohos_policy/drivers/adapter/vendor/
Dvirtfs_contexts17 genfscon debugfs /usb u:object_r:debugfs_usb:s0
/base/usb/usb_manager/frameworks/dialog/dialog_ui/usb_right_dialog/
DBUILD.gn27 module_install_dir = "app/com.usb.right"
/base/security/selinux/sepolicy/ohos_policy/usb/usb_manager/system/
Dnormal_hap.te15 # avc: denied { getattr } for pid=1812 comm="com.usb.right" path="/data/storage/el1/bundle/entry…

12