beautypg.com

Haltranslatebusaddress, Syntax, Remarks – Rockwell Automation 6182 SDK User Manual

Page 60: Return value, Portability

background image

4–20

RAC6182-Specific Extensions to the CE API

Publication 6182-UM002B-EN-P

HalTranslateBusAddress

This function translates the PCI Bus Address.

Syntax

#include
#include

BOOL HalTranslateBusAddress(

INTERFACE_TYPE InterfaceType,
ULONG BusNumber,

PHYSICAL_ADDRESS BusAddress,
PULONG AddressSpace,

PHYSICAL_ADDRESS TranslatedAddress

)

Remarks
HalTranslateBusAddress() converts a PCI memory or IO space address
into a physical address which may be used to map virtual address space
to the memory or IO using MmMapIoSpace().

Parameter

Description

InterfaceType

PCIBus is the only allowed

BusNumber

The RAC6182 PCI slot is on bus 1.

BusAddress

must have its upper 32 bits equal to 0, and lower 32
bits the PCI memory or IO space address obtained
from the PCI address space registers. Values from
PCI address space registers should have the non-
address bits such as I/O, prefetch, etc. masked off
before being put in the lower part of BusAddress

AddressSpace

set to 0 for memory, 1 for IO.

Translated Address

If parameters are valid, the function will return with a
value usable by MmMapIoSpace().

Return Value
One of the following: TRUE or FALSE.

Portability
The arguments to this function are specific to the RAC6182 hardware.

This manual is related to the following products: