Compartir a través de


HalTranslateBusAddress (Windows CE 5.0)

Send Feedback

This function translates a physical bus address to a physical system address.

BOOL HalTranslateBusAddress(INTERFACE_TYPEInterfaceType,ULONG BusNumber,PHYSICAL_ADDRESS BusAddress,PULONGAddressSpace,PPHYSICAL_ADDRESS TranslatedAddress );

Parameters

  • InterfaceType
    [in] Bus interface type. The upper bound on the types of buses supported is always MaximumInterfaceType.
  • BusNumber
    [in] Zero-based and system-assigned bus number for the device, used with InterfaceType to identify the bus for systems with more than one bus of the same type.
  • BusAddress
    [in] Bus-relative address.
  • AddressSpace
    [in, out] On input, an initialized PULONG. On output, a port number or a memory address. AddressSpace 0x0 indicates memory and AddressSpace 0x1 indicates I/O space.
  • TranslatedAddress
    [out] Pointer to the translated address.

Return Values

Returns TRUE if successful. Otherwise, it returns FALSE.

Remarks

You must use the value returned for TranslatedAddress in a subsequent call to MmMapIoSpace if the AddressSpace value returns 0, which indicates that it is a memory address.

You have many choices for connecting a peripheral bus into a system. The memory address space of the bus, or the logical address space, can directly merge with the physical address space of the host, or some mapping might be involved. In addition, some hardware platforms can have more than one bus, or a bus can have more than one address space. Also, some hardware platforms have a separate memory address space and I/O address space. Device drivers call HalTranslateBusAddress to perform this translation.

The parameters to this function include a bus number to support platforms with more than one bus of the same InterfaceType, the bus address to translate, and an AddressSpace value typically used to differentiate between memory and I/O space, if these are separate.

The TransBusAddrToVirtual function can be used instead of calling HalTranslateBusAddress and MmMapIoSpace. The TransBusAddrToVirtual function takes the necessary steps to convert a bus-relative address or I/O port into a virtual address.

Requirements

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

See Also

HalGetBusData | HalGetBusDataByOffset | HalSetBusData | HalSetBusDataByOffset | INTERFACE_TYPE | MmMapIoSpace | TransBusAddrToVirtual

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.