• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Driver Subsystem Changelog
2
3## cl.usb.1 USB Device HDI API Changes
4
5**Access Level**
6
7Public API
8
9**Reason for the Change**
10
11To adapt to feature-based reconstruction of the USB subsystem, the original HDI APIs are divided into three feature categories: Host, Device, and Port.
12
13**Change Impact**
14
15This change is a non-compatible change.
16
17| API Capability    | Before Change    | After Change                                     |
18|-----------------|-------------------------|---------------------------|
19| USB device management (device query, open/close, and device configuration management), USB data transfer, and USB device access authorization in host mode| In v1_0, v1_1, and v1_2, the related APIs are contained in **IUsbInterface.idl** and called by **UsbService**.| In v2_0, the related APIs are contained in **IUsbHostInterface.idl** and called by **UsbHostManager**.|
20| USB port configuration management (port list query and port role query and setting) | Same as the above| In v2_0, the related APIs are contained in **IUsbHostInterface.idl** and called by **UsbPortManager**.|
21| USB function management (query/setting) | Same as the above| In v2_0, the related APIs are contained in **IUsbHostInterface.idl** and called by **UsbDeviceManager**.|
22| All data types used by HDI APIs | In v1_0, v1_1, and v1_2, the related data types are defined in **UsbTypes.idl** and used by **UsbService**.| In v2_0, the related data types are defined in **UsbTypes.idl** and used by **UsbHostManager**, **UsbPortManager**, and **UsbDeviceManager**.|
23| Asynchronous callbacks | In v1_0 and v1_2, data is returned via **UsbService**.| In v2_0, data is returned via **UsbHostManager**, **UsbDeviceManager**, and **UsbPortManager**.|
24| Batch transfer callbacks | Same as the above| Same as the above|
25| Device event and port change event processing APIs | In v1_0, device events are processed by **DeviceEvent** and **PortChangedEvent** in a unified manner.| In v2_0, device events are processed by **DeviceEvent** based on the Host Feature and Device Feature categories. The port change events are processed by **PortChangedEvent** based on the Port Feature category.|
26
27**Start API Level**
28
29API 9
30
31**Change Since**
32
33OpenHarmony 5.1.0.48
34
35**Key API/Component Changes**
36
37DeviceEvent and PortChangedEvent
38
39**Adaptation Guide**
40
41No adaptation is required. You do not need to configure the feature category for devices that do not support the USB host or USB device mode.
42