openharmony 鸿蒙 changelogs-usb

2023-02-03 浏览 (737)

USB Subsystem API Changelog

cl.usb_manager.1 System API Change

Runtime authentication is performed for system APIs of the USB manager. An asynchronous API throws an error code via Promise.reject.

If your application is developed based on earlier versions, modify the return values of functions. Otherwise, the original service logic will be affected.

Key API/Component Changes

Bundle NameOriginal APINew API
ohos.usbV9.d.tsfunction setCurrentFunctions(funcs: FunctionType): Promise;function setCurrentFunctions(funcs: FunctionType): Promise;
ohos.usbV9.d.tsfunction setPortRoles(portId: number, powerRole: PowerRoleType, dataRole: DataRoleType): Promise;function setPortRoles(portId: number, powerRole: PowerRoleType, dataRole: DataRoleType): Promise;

cl.usb_manager.2 SDK API Deletion

The @ohos.usbV9.d.ts file was deleted in OpenHarmony 4.0.5.5.

You need to import @ohos.usbManager to use USB service APIs.

import usbManager from '@ohos.usbManager';

Adaptation Guide

For details about usage of each API, see the API Reference.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Web Subsystem ChangeLog

harmony 鸿蒙Ability Subsystem ChangeLog

harmony 鸿蒙Bluetooth Subsystem ChangeLog

harmony 鸿蒙Distributed Data Management Subsystem JS API Changelog

harmony 鸿蒙File Management Subsystem ChangeLog

harmony 鸿蒙Globalization Subsystem ChangeLog

harmony 鸿蒙Media Subsystem ChangeLog

harmony 鸿蒙Test Subsystem ChangeLog

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