PCMCIA_MODIFY_MEMORY_WINDOW callback function (ntddpcm.h)
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.
Syntax
PCMCIA_MODIFY_MEMORY_WINDOW PcmciaModifyMemoryWindow;
BOOLEAN PcmciaModifyMemoryWindow(
[in, optional] PVOID Context,
[in] ULONGLONG HostBase,
[in] ULONGLONG CardBase,
[in] BOOLEAN Enable,
[in, optional] ULONG WindowSize,
[in, optional] UCHAR AccessSpeed,
[in, optional] UCHAR BusWidth,
[in, optional] BOOLEAN IsAttributeMemory
)
{...}
Parameters
[in, optional] Context
Pointer to the context for the interface routine.
[in] HostBase
Specifies the physical memory window to map. HostBase is the base address for the memory card in the system's physical address space.
[in] CardBase
Specifies the byte offset in the PC Card's or CardBus card's memory where the memory mapping begins.
[in] Enable
Specifies permission to access the memory window. If Enable is TRUE, memory access is permitted, otherwise memory access is not permitted.
[in, optional] 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.
[in, optional] AccessSpeed
Specifies the access speed of the PC Card or CardBus 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.
[in, optional] BusWidth
Specifies the width of bus access to the PCMCIA memory card. BusWidth must be one of the following values:
- PCMCIA_MEMORY_8BIT_ACCESS: If Enable is FALSE, BusWidth is not used.
- PCMCIA_MEMORY_16BIT_ACCESS
[in, optional] IsAttributeMemory
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.
Remarks
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.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | ntddpcm.h (include Ntddpcm.h) |
IRQL | <=DISPATCH_LEVEL (See Remarks section.) |