diff --git a/en/device-dev/subsystems/figure/en-us_image_0000001267088285.png b/en/device-dev/subsystems/figure/en-us_image_0000001267088285.png new file mode 100644 index 0000000000000000000000000000000000000000..5c02d39db86a5fa2c108876cc92a17e4b797643a Binary files /dev/null and b/en/device-dev/subsystems/figure/en-us_image_0000001267088285.png differ diff --git a/en/device-dev/subsystems/subsys-usbservice-overview.md b/en/device-dev/subsystems/subsys-usbservice-overview.md index 33898e8b699076eca0391365b594dff300eb75e9..f74a933955036c84aec0ca62102a2360b1d9f450 100644 --- a/en/device-dev/subsystems/subsys-usbservice-overview.md +++ b/en/device-dev/subsystems/subsys-usbservice-overview.md @@ -1,215 +1,63 @@ -# USB Overview +# USB Overview -## Introduction - USB devices are classified into two types: USB host and USB device. On OpenHarmony, you can use the port service to switch between the host mode and device mode. In host mode, you can obtain the list of connected USB devices, manage device access permissions, and perform bulk transfer or control transfer between the host and connected devices. In device mode, you can switch between functions including HDC (debugging), ACM (serial port), and ECM (Ethernet port). +## Introduction -**Figure 1** USB service architecture +USB devices are classified into two types: USB host and USB device. On OpenHarmony, you can use the port service to switch between the host mode and device mode. In host mode, you can obtain the list of connected USB devices, manage device access permissions, and perform bulk transfer or control transfer between the host and connected devices. In device mode, you can switch between functions including HDC (debugging), ACM (serial port), and ECM (Ethernet port). -![](figure/USB_service_architecture.png) + **Figure 1** USB service architecture + ![USB service architecture](figure/en-us_image_0000001267088285.png) -- USB FWK/API: a layer that provides JS APIs for the upper layer through NAPI. -- USB SERVICE: a layer implemented by using the C++ programming language and logically divided into the HOST, DEVICE, and PORT modules. HDI-based APIs provided by USB SERVICE are mainly used to implement management of USB device list, USB functions, USB ports, and USB device access permissions. -- USB HAL: a layer implemented by using the C programming language. Based on the Host SDK and Device SDK, USB HAL encapsulates basic USB device operations, provides C++ APIs for the upper layer, and receives information from the kernel through the Hardware Driver Foundation (HDF) framework. +- USB API: a layer that provides JS APIs for the upper layer through NAPI. -## Available APIs +- USB Service: a layer implemented by using the C++ programming language and logically divided into the Host, Device, and Port modules. HDI-based APIs provided by USB Service are mainly used to implement management of USB device list, USB functions, USB ports, and USB device access permissions. -- ### Host +- USB HAL: a layer implemented by using the C programming language. Based on the Host Driver Development Kit (SDK) and Device DDK, USB HAL encapsulates basic USB device operations, provides C++ APIs for the upper layer, and receives information from the kernel through the Hardware Driver Foundation (HDF) framework. - -