1 Star 0 Fork 4.9K

bill / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
sdiooverview.md 11.54 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-03-12 17:59 . !197 Docs Update version 1.0.1

SDIO Overview

Introduction

  • 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 is widely used. Currently, many smartphones support SDIO, and many SDIO peripherals are developed for connections to smartphones. Common SDIO peripherals include WLAN, GPS, cameras, and Bluetooth.

  • The SDIO bus has two ends, named host and device. All communication starts when the host sends a command. The device can communicate with the host as long as it can parse the command of the host. An SDIO host can connect to multiple devices, as shown in the figure below.

    • CLK signal: clock signal sent from the host to the device
    • VDD signal: power signal
    • VSS signal: ground signal
    • D0-3 signal: four data lines. The DAT1 signal cable is multiplexed as the interrupt line. In 1-bit mode, DAT0 is used to transmit data. In 4-bit mode, DAT0 to DAT3 are used to transmit data.
    • CMD signal: used by the host to send commands and the device to respond to commands.

    Figure 1 Connections between the host and devices in SDIO

  • The SDIO interface defines a set of common methods for operating an SDIO device, including opening and closing an SDIO controller, exclusively claiming and releasing the host, enabling and disabling devices, claiming and releasing an SDIO IRQ, reading and writing data based on SDIO, and obtaining and setting common information.

Available APIs

Table 1 APIs available for the SDIO driver

Capability

Function

Description

SDIO device opening/closing

SdioOpen

Opens an SDIO controller with a specified bus number.

SdioClose

Closes an SDIO controller.

SDIO reading/writing

SdioReadBytes

Incrementally reads a given length of data from a specified SDIO address.

SdioWriteBytes

Incrementally writes a given length of data into a specified SDIO address.

SdioReadBytesFromFixedAddr

Reads a given length of data from a fixed SDIO address.

SdioWriteBytesToFixedAddr

Writes a given length of data into a fixed SDIO address.

SdioReadBytesFromFunc0

Reads a given length of data from the address space of SDIO function 0.

SdioWriteBytesToFunc0

Writes a given length of data into the address space of SDIO function 0.

SDIO block size setting

SdioSetBlockSize

Sets the block size.

SDIO common information retrieval/setting

SdioGetCommonInfo

Obtains common information.

SdioSetCommonInfo

Sets common information.

SDIO data flushing

SdioFlushData

Flushes data.

SDIO host exclusively claiming or releasing

SdioClaimHost

Claims a host exclusively.

SdioReleaseHost

Releases the exclusively claimed host.

SDIO device enablement

SdioEnableFunc

Enables an SDIO device.

SdioDisableFunc

Disables an SDIO device.

SDIO IRQ claiming/releasing

SdioClaimIrq

Claims an SDIO IRQ.

SdioReleaseIrq

Releases an SDIO IRQ.

NOTE: All functions provided in this document can be called only in kernel mode.

1
https://gitee.com/ximeibaba/docs.git
git@gitee.com:ximeibaba/docs.git
ximeibaba
docs
docs
master

搜索帮助