Client Driver Bus Requests (Windows CE 5.0)

Send Feedback

A Secure Digital (SD) client driver uses bus requests to send commands to and receive responses from an SD card. A bus request contains information the SD card stack uses to:

  • Control the sending of commands to an SD card.
  • Control the transmission or reception of any data associated with a command.

The SDBusRequest function provides a client driver with the ability to send bus requests to a card asynchronously. The parameters used for the synchronous and asynchronous functions are broadly similar. The CommandCode parameter is the command, as defined by the SD specification, that is to be sent to the card. The CommandArgument parameter is the 32-bit optional argument, as defined by the SD specifications, for the current command.

All SD commands, except CMD0, cause the card to send a response. Some commands also cause the card to send data. Other commands cause the card to prepare to receive data.

The TransferClass parameter indicates to SDBusRequest which category the current command falls into. The following list shows these categories:

  • SD_COMMAND****indicates a command or response transfer.
  • SD_READ****indicates a command, response, or data read transfer.
  • SD_WRITE indicates a command, response, or data write transfer.

The ResponseType parameter indicates the expected SD response type for the command.

Data is transferred to the SD card in blocks. The size and number of these blocks is required for a bus transaction. The *pBlockBuffer*****parameter points to a buffer that has sufficient storage for the specified number of blocks.

Some command types require special handling in the bus driver. A client driver can indicate these special cases using bus request flags.

The synchronous and asynchronous bus request functions contain the optional Flags parameter. The Flags parameter allows a Secure Digital (SD) client driver to indicate that the request requires some special handling in the bus driver, specific to the command type. If the bus driver does not require and special handling, this parameter should be set to zero .

See Also

Secure Digital Card Client Driver | SDBusRequest | Synchronous Bus Requests | Asynchronous Bus Requests

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.