User`s guide

6 Custom xPC Target™ Driver Notes
Structure
struct bdregs {
volatile int reg1;
volatile int reg2;
etc.
};
struct bdregs *regs = pciInfo.Virtua lAdd ress[1];
regs->reg1 = 0x1234; // Sets reg1 to t hat value
regs->reg2 = 0x56789abc;
etc.
If your hardware uses registers with different lengths, it might be easier to
use the structure m ethod.
Array
#define REG1 0
#define REG2 1
etc.
volatile int *aregs = pciInfo.Virtua lAdd ress[1];
aregs[REG1] = 0x1234;
aregs[REG2] = 0x56789abc;
6-8