Digilent Port Communications User Manual
Page 10
Digilent, Inc
TM
DPCUTIL Programmer’s Manual
www.digilentinc.com
© Digilent, Inc.
Page
10 of 14
rgbRcv [0]
TDO 8
TDO 7
TDO 6
TDO 5
TDO 4
TDO 3
TDO 2
TDO 1
rgbRcv [1]
TDO 16
TDO
15
TDO
14
TDO
13
TDO
12
TDO
11
TDO
10
TDO 9
Shifts out and returns a specified
number of bits from TDO. Each bit is
shifted out sequentially starting at the
first element in the rgbRcv, from lowest
significant bit to most significant bit.
Below is an example of how the TDO
bits are placed in each byte of rgbSend.
TDI and TMS are held at the values
specified in bitTdi and bitTms while bits
are shifted out of TDO.
API Data Transfer calls
BOOL DpcOpenData(HANDLE * phif, char *
szdvc, ERC * perc, TRID * ptrid)
Parameters
phif
-
pointer to store
handle to Data interface
szdvc
-
name of device
to open
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
Opens the data transfer interface for
access. No other data transfer
functions can be used until a
communications device has been
opened. The communications device is
specified by the name assigned to it in
the device table and this name is
placed in szdvc. The handle to the
data transfer interface is returned by
reference in phif.
BOOL DpcCloseData(HANDLE hif, ERC *
perc)
Parameters
hif
-
handle to Data
interface
perc
-
pointer to store
error code
Return Values
Returns true if successful. Returns
false otherwise.
Description
Releases the data transfer interface
specified by hif and closes the
communications module.
BOOL DpcPutReg(HANDLE hif, BYTE bAddr,
BYTE bData, ERC * perc, TRID * ptrid)
Parameters
hif
-handle to Data interface
bAddr -address of register to send data
byte
bData -data byte to send to address
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 a single data byte to a register
specified by its address.