Professional Documents
Culture Documents
Note: Header file xpctarget.h contains function prototypes for all xPC Target functions
Data Structures
Type
Structure
Structure Description
Members
xpcPCIDevice
BaseAddress[6]
VirtAddress[6]
Length[6]
AddressSpaceIndicator[6]
MemoryType[6]
Prefetchable[6]
InterruptLine
VendorId
DeviceId
SubDeviceId
SubVendorId
uint32_T
uint32_T
uint32_T
uint16_T
uint16_T
uint16_T
uint16_T
uint16_T
uint16_T
uint16_T
uint16_T
Member Description
xpcTime
U64.NanoSecondsLo
U64.NanoSecondsHi
uint32_T
uint32_T
Functions
Function Name
xpcInpB
xpcInpW
xpcInpDW
xpcOutpB
xpcOutpW
xpcOutpDW
xpcGetPCIDeviceInfo
Description
Returns value of byte input port
Returns value of word input port
Returns value of double word input port
Writes to byte output port
Writes to word output port
Writes to double word output port
Get PCI device information
Returns
uint8_T value
uint16_T value
uint32_T value
void
void
void
0: pass
int32_T
1: fail
xpcShowPCIDeviceInfo
xpcAllocPhysicalMemory
xpcFreePhysicalMemory
xpcReserveMemoryRegion
xpcGetElapsedTime
xpcSubtractTime
xpcBusyWait
xpcIsModelInit
void
void * physical
void
void * virtual
real_T seconds
real_T seconds
void
boolean_T load
Arguments
uint16_T port
uint16_T port
uint16_T port
uint16_T port, uint8_T value
uint16_T port, uint16_T value
uint16_T port, uint32_T value
uint16_T vendorId, uint16_T deviceId,
uint16_T subVendorId, uint16_T subDeviceId,
uint16_T bus, uint16_T slot, xpcPCIDevice *pciInfo
xpcPCIDevice *pciInfo
uint32_T numBytes
const void *physical
const void *physical, uint32_T numBytes, uint32_T access
xpcTime *upTime
xpcTime *time, const xpcTime *time2, const xpcTime *time1
real_T seconds
void
Description
Returns
Arguments
PCI
ISA
PreHookFunction
xpcPCIDevice *pciInfo
PostHookFunction
StartFunction
StopFunction
Runs after return from function call on interrupt, before model execution
Called before model begins execution to enable interrupts
Called after model termination to disable interrupts
int XPC_RUN_ISR
XPC_DROP_ISR
void
void
void
All members of
xpcPCIDevice
except VirtAddress
are provided.
Only
BaseAddress[0] of
xpcPCIDevice is
provided.
Macros
#define
Description
XPC_NO_VEND_DEV
XPC_NO_BUS_SLOT
XPC_RT_PG_USERREADWRITE
XPC_RUN_ISR
XPC_DROP_ISR
xpcPCIDevice *pciInfo
xpcPCIDevice *pciInfo
xpcPCIDevice *pciInfo