harmony(鸿蒙)USB服务子系统JS API变更

2022-08-09 浏览 (841)

USB服务子系统JS API变更

OpenHarmony 3.2 Beta2版本相较于OpenHarmony 3.2 Beta1版本,USB服务子系统的API变更如下:

接口变更

模块名类名方法/属性/枚举/常量变更类型
ohos.usbFunctionTypeNCM = 256新增
ohos.usbFunctionTypeAUDIO_SOURCE = 128新增
ohos.usbFunctionTypeMIDI = 64新增
ohos.usbFunctionTypeRNDIS = 32新增
ohos.usbFunctionTypePTP = 16新增
ohos.usbFunctionTypeMTP = 8新增
ohos.usbFunctionTypeHDC = 4新增
ohos.usbFunctionTypeECM = 2新增
ohos.usbFunctionTypeACM = 1新增
ohos.usbFunctionTypeNONE = 0新增
ohos.usbUSBPortstatus: USBPortStatus;新增
ohos.usbUSBPortsupportedModes: PortModeType;新增
ohos.usbUSBPortid: number;新增
ohos.usbUSBPortStatuscurrentDataRole: number;新增
ohos.usbUSBPortStatuscurrentPowerRole: number;新增
ohos.usbUSBPortStatuscurrentMode: number;新增
ohos.usbPortModeTypeNUM_MODES = 4新增
ohos.usbPortModeTypeDRP = 3新增
ohos.usbPortModeTypeDFP = 2新增
ohos.usbPortModeTypeUFP = 1新增
ohos.usbPortModeTypeNONE = 0新增
ohos.usbDataRoleTypeDEVICE = 2新增
ohos.usbDataRoleTypeHOST = 1新增
ohos.usbDataRoleTypeNONE = 0新增
ohos.usbPowerRoleTypeSINK = 2新增
ohos.usbPowerRoleTypeSOURCE = 1新增
ohos.usbPowerRoleTypeNONE = 0新增
ohos.usbusbsetPortRoles(portId: number, powerRole: PowerRoleType, dataRole: DataRoleType): Promise<boolean>;新增
ohos.usbusbgetSupportedModes(portId: number): PortModeType;新增
ohos.usbusbgetPorts(): Array<USBPort>;新增
ohos.usbusbgetCurrentFunctions(): FunctionType;新增
ohos.usbusbsetCurrentFunctions(funcs: FunctionType): Promise<boolean>;新增
ohos.usbusbusbFunctionsToString(funcs: FunctionType): string;新增
ohos.usbusbusbFunctionsFromString(funcs: string): number;新增

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)OpenHarmony启用应用沙箱机制-适配指导

harmony(鸿蒙)3.2 beta2相对3.2 beta1变更详细说明

harmony(鸿蒙)元能力子系统JS API变更

harmony(鸿蒙)无障碍子系统JS API变更

harmony(鸿蒙)帐号子系统JS API变更

harmony(鸿蒙)ArkUI子系统JS API变更

harmony(鸿蒙)包管理子系统JS API变更

harmony(鸿蒙)基础通信子系统JS API变更

harmony(鸿蒙)公共基础库子系统JS API变更

harmony(鸿蒙)DFX子系统JS API变更

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