SDBUS_REQUEST_PACKET structure
The SDBUS_REQUEST_PACKET structure specifies the parameters for the individual requests and commands that the SdBusSubmitRequest routine sends to the bus driver.
Syntax
typedef struct _SDBUS_REQUEST_PACKET {
SD_REQUEST_FUNCTION RequestFunction;
PVOID UserContext[3];
ULONG_PTR Information;
union {
UCHAR AsUCHAR[16];
ULONG AsULONG[4];
SDRESP_TYPE3 Type3;
} ResponseData;
UCHAR ResponseLength;
union {
struct {
SDBUS_PROPERTY Property;
PVOID Buffer;
ULONG Length;
} GetSetProperty;
struct {
SDCMD_DESCRIPTOR CmdDesc;
ULONG Argument;
PMDL Mdl;
ULONG Length;
} DeviceCommand;
} Parameters;
} SDBUS_REQUEST_PACKET, *PSDBUS_REQUEST_PACKET;
Members
RequestFunction
Contains an enumeration value of type SD_REQUEST_FUNCTION that specifies the parameters for the operation and how they are interpreted.UserContext
Contains a buffer area for optional use by the caller. The bus driver does not use this member.Information
Contains the status of the request on output.ResponseData
AsUCHAR
Contains a maximum of 16 bytes of response data on output. For more information about the response data, see the Secure Digital (SD) specification.AsULONG
Contains a maximum of 16 bytes of response data on output. For more information about the response data, see the Secure Digital (SD) specification.
ResponseLength
Indicates the length, in bytes, of the response data.Parameters
GetSetProperty
Property
Contains an enumeration value of type SDBUS_PROPERTY that specifies the property to read or change.Buffer
Contains the property data to write in operations that set a property. Contains the data read from the property in operations that retrieve the data associated with a property.Length
Indicates the length, in bytes, of the response data.
DeviceCommand
CmdDesc
Contains a structure of type SDCMD_DESCRIPTOR that defines an SD card command.Argument
Contains 4 bytes of argument information that accompanies the command.Mdl
Pointer to an MDL that holds the command data.Length
Indicates the length, in bytes, of the response data.
Remarks
If the request reads or sets a property on an SD device, a device driver must complete the following steps:
Set the RequestFunction member of SDBUS_REQUEST_PACKET to an SD_REQUEST_FUNCTION enumeration value of either SDRF_GET_PROPERTY or SDRF_SET_PROPERTY.
Set the Property member of SDBUS_REQUEST_PACKET to the SDBUS_PROPERTY enumeration value that specifies the property to read or change.
Send the request to the bus driver by passing the initialized SDBUS_REQUEST_PACKET structure to either SdBusSubmitRequest or SdBusSubmitRequestAsync.
If the request sends a command to an SD device, a device driver must complete the following steps:
Set the RequestFunction member of SDBUS_REQUEST_PACKET to an SD_REQUEST_FUNCTION enumeration value of SDRF_DEVICE_COMMAND.
Initialize the CmdDesc member of SDBUS_REQUEST_PACKET to define the command.
Send the request to the bus driver by passing the initialized SDBUS_REQUEST_PACKET structure to either SdBusSubmitRequest or SdBusSubmitRequestAsync.
To do property operations, the driver must initialize the GetSetProperty.Property, GetSetProperty.Buffer, and GetSetProperty.Length members of the SDBUS_REQUEST_PACKET structure before submitting the request.
To send a command, the driver must initialize the DeviceCommand.CmdDesc, DeviceCommand.Argument, DeviceCommand.Mdl, and DeviceCommand.Length members of the SDBUS_REQUEST_PACKET structure before submitting the request.
Requirements
Header |
Ntddsd.h (include Ntddsd.h) |
See also