Freigeben über


TransBusAddrToStatic (Windows CE 5.0)

Send Feedback

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.

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 Values

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

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

See Also

Installable ISRs | Installable ISRs with Drivers | BusTransBusAddrToStatic | CreateStaticMapping | INTERFACE_TYPE | MmUnmapIoSpace

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.