提交 58b4f5d6 编写于 作者: A annie_wangli

update docs

Signed-off-by: Nannie_wangli <annie.wangli@huawei.com>
上级 db779e7f
# GPIO<a name="EN-US_TOPIC_0000001153555758"></a>
- [Overview](#section1826197354103451)
- [Available APIs](#section752964871810)
- [How to Develop](#section731175315103451)
- [Development Example](#section800425816103451)
## Overview<a name="section1826197354103451"></a>
In the Hardware Driver Foundation \(HDF\) framework, the general-purpose input/output \(GPIO\) module uses the service-free mode for API adaptation. The service-free mode applies to the devices that do not provide user-mode APIs or the OS system that does not distinguish the user mode and the kernel mode. In the service-free mode, **DevHandle** \(a void pointer\) directly points to the kernel-mode address of the device object.
......
# HDMI<a name="1"></a>
- [Overview](#section1)
- [Available APIs](#section2)
- [Usage Guidelines](#section3)
- [How to Use](#section4)
- [Opening an HDMI Controller](#section5)
- [Registering a Callback for Hot Plug Detect](#section6)
- [Reading the EDID](#section7)
- [Setting Attributes](#section8)
- [Starting HDMI Transmission](#section10)
- [Stopping HDMI Transmission](#section11)
- [Unregistering the Callback for Hot Plug Detect](#section12)
- [Closing an HDMI Controller](#section13)
- [Example](#section14)
## Overview<a name="section1"></a>
- The High-Definition Multimedia Interface (HDMI) is an audio/video transmission protocol released by Hitachi, Panasonic, Philips, Silicon Image, Sony, Thomson, Toshiba.
......@@ -28,6 +13,7 @@
- Registering and unregistering a callback for HDMI hot plug detect.
- [Figure 1](#fig1) shows the HDMI physical connection.
**Figure 1** HDMI physical connection<a name="fig1"></a>
![](figures/HDMI_physical_connection.png "HDMI_physical_connection")
## Available APIs<a name="section2"></a>
......@@ -129,6 +115,7 @@
[Figure 2](#fig2) shows how HDMI works.
**Figure 2** How HDMI works<a name="fig2"></a>
![](figures/HDMI_usage_flowchart.png "HDMI_usage_flowchart")
### Opening an HDMI Controller<a name="section5"></a>
......
# HDMI
- [Overview](#1)
- [How to Develop](#2)
- [Development Example](#3)
## Overview<a name="1"></a>
The High-Definition Multimedia Interface (HDMI) is an audio/video transmission protocol released by Hitachi, Panasonic, Philips, SiliconImage, Sony, Thomson and Toshiba. It is used to transmit audio or video data from an audio or video source device, such as a DVD player or STB, to a sink device, such as a TV or monitor. The transmission process complies with the Transition Minimized Differential Signaling (TMDS) protocol.
......
# I2C<a name="EN-US_TOPIC_0000001206171515"></a>
- [Overview](#section5361140416)
- [Available APIs](#section545869122317)
- [Usage Guidelines](#section1695201514281)
- [How to Use](#section1338373417288)
- [Opening an I2C Controller](#section13751110132914)
- [Performing I2C Communication](#section9202183372916)
- [Closing an I2C Controller](#section19481164133018)
- [Usage Example](#section5302202015300)
## Overview<a name="section5361140416"></a>
- The Inter-Integrated Circuit \(I2C\) is a simple, bidirectional, and synchronous serial bus that uses merely two wires.
......
# I2C<a name="EN-US_TOPIC_0000001153579420"></a>
- [Overview](#section2040078630114257)
- [How to Develop](#section1085786591114257)
- [I2cMethod and I2cLockMethod](#section1683458184518)
- [Development Example](#section1773332551114257)
## Overview<a name="section2040078630114257"></a>
......@@ -13,31 +9,9 @@ The Inter-Integrated Circuit \(I2C\) bus is a simple and bidirectional two-wire
**Figure 1** Unified service mode<a name="fig17640124912440"></a>
![](figures/unified-service-mode.png "unified-service-mode-8")
## How to Develop<a name="section1085786591114257"></a>
## Available APIs<a name="section752964871810"></a>
The I2C module adaptation involves the following steps:
1. Instantiate the driver entry.
- Instantiate the **HdfDriverEntry** structure.
- Call **HDF\_INIT** to register the **HdfDriverEntry** instance with the HDF framework.
2. Configure attribute files.
- Add the **deviceNode** information to the **device\_info.hcs** file.
- \(Optional\) Add the **i2c\_config.hcs** file.
3. Instantiate the I2C controller object.
- Initialize **I2cCntlr**.
- Instantiate **I2cMethod** and **I2cLockMethod** in **I2cCntlr**.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>For details, see [I2cMethod and I2cLockMethod](#section1683458184518) and [Table 1](#table10549174014611).
4. Debug the driver.
- \(Optional\) For new drivers, verify basic functions, for example, verify the information returned after the connect operation and whether data is successfully transmitted.
### I2cMethod and I2cLockMethod<a name="section1683458184518"></a>
I2cMethod and I2cLockMethod
```
struct I2cMethod {
......@@ -78,6 +52,32 @@ struct I2cLockMethod {// Lock mechanism operation structure
</tbody>
</table>
## How to Develop<a name="section1085786591114257"></a>
The I2C module adaptation involves the following steps:
1. Instantiate the driver entry.
- Instantiate the **HdfDriverEntry** structure.
- Call **HDF\_INIT** to register the **HdfDriverEntry** instance with the HDF framework.
2. Configure attribute files.
- Add the **deviceNode** information to the **device\_info.hcs** file.
- \(Optional\) Add the **i2c\_config.hcs** file.
3. Instantiate the I2C controller object.
- Initialize **I2cCntlr**.
- Instantiate **I2cMethod** and **I2cLockMethod** in **I2cCntlr**.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>For details, see [I2cMethod and I2cLockMethod](#section1683458184518) and [Table 1](#table10549174014611).
4. Debug the driver.
- \(Optional\) For new drivers, verify basic functions, for example, verify the information returned after the connect operation and whether data is successfully transmitted.
## Development Example<a name="section1773332551114257"></a>
The following uses **i2c\_hi35xx.c** as an example to present the contents that need to be provided by the vendor to implement device functions.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册