本文整理匯總了TypeScript中usb.Interface.detachKernelDriver方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Interface.detachKernelDriver方法的具體用法?TypeScript Interface.detachKernelDriver怎麽用?TypeScript Interface.detachKernelDriver使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類usb.Interface
的用法示例。
在下文中一共展示了Interface.detachKernelDriver方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: Buffer
configDesc.bConfigurationValue = 1;
configDesc.iConfiguration = 1;
configDesc.bmAttributes = 1;
configDesc.bMaxPower = 1;
configDesc.extra = new Buffer([]);
const deviceInterface: usb.Interface = device.interface(1);
device.interfaces = [deviceInterface];
const iface = new usb.Interface(device, 1);
iface.claim();
iface.release((error: string) => null, (error: string) => null);
const kernelActive: boolean = iface.isKernelDriverActive();
const detachKernel: number = iface.detachKernelDriver();
const attachKernel: number = iface.attachKernelDriver();
iface.setAltSetting(1, (error: string) => null);
const endpointDesc: usb.EndpointDescriptor = new usb.EndpointDescriptor();
endpointDesc.bLength = 1;
endpointDesc.bDescriptorType = 1;
endpointDesc.bEndpointAddress = 1;
endpointDesc.bmAttributes = 1;
endpointDesc.wMaxPacketSize = 1;
endpointDesc.bInterval = 1;
endpointDesc.bRefresh = 1;
endpointDesc.bSynchAddress = 1;
const ifaceInEndpoint: usb.Endpoint = iface.endpoint(1) as usb.InEndpoint;