diff --git a/docs-en/readme/driver-subsystem.md b/docs-en/readme/driver-subsystem.md index 25b63a72dd2a9e5a74edf553b21948ce89c31d4e..40031eeb443e9bec8f6874c323520c0e22437e6f 100755 --- a/docs-en/readme/driver-subsystem.md +++ b/docs-en/readme/driver-subsystem.md @@ -75,22 +75,22 @@ The OpenHarmony driver framework adopts the primary/secondary mode and is develo

Indicates the OpenHarmony driver framework.

-

hdf\frameworks

+

hdf/frameworks

Provides the source code to develop the driver frameworks, driver models, and capability model libraries.

-

hdf\frameworks\ability

+

hdf/frameworks/ability

Provides functional capabilities for the driver development, such as the message model libraries.

-

hdf\frameworks\core

+

hdf/frameworks/core

Provides the core code to implement the OpenHarmony driver framework.

-

hdf\frameworks\core\host

+

hdf/frameworks/core/host

Provides functions of the driver host environment framework, including:

1. Loading and starting a driver, and dispatching device nodes.

@@ -99,7 +99,7 @@ The OpenHarmony driver framework adopts the primary/secondary mode and is develo

4. Managing the common driver resource configurations.

-

hdf\frameworks\core\manager

+

hdf/frameworks/core/manager

Provides the management modules of the driver framework, including:

1. Driver API management module.

@@ -109,58 +109,53 @@ The OpenHarmony driver framework adopts the primary/secondary mode and is develo

5. Fault management module.

-

hdf\frameworks\core\shared

+

hdf/frameworks/core/shared

Provides shared code for the host and manager.

-

hdf\frameworks\model

+

hdf/frameworks/model

Provides a universal framework model for drivers.

-

hdf\frameworks\model\network

+

hdf/frameworks/model/network

Provides network device models for drivers.

-

hdf\frameworks\support\

+

hdf/frameworks/support

Provides drivers with system APIs and hardware, such as GPIO, I2C, and SPI capabilities.

Some interfaces can be migrated across platforms.

-

hdf\frameworks\support\osal

- -

Provides platforms with common adaptation interfaces, such as memory, thread, and mutex.

- - -

hdf\frameworks\support\platform

+

hdf/frameworks/support/platform

Provides APIs that support the common hardware of platforms, such as GPIO, I2C, and SPI capabilities.

-

hdf\frameworks\tools

+

hdf/frameworks/tools

Provides the driver capability libraries, such as the tool that configures and compiles the HCS (HDF Configuration Source).

-

hdf\frameworks\utils

+

hdf/frameworks/utils

Provides basic data structures and algorithms.

-

hdf\lite\adapter

+

hdf/lite/adapter

Adapts to kernel operation APIs and provides abstract APIs.

-

hdf\lite\include

+

hdf/lite/include

Provides driver APIs for lightweight devices.

-

hdf\lite\hdi

+

hdf/lite/hdi

Provides APIs of the OpenHarmony driver.

@@ -179,7 +174,7 @@ None ![](figures/en-us_image_0000001052764349.png) -Driver loading is mostly done by the driver framework, and you only need to register and configure required APIs. The driver framework will load and initialize the driver based on the parsing result. +Driver loading is mostly done by the driver framework, and you only need to register and configure required APIs. The driver framework will load and initialize the driver based on the parsing content. Driver development based on the HDF consists of the following three parts: @@ -191,7 +186,7 @@ Driver development based on the HDF consists of the following three parts: The driver mainly aims to develop the functions. -The first part that catches your eyes is the driver entry, which is described through **DriverEntry** alignment. +The first part that catches your eyes is the driver entry, which is described through **DriverEntry**. Three APIs are available, namely **bind**, **init**, and **release**. @@ -216,9 +211,7 @@ int32_t SampleDriverBind(struct HdfDeviceObject *deviceObject) } ``` -**Init**: When devices are successfully bound, the framework calls **Init** to initialize the driver. After initialization is complete, the driver framework will determine whether to create external service APIs based on the configuration file. - -If the driver fails to be initialized, the driver framework will automatically release the created device API. +Description of Init: When devices are successfully bound, the framework calls Init to initialize the driver. After initialization is complete, the driver framework will determine whether to create external service interfaces based on the configuration file. If the driver fails to be initialized, the driver framework will automatically release the created device interface. ``` int32_t SampleDriverInit(struct HdfDeviceObject *deviceObject) @@ -249,7 +242,7 @@ The OpenHarmony driver is mainly deployed in the kernel space using the static l ## Repositories Involved -drivers\_hdf\_frameworks +[drivers\_hdf\_frameworks](https://openharmony.gitee.com/openharmony/drivers_hdf_frameworks) -drivers\_hdf\_lite +[drivers\_hdf\_lite](https://openharmony.gitee.com/openharmony/drivers_hdf_lite) diff --git a/docs-en/readme/figures/en-us_image_0000001053044331.png b/docs-en/readme/figures/en-us_image_0000001053044331.png old mode 100755 new mode 100644 index 86c79b27c6bdda3439edcb612b837af464b56fbc..13c697a6e38addbc9b6b2b5717fa2b2a5770d092 Binary files a/docs-en/readme/figures/en-us_image_0000001053044331.png and b/docs-en/readme/figures/en-us_image_0000001053044331.png differ diff --git a/readme/figures/zh-cn_image_0000001053044331.png b/readme/figures/zh-cn_image_0000001053044331.png old mode 100755 new mode 100644 index a49d6b0eed4d6f44f1a2073bdda0a0e4a3f9a525..13c697a6e38addbc9b6b2b5717fa2b2a5770d092 Binary files a/readme/figures/zh-cn_image_0000001053044331.png and b/readme/figures/zh-cn_image_0000001053044331.png differ diff --git "a/readme/\351\251\261\345\212\250\345\255\220\347\263\273\347\273\237README.md" "b/readme/\351\251\261\345\212\250\345\255\220\347\263\273\347\273\237README.md" index 5442202717b52201d4204288ce3a99daca2b4034..650cd356e082fe4bc988247a0aaa058e32061c0f 100755 --- "a/readme/\351\251\261\345\212\250\345\255\220\347\263\273\347\273\237README.md" +++ "b/readme/\351\251\261\345\212\250\345\255\220\347\263\273\347\273\237README.md" @@ -217,7 +217,7 @@ Init接口描述:当框架完成设备绑定动作后,就开始调用驱动 int32_t SampleDriverInit(struct HdfDeviceObject *deviceObject) { // TODO: Init hardware or other resources here. - return HDF_SUCCESS; + return HDF_SUCCESS; } ```