Previous Next

PCMCIA_MODIFY_MEMORY_WINDOW

The PCMCIA_MODIFY_MEMORY_WINDOW interface routine sets the attributes of a memory window for a PCMCIA memory card. The memory window is mapped by the PCMCIA bus driver.

BOOLEAN
  (*PPCMCIA_MODIFY_MEMORY_WINDOW)(
    IN PVOID  Context,
    IN PHYSICAL_MEMORY  HostBase,
    IN PHYSICAL_MEMORY  CardBase,
    IN BOOLEAN  Enable,
    IN ULONG  WindowSize,
    IN UCHAR  AccessSpeed,
    IN UCHAR  BusWidth,
    IN BOOLEAN  AttributeMemory
    );

Parameters

Context
Pointer to the context for the interface routine.
HostBase
Specifies the physical memory window to map. HostBase is the base address for the memory card in the system's physical address space.
CardBase
Specifies the byte offset in the PCMCIA card's memory where the memory mapping begins.
Enable
Specifies permission to access the memory window. If Enable is TRUE, memory access is permitted, otherwise memory access is not permitted.
WindowSize
Specifies the size, in bytes, of the memory window that is mapped. The value of WindowSize cannot exceed the memory window granted to the driver in its assigned resources. If the value of Enable is TRUE and the value of WindowSize is zero, the size of the memory window granted to the driver in its assigned resources is used. If Enable is FALSE, WindowSize is not used.
AccessSpeed
Specifies the access speed of the PCMCIA card. The value of AccessSpeed is encoded as specified by the PC Card Standard, Release 6.1. If Enable is FALSE, AccessSpeed is not used.
BusWidth
Specifies the width of bus access to the PCMCIA memory card. BusWidth must be one of the following values:
PCMCIA_MEMORY_8BIT_ACCESS
PCMCIA_MEMORY_16BIT_ACCESS

If Enable is FALSE, BusWidth is not used.

AttributeMemory
Must be FALSE for common memory and TRUE for attribute memory.

Return Value

The PCMCIA_MODIFY_MEMORY_WINDOW interface routine returns TRUE if the memory window is successfully enabled or disabled, as specified by the Enable parameter.

Headers

Declared in ntddpcm.h. Include ntddpcm.h.

Comments

A caller must set the Context parameter to the context that is specified by the PCMCIA bus driver. The PCMCIA bus driver returns the context for the interface routines in the Context member of the same PCMCIA_INTERFACE_STANDARD structure that contains the pointers to the interface routines. If the Context parameter is not valid, system behavior is not defined, and the system might halt.

Callers of this routine must be running at IRQL <= DISPATCH_LEVEL. To maintain overall system performance, it is recommended that drivers call this routine at IRQL < DISPATCH_LEVEL.

See Also

PCMCIA_IS_WRITE_PROTECTED, PCMCIA_SET_VPP, PCMCIA_INTERFACE_STANDARD