提交 0bc963de 编写于 作者: A annie_wangli

update docs

Signed-off-by: Nannie_wangli <annie.wangli@huawei.com>
上级 645f39e0
# SDIO<a name="EN-US_TOPIC_0000001160653028"></a>
- [Overview](#section1155271783811)
- [Available APIs](#section12601496259)
- [Usage Guidelines](#section1878939192515)
- [How to Use](#section1490685512255)
- [Opening an SDIO Controller](#section10782428132616)
- [Claiming a Host Exclusively](#section11263172312715)
- [Enabling the SDIO Device](#section17861486271)
- [Claiming an SDIO IRQ](#section521213262286)
- [Performing SDIO Communication](#section85661522153420)
- [Releasing the SDIO IRQ](#section1683449352)
- [Disabling the SDIO Device](#section15379324143611)
- [Releasing the Exclusively Claimed Host](#section536018263713)
- [Closing an SDIO Controller](#section4752739183716)
- [Usage Example](#section376910122382)
## Overview<a name="section1155271783811"></a>
- Secure Digital Input/Output \(SDIO\) is a peripheral interface evolved from the Secure Digital \(SD\) memory card interface. The SDIO interface is compatible with SD memory cards and can be connected to devices that support the SDIO interface.
......
# SDIO<a name="EN-US_TOPIC_0000001199682295"></a>
- [Overview](#section1347805272150053)
- [How to Develop](#section581179475150053)
- [SdioDeviceOps](#section482911395315)
- [Development Example](#section2112250242150053)
## Overview<a name="section1347805272150053"></a>
......@@ -13,31 +8,9 @@ A Secure Digital Input Output \(SDIO\) card is an extension of the SD specificat
**Figure 1** Independent service mode<a name="fig124181331222"></a>
![](figures/independent-service-mode.png "independent-service-mode-12")
## How to Develop<a name="section581179475150053"></a>
The SDIO 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 **sdio\_config.hcs** file.
3. Instantiate the SDIO controller object.
- Initialize **SdioDevice**.
- Instantiate **SdioDeviceOps** in the **SdioDevice** object.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>For details, see [SdioDeviceOps](#section482911395315) and [Table 1](#table878215448417).
4. Debug the driver.
- \(Optional\) For new drivers, verify the basic functions, such as the SDIO control status and response to interrupts.
## Available APIs<a name="section752964871810"></a>
### SdioDeviceOps<a name="section482911395315"></a>
SdioDeviceOps
```
// Function template
......@@ -300,6 +273,30 @@ struct SdioDeviceOps {
>- **irqCap**: specifies the interrupt request \(IRQ\) capabilities.
>- **\(void \*\)data**
## How to Develop<a name="section581179475150053"></a>
The SDIO 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 **sdio\_config.hcs** file.
3. Instantiate the SDIO controller object.
- Initialize **SdioDevice**.
- Instantiate **SdioDeviceOps** in the **SdioDevice** object.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>For details, see [SdioDeviceOps](#section482911395315) and [Table 1](#table878215448417).
4. Debug the driver.
- \(Optional\) For new drivers, verify the basic functions, such as the SDIO control status and response to interrupts.
## Development Example<a name="section2112250242150053"></a>
The following uses **sdio\_adapter.c** as an example to present the contents that need to be provided by the vendor to implement device functions.
......
# SPI<a name="EN-US_TOPIC_0000001206171293"></a>
- [Overview](#section193356154511)
- [Available APIs](#section1325964832615)
- [Usage Guidelines](#section71363452477)
- [How to Use](#section32846814820)
- [Obtaining an SPI Device Handle](#section1927265711481)
- [Obtaining SPI Device Configuration Parameters](#section541133418493)
- [Setting SPI Device Configuration Parameters](#section7870106145010)
- [Performing SPI Communication](#section13324155195013)
- [Destroying the SPI Device Handle](#section19661632135117)
- [Usage Example](#section06541058155120)
## Overview<a name="section193356154511"></a>
- Serial Peripheral Interface \(SPI\) is a serial bus specification used for high-speed, full-duplex, and synchronous communication.
......
# SPI<a name="EN-US_TOPIC_0000001199690327"></a>
- [Overview](#section84922229152909)
- [Available APIs](#section752964871810)
- [How to Develop](#section799667984152909)
- [Development Example](#section956157227152909)
## Overview<a name="section84922229152909"></a>
......
# UART<a name="EN-US_TOPIC_0000001160652800"></a>
- [Overview](#section833012453535)
- [Available APIs](#section1928742202715)
- [Usage Guidelines](#section12779050105412)
- [How to Use](#section1858116395510)
- [Obtaining a UART Device Handle](#section124512065617)
- [Setting the UART Baud Rate](#section86881004579)
- [Obtaining the UART Baud Rate](#section897032965712)
- [Setting the UART Device Attributes](#section129141884588)
- [Obtaining UART Device Attributes](#section18689637165812)
- [Setting the UART Transmission Mode](#section72713435918)
- [Writing Data of a Specified Length into a UART Device](#section128001736155919)
- [Reading Data of a Specified Length from a UART Device](#section92851601604)
- [Destroying the UART Device Handle](#section1477410521406)
- [Usage Example](#section35404241311)
## Overview<a name="section833012453535"></a>
- The Universal Asynchronous Receiver/Transmitter \(UART\) is a universal serial data bus used for asynchronous communication. It enables bi-directional communication between devices in full-duplex mode.
......
......@@ -13,31 +13,9 @@ In the Hardware Driver Foundation \(HDF\) framework, the Universal Asynchronous
**Figure 1** Independent service mode<a name="fig1474518243468"></a>
![](figures/independent-service-mode.png "independent-service-mode-14")
## How to Develop<a name="section944397404154520"></a>
The UART 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 **uart\_config.hcs** file.
3. Instantiate the UART controller object.
- Initialize **UartHost**.
- Instantiate **UartHostMethod** in the **UartHost** object.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>For details, see [UartHostMethod](#section192316441461) and [Table 1](#table22862114719).
## Available APIs<a name="section752964871810"></a>
4. Debug the driver.
- \(Optional\) For new drivers, verify the basic functions, such as the UART control status and response to interrupts.
### UartHostMethod<a name="section192316441461"></a>
UartHostMethod
```
struct UartHostMethod {
......@@ -190,6 +168,30 @@ struct UartHostMethod {
</tbody>
</table>
## How to Develop<a name="section944397404154520"></a>
The UART 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 **uart\_config.hcs** file.
3. Instantiate the UART controller object.
- Initialize **UartHost**.
- Instantiate **UartHostMethod** in the **UartHost** object.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>For details, see [UartHostMethod](#section192316441461) and [Table 1](#table22862114719).
4. Debug the driver.
- \(Optional\) For new drivers, verify the basic functions, such as the UART control status and response to interrupts.
## Development Example<a name="section774610224154520"></a>
The following uses **uart\_hi35xx.c** as an example to present the contents that need to be provided by the vendor to implement device functions.
......
# Watchdog<a name="EN-US_TOPIC_0000001206372825"></a>
- [Overview](#section14918241977)
- [Available APIs](#section1180575010271)
- [Usage Guidelines](#section10103184312813)
- [How to Use](#section10181195910815)
- [Opening a Watchdog](#section66089201107)
- [Obtaining the Watchdog Status](#section786624341011)
- [Setting the Timeout Duration](#section182386137111)
- [Obtaining the Timeout Duration](#section1883310371114)
- [Starting a Watchdog](#section82501405123)
- [Feeding a Watchdog](#section3547530101211)
- [Stopping a Watchdog](#section944595841217)
- [Closing a Watchdog](#section96561824121311)
- [Usage Example](#section1724514523135)
## Overview<a name="section14918241977"></a>
A watchdog, also called a watchdog timer, is a hardware timing device. If an error occurs in the main program of the system and fails to reset the watchdog timer, the watchdog timer sends a reset signal to restore the system to a normal state.
......
# Watchdog<a name="EN-US_TOPIC_0000001199821009"></a>
- [Overview](#section1315827527160117)
- [How to Develop](#section477974542160117)
- [WatchdogMethod](#section220331929)
- [Development Example](#section1832270347160117)
## Overview<a name="section1315827527160117"></a>
......@@ -13,31 +8,9 @@ In the Hardware Driver Foundation \(HDF\) framework, the Watchdog \(also called
**Figure 1** Independent service mode<a name="fig61584136211"></a>
![](figures/independent-service-mode.png "independent-service-mode-15")
## How to Develop<a name="section477974542160117"></a>
The Watchdog module adaptation involves the following steps:
## Available APIs<a name="section1180575010271"></a>
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 **watchdog\_config.hcs** file.
3. Instantiate the Watchdog controller object.
- Initialize **WatchdogCntlr**.
- Instantiate **WatchdogMethod** in the **WatchdogCntlr** object.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>For details, see [WatchdogMethod](#section220331929) and [Table 1](#table1370451732).
4. Debug the driver.
- \(Optional\) For new drivers, verify basic functions, for example, verify the information returned after the connect operation and whether the watchdog timer is successfully set.
### WatchdogMethod<a name="section220331929"></a>
WatchdogMethod
```
struct WatchdogMethod {
......@@ -137,6 +110,31 @@ struct WatchdogMethod {
</tbody>
</table>
## How to Develop<a name="section477974542160117"></a>
The Watchdog 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 **watchdog\_config.hcs** file.
3. Instantiate the Watchdog controller object.
- Initialize **WatchdogCntlr**.
- Instantiate **WatchdogMethod** in the **WatchdogCntlr** object.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>For details, see [WatchdogMethod](#section220331929) and [Table 1](#table1370451732).
4. Debug the driver.
- \(Optional\) For new drivers, verify basic functions, for example, verify the information returned after the connect operation and whether the watchdog timer is successfully set.
## Development Example<a name="section1832270347160117"></a>
The following uses **watchdog\_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.
先完成此消息的编辑!
想要评论请 注册