PURPOSE
Reads/writes from/to the PCMCIA attribute space of a selected
PCMCIA card. The PCMCIA attribute space contains the Card Information
Structure (CIS).
PROTOTYPE
DWORD WD_PcmciaConfigDump(
HANDLE hWD,
WD_PCMCIA_CONFIG_DUMP *pPcmciaConfig);
PARAMETERS
| Name | Type | Input/Output |
|---|---|---|
| HANDLE | Input | |
| WD_PCMCIA_CONFIG_DUMP* | ||
| WD_PCMCIA_SLOT | ||
| BYTE | Input | |
| BYTE | Input | |
| BYTE | Input | |
| BYTE | N/A | |
| PVOID | Input/Output | |
| DWORD | Input | |
| DWORD | Input | |
| DWORD | Input | |
| DWORD | Output | |
| DWORD | Input |
DESCRIPTION
| Name | Description |
|---|---|
| hWD | Handle to WinDriver's kernel-mode driver as received from WD_Open() [5.2] |
| pPcmciaConfig | Pointer to a PCMCIA attribute space information structure: |
| PCMCIA slot information structure: | |
| PCMCIA bus number (0 based) | |
| PCMCIA slot number (0 based) | |
| PCMCIA function number (0 based) | |
| Padding of 1 byte (reserved) | |
| A pointer to the data that is read from the PCMCIA attribute space (if fIsRead is TRUE) or a pointer to the data to write to the PCMCIA attribute space (if fIsRead is FALSE) | |
| The offset of the specific register(s) in the PCMCIA attribute space to read/write from/to | |
| Number of bytes to read/write | |
| If TRUE - read from the PCMCIA attribute space;
If FALSE - write to the PCMCIA attribute space |
|
| Result of the PCMCIA attribute space read/write. Can be
any of the following PCMCIA_ACCESS_RESULT
enumeration values: |
|
| Should always be set to 0 (reserved for future use) |
RETURN VALUE
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise [A].
EXAMPLE
WD_PCMCIA_CONFIG_DUMP pcmciaConfig; DWORD dwStatus; WORD aBuffer[2];
BZERO(pcmciaConfig); pcmciaConfig.pcmciaSlot.uBus = 0; pcmciaConfig.pcmciaSlot.uSocket = 0; pcmciaConfig.pcmciaSlot.uFunction = 0; pcmciaConfig.pcmciaSlot.uPadding = 0; pcmciaConfig.pBuffer = aBuffer; pcmciaConfig.dwOffset = 0; pcmciaConfig.dwBytes = sizeof(aBuffer); pcmciaConfig.fIsRead = TRUE;
dwStatus = WD_PcmciaConfigDump(hWD, &pcmciaConfig);
if (dwStatus)
{
printf("WD_PcmciaConfigDump failed: %s\n", Stat2Str(dwStatus));
}
else
{
printf("Card in Bus 0, Socket 0: the code of the first tuple in"
" the CIS is %x\n", (UINT32)aBuffer[0]);
}