beautypg.com

Digilent Port Communications User Manual

Page 11

background image

Digilent, Inc

TM

DPCUTIL Programmer’s Manual

www.digilentinc.com

© Digilent, Inc.

Page

11 of 14

BOOL DpcGetReg(HANDLE hif, BYTE
bAddr, BYTE * pbData, ERC * perc, TRID *
ptrid)

Parameters
hif

-

handle to Data

interface
bAddr

-

address of

register to read Data byte
pbData

-

pointer to store

data byte read
perc

-

pointer to store

error code
ptrid

-

pointer to store

transaction ID. If ptrid is NULL, this
function will be blocking.

Return Values
Returns true if successful. Returns
false otherwise.

Description
Gets a single data byte from a register
specified by its address.


BOOL DpcPutRegSet(HANDLE hif, BYTE *
rgbAddr, BYTE * rgbData, int cbData, ERC *
perc,
TRID * ptrid)

Parameters
Hif

-

handle to

Data interface
rgbAddr

-

addresses of

registers to write Data bytes
rgbData

-

buffer with data

bytes to be sent
cbData

-

number of bytes

to be sent
perc

-

pointer to store

error code
ptrid

-

pointer to store

transaction ID. If ptrid is NULL, this
function will be

blocking.


Return Values
Returns true if successful. Returns
false otherwise.

Description

Sends many data bytes to many
specified addresses. RgbAddr is a
buffer containing addresses of
registers. RgbData is a buffer
containing data that will be sent to the
corresponding addresses. Each
element in the rgbData buffer is written
to the corresponding address in the
rgbAddr buffer. For example, the data
byte in rgbData[0] is written to the
register address in rgbAddr[0], the data
byte in rgbData[1] is written to the
register address in rgbAddr[1], etc.


BOOL DpcGetRegSet(HANDLE hif, BYTE *
rgbAddr, BYTE * rgbData, int cbData, ERC *
perc,
TRID * ptrid)

Parameters
hif

-

handle to Data

interface
rgbAddr

-

addresses of

registers to read Data bytes
rgbData

-

buffer to store

data bytes read
cbData

-

number of bytes

to be sent
perc

-

pointer to store

error code
ptrid

-

pointer to store

transaction ID. If ptrid is NULL, this
function will be

blocking.


Return Values
Returns true if successful. Returns
false otherwise.

Description
Gets many data bytes from many
specified addresses. RgbAddr is a
buffer containing addresses of
registers. RgbData is a buffer that will
contain data recieved from the registers
specified by the addresses in rgbAddr.
Each element in the rgbData buffer is
read from the corresponding address in
the rgbAddr buffer. For example, the
data byte in the register specified by
the address in rgbAddr[0] is written to