Share via


TransBusAddrToStatic

This function translates a bus-relative address to a system or logical address, then it creates a static, process independent, virtual address mapping for that location.

BOOL TransBusAddrToStatic(
  INTERFACE_TYPE InterfaceType,
  ULONG BusNumber,
  PHYSICAL_ADDRESS BusAddress,
  ULONG Length,
  PULONG AddressSpace,
  PPVOID MappedAddress
);

Parameters

  • InterfaceType
    [in] Element of INTERFACE_TYPE. Any bus type in the INTERFACE_TYPE enumeration is supported. You must implement that support in your CEDDK.dll file. Microsoft provides support for the PCI bus on some of the sample BSPs.
  • BusNumber
    [in] Bus number where the device resides.
  • BusAddress
    [in] Bus-relative address of registers and ports on the device.
  • Length
    [in] Number of bytes to map on the device.
  • AddressSpace
    [in, out] Flag to indicate whether what this function maps lives in I/O space or memory space
  • MappedAddress
    [out] Virtual address where this function mapped the physical address.

Return Values

Returns TRUE if successful. Returns FALSE if failure.

Remarks

This function is used so that functions in the interrupt context can access hardware. For example, when using installable ISRs, the ISR must be given a statically mapped address to the device it will access in the interrupt context. The ISR would need to access the device's registers in order to determine whether the device was interrupt source in a system with multiple sources per interrupt.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: CEDDK.h.
Link Library: CEDDK.lib.

See Also

INTERFACE_TYPE | MmUnmapIoSpace | Installable ISRs | Installable ISRs with Drivers | Implementing CEDDK.dll

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.