DFIORead

This is a helper function to allow easy access to external memory/chip-selects, when using Trizeps6 with onboard WLAN (when the WLAN-chip is configured to use D[15..8]).

short DFIORead( volatile short* addr, unsigned int csbase, );

Parameters

addr
address, within the address-range previously mapped with DFIOMapSpace.
csbase
csbase value returned by DFIOMapSpace.

Return Values

Returns value read from specified address.

Remarks

This routine can be used with all Trizeps6-modules. Even with ones without WLAN, where this function is not necessary and you can read the address directly.

Sample

Read from CS3 Space with A20 set….

#define CS3BASE_PA 0x88000000 #define A20 (1<<20) #define CUSTOM_PA (CS3BASE_PA+A20) volatile unsigned short *CUSTOM_HW_REG16, value; unsigned int csbase; CUSTOM_HW_REG16 = (volatile unsigned short *)DFIOMapSpace(CUSTOM_PA, 0x100, &csbase); value=DFIORead( CUSTOM_HW_REG16 , csbase);

Requirements

OS Versions: Windows Embedded CE 6 and later.
Header: drvlib_app.h.
Link Library: drvlib_app.lib.

See Also

DFIOMapSpace, DFIOWrite, Trizeps6 CPLD