next up previous contents
Next: 2.18 InterruptEnable() Up: 2. WD_xxx PCI/PCMCIA/ISA Functions Previous: 2.16 WD_DMASyncIo()   Contents


2.17 WD_PcmciaControl()


PURPOSE

$\bullet$Modifies the settings of a PCMCIA bus controller.


PROTOTYPE

DWORD WD_PcmciaControl(
    HANDLE hWD,
    WD_PCMCIA_CONTROL *pPcmciaControl);


PARAMETERS

Name Type Input/Output
$\bullet$hWD HANDLE Input
$\bullet$pPcmciaControl WD_PCMCIA_CONTROL* Input
$\gg$dwOptions DWORD N/A
$\gg$pcmciaSlot WD_PCMCIA_SLOT Input
$\diamond$uBus BYTE Input
$\diamond$uSocket BYTE Input
$\diamond$uFunction BYTE Input
$\diamond$uPadding BYTE N/A
$\gg$uAccessSpeed BYTE Input
$\gg$uBusWidth BYTE Input
$\gg$uVppLevel BYTE Input
$\gg$uReserved BYTE Input
$\gg$dwCardBase DWORD Input


DESCRIPTION

Name Description
hWD Handle to WinDriver's kernel-mode driver as received from WD_Open() [5.2]
pPcmciaControl PCMCIA bus controller information structure:
$\bullet$ pcmciaSlot A PCMCIA device location information structure, which can be acquired by calling WD_PcmciaScanCards() [2.5]
$\gg$ uBus Bus number (0 based)
$\gg$ uSocket Socket number (0 based)
$\gg$ uFunction Function number (0 based)
$\bullet$ uAccessSpeed The access speed to the PCMCIA bus.
Can be any of the following WD_PCMCIA_ACC_SPEED enumeration values:
$\bullet$WD_PCMCIA_ACC_SPEED_DEFAULT: Use the default access speed
$\bullet$WD_PCMCIA_ACC_SPEED_250NS: 250 ns
$\bullet$WD_PCMCIA_ACC_SPEED_200NS: 200 ns
$\bullet$WD_PCMCIA_ACC_SPEED_150NS: 150 ns
$\bullet$WD_PCMCIA_ACC_SPEED_1000NS: 100 ns
$\bullet$ uBusWidth The PCMCIA bus width. Can be any of the following WD_PCMCIA_ACC_WIDTH enumeration values:
$\bullet$WD_PCMCIA_ACC_WIDTH_DEFAULT: Use the default bus width
$\bullet$WD_PCMCIA_ACC_WIDTH_8BIT: 8 bit
$\bullet$WD_PCMCIA_ACC_WIDTH_16BIT: 16 bit
$\bullet$ uVppLevel The power level of the PCMCIA controller's Voltage Power Pin (Vpp). Can be any of the following WD_PCMCIA_VPP enumeration values:
$\bullet$WD_PCMCIA_VPP_DEFAULT: Use the default power level of the PCMCIA Vpp pin
$\bullet$WD_PCMCIA_VPP_OFF: Set the voltage on the Vpp pin to zero (disable)
$\bullet$WD_PCMCIA_VPP_ON: Set the voltage on the Vpp pin to 12V (enable)
$\bullet$WD_PCMCIA_VPP_AS_VCC: Set the voltage on the Vpp pin to equal that of the Vcc pin
$\bullet$ 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 recieved 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);


next up previous contents
Next: 2.18 InterruptEnable() Up: 2. WD_xxx PCI/PCMCIA/ISA Functions Previous: 2.16 WD_DMASyncIo()   Contents