2.17. WD_PcmciaControl()

Purpose

Modifies the settings of a PCMCIA bus controller.

Prototype
DWORD WD_PcmciaControl(
    HANDLE hWD,
    WD_PCMCIA_CONTROL *pPcmciaControl);
Parameters
NameTypeInput/Output
hWDHANDLEInput
pPcmciaControlWD_PCMCIA_CONTROL*Input
• dwOptionsDWORDN/A
• pcmciaSlotWD_PCMCIA_SLOTInput
 * uBusBYTEInput
 * uSocketBYTEInput
 * uFunctionBYTEInput
 * uPaddingBYTEN/A
• uAccessSpeedBYTEInput
• uBusWidthBYTEInput
• uVppLevelBYTEInput
• uReservedBYTEInput
• dwCardBaseDWORDInput
Description
NameDescription
hWDHandle to WinDriver's kernel-mode driver as received from WD_Open() [5.2]
pPcmciaControl PCMCIA bus controller information structure:
• pcmciaSlot A PCMCIA device location information structure, which can be acquired by calling WD_PcmciaScanCards() [2.5]
 * uBus Bus number (0 based)
 * uSocketSocket number (0 based)
 * uFunctionFunction number (0 based)
• uAccessSpeed The access speed to the PCMCIA bus.
Can be any of the following WD_PCMCIA_ACC_SPEED enumeration values:
WD_PCMCIA_ACC_SPEED_DEFAULT: Use the default access speed
WD_PCMCIA_ACC_SPEED_250NS: 250 ns
WD_PCMCIA_ACC_SPEED_200NS: 200 ns
WD_PCMCIA_ACC_SPEED_150NS: 150 ns
WD_PCMCIA_ACC_SPEED_1000NS: 100 ns
• uBusWidth The PCMCIA bus width. Can be any of the following WD_PCMCIA_ACC_WIDTH enumeration values:
WD_PCMCIA_ACC_WIDTH_DEFAULT: Use the default bus width
WD_PCMCIA_ACC_WIDTH_8BIT: 8 bit
WD_PCMCIA_ACC_WIDTH_16BIT: 16 bit
• uVppLevel The power level of the PCMCIA controller's Voltage Power Pin (Vpp). Can be any of the following WD_PCMCIA_VPP enumeration values:
WD_PCMCIA_VPP_DEFAULT: Use the default power level of the PCMCIA Vpp pin
WD_PCMCIA_VPP_OFF: Set the voltage on the Vpp pin to zero (disable)
WD_PCMCIA_VPP_ON: Set the voltage on the Vpp pin to 12V (enable)
WD_PCMCIA_VPP_AS_VCC: Set the voltage on the Vpp pin to equal that of the Vcc pin
• dwCardBase The offset in the PCMCIA device's memory from which the memory mapping begins
Return Value

Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise [A].

Example
WD_PCMCIA_CONTROL pcmciaControl;
BZERO(pcmciaControl);

pcmciaControl.pcmciaSlot = pcmciaSlot; /* pcmciaSlot received from
    WD_PcmciaScanDevices() */
pcmciaControl.uAccessSpeed = WD_PCMCIA_ACC_SPEED_DEFAULT;
pcmciaControl.uBusWidth = WD_PCMCIA_ACC_WIDTH_DEFAULT;
pcmciaControl.uVppLevel = WD_PCMCIA_VPP_AS_VCC;
pcmciaControl.dwCardBase = 0x0;

WD_PcmciaControl(hWD, &pcmciaControl);