Share via


SDReadWriteRegistersDirect (Windows Embedded CE 6.0)

1/6/2010

This function reads from or writes to the registers of an SDIO card.

Syntax

SD_API_STATUS SDReadWriteRegistersDirect(
  SD_DEVICE_HANDLE hDevice,
  SD_IO_TRANSFER_TYPE ReadWrite,
  UCHAR Function,
  DWORD Address,
  BOOLEAN ReadAfterWrite,
  PUCHAR pBuffer,
  ULONG BufferLength
);

Parameters

  • hDevice
    [in] Handle to an SD bus device.
  • ReadWrite
    [in] Value that indicates whether to read from or write to the registers of an SDIO card. A value of SD_IO_READ indicates a read operation. A value of SD_IO_WRITE indicates a write operation.
  • Function
    [in] Function number.
  • Address
    [in] Starting register address for the read or write operation.
  • ReadAfterWrite
    [in] Value that indicates whether to perform a read operation following a write operation. If set to TRUE, a read is performed following a write operation. The read data is returned in pBuffer.
  • pBuffer
    [in, out] Buffer to hold register data.
  • BufferLength
    [in] Number of bytes to read or write.

Return Value

A return value of type SD_API_STATUS indicates success or failure.

Remarks

Direct I/O is intended for simple register access and requires a significant amount of overhead for each byte transferred. The preferred method for transferring large amounts of data is through the extended I/O command.

Requirements

Header sdcardddk.h
Library sdcardlib.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

Secure Digital Card Driver Functions