diff --git a/en/device-dev/driver/driver-peripherals-lcd-des.md b/en/device-dev/driver/driver-peripherals-lcd-des.md index ce3cfd04cf2a23ef6ef8bd250ffa287691c7faab..0a4e12179b5e6328a1f051440ca35fc16877b706 100644 --- a/en/device-dev/driver/driver-peripherals-lcd-des.md +++ b/en/device-dev/driver/driver-peripherals-lcd-des.md @@ -14,10 +14,9 @@ The display driver model based on the [Hardware Driver Foundation (HDF)](../driv The following figure shows the HDF-based display driver model. +**Figure 1** HDF-based display driver model - **Figure 1** HDF-based display driver model - - ![image](figures/architecture-of-the-display-driver-model.png "Display Driver Model") +![image](figures/architecture-of-the-display-driver-model.png "Display Driver Model") The display driver model consists of the display common driver layer, SoC adapter layer, and LCD panel driver layer. The HDF-based display driver model shields the differences between kernel forms through platform and OSAL APIs so that the LCD driver can be easily ported across OSs and chip platforms. The display driver model connects to the display common Hardware Abstraction Layer (HAL), supports the implementation of the Hardware Device Interface (HDI), and provides various driver capability interfaces for graphics services through the Display-HDI. @@ -47,7 +46,7 @@ The LCD interfaces include the Mobile Industry Processor Interface (MIPI) Displa ![](figures/ttl-interface.png "ttl-interface") - ​ TTL level signals are generated by TTL devices, which are a major type of digital integrated circuits. TTL devices are manufactured using the bipolar process and feature high speed, low power consumption, and diversified types. + TTL level signals are generated by TTL devices, which are a major type of digital integrated circuits. TTL devices are manufactured using the bipolar process and feature high speed, low power consumption, and diversified types. The TTL interface is used to transmit data in parallel mode under control signals. It transmits data signals, clock signals, and control signals (such as line synchronization signals, frame synchronization signals, and data validity signals). For the LCD with the TTL, additional peripheral interfaces, such as the Serial Peripheral Interface (SPI) and Inter-Integrated Circuit (I2C), are required for the read and write of the internal registers. @@ -208,17 +207,17 @@ The following uses the Hi35xx series chips as an example to describe how to perf ```c++ struct PanelInfo { - uint32_t width; - uint32_t height; - uint32_t hbp; - uint32_t hfp; - uint32_t hsw; - uint32_t vbp; - uint32_t vfp; - uint32_t vsw; - uint32_t frameRate; - enum LcdIntfType intfType; - enum IntfSync intfSync; + uint32_t width; // Width + uint32_t height; // Height + uint32_t hbp; // Horizontal back porch + uint32_t hfp; // Horizontal front porch + uint32_t hsw; // Horizontal synchronization width + uint32_t vbp; // Vertical back porch + uint32_t vfp; // Vertical front porch + uint32_t vsw; // Vertial synchronization width + uint32_t frameRate; // Frame rate + enum LcdIntfType intfType; // LCD interface type + enum IntfSync intfSync; // User timing parameter struct MipiDsiDesc mipi; struct BlkDesc blk; struct PwmCfg pwm; @@ -263,11 +262,13 @@ The following uses the Hi35xx series chips as an example to describe how to perf static int32_t LcdResetOn(void) { int32_t ret; + /* Set the pin direction. */ ret = GpioSetDir(RESET_GPIO, GPIO_DIR_OUT); if (ret != HDF_SUCCESS) { HDF_LOGE("GpioSetDir failure, ret:%d", ret); return HDF_FAILURE; } + /* Write the GPIO. */ ret = GpioWrite(RESET_GPIO, GPIO_VAL_HIGH); if (ret != HDF_SUCCESS) { HDF_LOGE("GpioWrite failure, ret:%d", ret); @@ -282,6 +283,7 @@ The following uses the Hi35xx series chips as an example to describe how to perf - Initialize the entry function of the device driver. ```c++ + /* Initialize the entry function. */ int32_t SampleEntryInit(struct HdfDeviceObject *object) { HDF_LOGI("%s: enter", __func__); @@ -297,6 +299,7 @@ The following uses the Hi35xx series chips as an example to describe how to perf return HDF_SUCCESS; } + /* Implement the driver. */ struct HdfDriverEntry g_sampleDevEntry = { .moduleVersion = 1, .moduleName = "LCD_SAMPLE", diff --git a/en/device-dev/driver/figures/ttl-interface.png b/en/device-dev/driver/figures/ttl-interface.png index fbdfa5fa7f17f5c8a560dca832cf9057e856371e..6216433ca51901e70612ac84d8262747d5d3e286 100644 Binary files a/en/device-dev/driver/figures/ttl-interface.png and b/en/device-dev/driver/figures/ttl-interface.png differ