Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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]).

void DFIOWrite(      
  volatile short* addr,
  unsigned int csbase,
  short value
); 

Parameters

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

Return Values

none.

Sample

Write to 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;
unsigned int csbase;

  CUSTOM_HW_REG16 = (volatile unsigned short *)DFIOMapSpace(CUSTOM_PA, 0x100, &csbase);
  DFIOWrite( CUSTOM_HW_REG16 , csbase, 0x1234);

Remarks

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

Requirements

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

See Also

DFIOMapSpace , DFIORead, Trizeps6 CPLD

  • No labels