diff --git a/en/device-dev/driver/Readme-EN.md b/en/device-dev/driver/Readme-EN.md index eb21fdeec4025c5c4dd2dc67030249d72e7d3103..c2c3dea84dfb01310ae917c9d6c60dd2c5a1e672 100644 --- a/en/device-dev/driver/Readme-EN.md +++ b/en/device-dev/driver/Readme-EN.md @@ -33,4 +33,5 @@ - [LCD](driver-peripherals-lcd-des.md) - [TOUCHSCREEN](driver-peripherals-touch-des.md) - [Sensor](driver-peripherals-sensor-des.md) - - [WLAN](driver-peripherals-external-des.md) \ No newline at end of file + - [WLAN](driver-peripherals-external-des.md) + - [USB](driver-peripherals-usb-des.md) \ No newline at end of file diff --git a/en/device-dev/driver/driver-peripherals-usb-des.md b/en/device-dev/driver/driver-peripherals-usb-des.md new file mode 100644 index 0000000000000000000000000000000000000000..0dd421ec369c8ff8d4deaee0560608a2090d6fef --- /dev/null +++ b/en/device-dev/driver/driver-peripherals-usb-des.md @@ -0,0 +1,1571 @@ +# USB + +- [Overview](#section175431838101617) + - [Available APIs](#section17667171301711) + +- [Development Guidelines](#section65745222184) + - [Developing Driver Using Host DDK APIs](#section865734181916) + - [Developing Driver Using Host Raw APIs](#section865734181916) + - [Developing Driver Using Device DDK APIs](#section865734181916) + +- [Development Examples](#section263714411191) + - [Developing Driver Using Host DDK APIs](#section18249155619195) + - [Developing Driver Using Host Raw APIs](#section3571192072014) + - [Developing Driver Using Device DDK APIs](#section6356758162015) + + +## Overview + +USB host development aims to provide host-related functions, including protocol encapsulation, device management, and driver installation and uninstall. + +USB device development aims to provide device-related functions, including device management, configuration management, and I/O management. These functions implement creation, configuration, and data communication of USB devices. + +The following figures show the UBS host and device driver models. + +**Figure 1** USB host driver model +![](figures/USB_host_driver_model.png "USB host driver model") + +**Figure 2** USB device driver model +![](figures/USB_device_driver_model.png "USB device driver model") + +The USB driver model offers the following APIs: + +- The USB host Driver Development Kit (DDK) provides driver capability APIs that can be directly called in user mode. The APIs can be classified into the DDK initialization class, interface operation class, and request operation class by function. These APIs can be used to perform DDK initialization, bind/release and open/close an interface, allocate/release a request, and implement isochronous or non-isochronous transfer. +- The USB device DDK provides device management, I/O management, and configuration management APIs, which can be used to create and delete a device, obtain/open an interface, and perform isochronous or non-isochronous transfer. + +### Available APIs + +Table 1 describes the APIs provided by the USB host driver model. + +**Table 1** APIs provided by the USB host driver model + + +