Share via


TransBusAddrToStatic (Windows Embedded CE 6.0)

1/6/2010

This function is deprecated. Use BusTransBusAddrToStatic instead. This function translates a bus address to a physical system address. Then, it creates a static, process independent, virtual address mapping for that location.

Syntax

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 in some of the sample board support packages (BSPs).
  • BusNumber
    [in] Bus number where the device resides.
  • BusAddress
    [in] Bus-relative address of registers and ports on the device. The PHYSICAL_ADDRESS is represented by 40 bits. TransBusAddrToStatic calls CreateStaticMapping, which right-shifts (>>) the 40-bit address by 8 bits.
  • Length
    [in] Number of bytes to map on the device.
  • AddressSpace
    [in, out] Flag to indicate whether what this function maps to is in I/O space or memory space. On input, this is an initialized variable. On output, this is the flag. AddressSpace 0x0 indicates memory, and AddressSpace 0x1 indicates I/O space.
  • MappedAddress
    [out] Virtual address where this function mapped the physical address.

Return Value

Returns TRUE if successful. Returns FALSE if not successful.

Remarks

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

Requirements

Header ceddk.h
Library CEDDK.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

CEDDK Dynamic-Link Library Address Mapping Functions
BusTransBusAddrToStatic
INTERFACE_TYPE
MmUnmapIoSpace

Concepts

Installable ISRs and the Kernel
Installable ISRs and Device Drivers

Other Resources

CreateStaticMapping