openharmony 鸿蒙 js-apidiff-usb

2023-02-03 浏览 (632)

JS API Changes of the USB Subsystem

The table below lists the APIs changes of the USB subsystem in OpenHarmony 3.1 Release over OpenHarmony 3.0 LTS.

API Changes

ModuleClassMethod/Attribute/Enumeration/ConstantChange Type
ohos.usbUSBRequestDirectionUSB_REQUEST_DIR_FROM_DEVICE = 0x80Added
ohos.usbUSBRequestDirectionUSB_REQUEST_DIR_TO_DEVICE = 0Added
ohos.usbUSBControlRequestTypeUSB_REQUEST_TYPE_VENDORAdded
ohos.usbUSBControlRequestTypeUSB_REQUEST_TYPE_CLASSAdded
ohos.usbUSBControlRequestTypeUSB_REQUEST_TYPE_STANDARD = 0Added
ohos.usbUSBRequestTargetTypeUSB_REQUEST_TARGET_OTHERAdded
ohos.usbUSBRequestTargetTypeUSB_REQUEST_TARGET_ENDPOINTAdded
ohos.usbUSBRequestTargetTypeUSB_REQUEST_TARGET_INTERFACEAdded
ohos.usbUSBRequestTargetTypeUSB_REQUEST_TARGET_DEVICE = 0Added
ohos.usbUSBControlParamsdata: Uint8Array;Added
ohos.usbUSBControlParamsindex: number;Added
ohos.usbUSBControlParamsvalue: number;Added
ohos.usbUSBControlParamsreqType: USBControlRequestType;Added
ohos.usbUSBControlParamstarget: USBRequestTargetType;Added
ohos.usbUSBControlParamsrequest: number;Added
ohos.usbUSBDevicePipedevAddress: number;Added
ohos.usbUSBDevicePipebusNum: number;Added
ohos.usbUSBDeviceconfigs: Array<USBConfig>;Added
ohos.usbUSBDeviceprotocol: number;Added
ohos.usbUSBDevicesubClass: number;Added
ohos.usbUSBDeviceclazz: number;Added
ohos.usbUSBDeviceproductId: number;Added
ohos.usbUSBDevicevendorId: number;Added
ohos.usbUSBDeviceversion: string;Added
ohos.usbUSBDeviceproductName: string;Added
ohos.usbUSBDevicemanufacturerName: string;Added
ohos.usbUSBDevicename: string;Added
ohos.usbUSBDeviceserial: string;Added
ohos.usbUSBDevicedevAddress: number;Added
ohos.usbUSBDevicebusNum: number;Added
ohos.usbUSBConfiginterfaces: Array<USBInterface>;Added
ohos.usbUSBConfigisSelfPowered: boolean;Added
ohos.usbUSBConfigisRemoteWakeup: boolean;Added
ohos.usbUSBConfigname: string;Added
ohos.usbUSBConfigmaxPower: number;Added
ohos.usbUSBConfigattributes: number;Added
ohos.usbUSBConfigid: number;Added
ohos.usbUSBInterfaceendpoints: Array<USBEndpoint>;Added
ohos.usbUSBInterfacename: string;Added
ohos.usbUSBInterfacealternateSetting: number;Added
ohos.usbUSBInterfacesubClass: number;Added
ohos.usbUSBInterfaceclazz: number;Added
ohos.usbUSBInterfaceprotocol: number;Added
ohos.usbUSBInterfaceid: number;Added
ohos.usbUSBEndpointinterfaceId: number;Added
ohos.usbUSBEndpointtype: number;Added
ohos.usbUSBEndpointnumber: number;Added
ohos.usbUSBEndpointdirection: USBRequestDirection;Added
ohos.usbUSBEndpointmaxPacketSize: number;Added
ohos.usbUSBEndpointinterval: number;Added
ohos.usbUSBEndpointattributes: number;Added
ohos.usbUSBEndpointaddress: number;Added
ohos.usbusbclosePipe(pipe: USBDevicePipe): number;Added
ohos.usbusbbulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array,timeout?: number): Promise<number>;Added
ohos.usbusbcontrolTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout?: number): Promise<number>;Added
ohos.usbusbgetFileDescriptor(pipe: USBDevicePipe): number;Added
ohos.usbusbgetRawDescriptor(pipe: USBDevicePipe): Uint8Array;Added
ohos.usbusbsetInterface(pipe: USBDevicePipe, iface: USBInterface): number;Added
ohos.usbusbsetConfiguration(pipe: USBDevicePipe, config: USBConfig): number;Added
ohos.usbusbreleaseInterface(pipe: USBDevicePipe, iface: USBInterface): number;Added
ohos.usbusbclaimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): number;Added
ohos.usbusbrequestRight(deviceName: string): Promise<boolean>;Added
ohos.usbusbhasRight(deviceName: string): boolean;Added
ohos.usbusbconnectDevice(device: USBDevice): Readonly<USBDevicePipe>;Added
ohos.usbusbgetDevices(): Array<Readonly<USBDevice>>;Added

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Readme

harmony 鸿蒙JS API Changes of the Ability Framework

harmony 鸿蒙JS API Changes of the Accessibility Subsystem

harmony 鸿蒙JS API Changes of the Account Subsystem

harmony 鸿蒙JS API Changes of the ArkUI Development Framework

harmony 鸿蒙JS API Changes of the Power Management Subsystem

harmony 鸿蒙JS API Changes of the Bundle Management Framework

harmony 鸿蒙JS API Changes of the Communication Subsystem

harmony 鸿蒙JS API Changes of the Compiler and Runtime Subsystem

harmony 鸿蒙JS API Changes of the DFX Subsystem

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/4530e7adbed84913b4ac449e4b45fa15