Digilent Port Communications User Manual
Page 5

Digilent, Inc
TM
DPCUTIL Programmer’s Manual
www.digilentinc.com
© Digilent, Inc.
Page
5 of 14
Description
This function performs startup
initialization of the DLL. It must be
called before any of the other API calls
can be used.
void DpcTerm()
Parameters
none
Return Values
none
Description
This function must be called to clean up
resources when the application is done
using
the DLL.
API Transaction and Utility calls
BOOL DpcStartNotify (HWND hwnd, WORD
idNotify, ERC *perc)
Parameters
hwnd
-
handle of window
that is to be sent notification messages
idNotify
-
message
identifier to be sent upon device table
change
perc
-
pointer to store
error code
Return Values
Returns true if successful. Returns
false otherwise.
Description
Used to register a window handle for
being notified of device table changes.
When a change (deletion, addition, or
modification) occurs in the device table,
all registered windows are sent their
specified messages.
BOOL DpcEndNotify (HWND hwnd, ERC
*perc)
Parameters
hwnd
-
handle of window
that is to no longer be sent notification
messages
perc
-
pointer to store
error code
Return Values
Returns true if successful. Returns
false otherwise.
Description
De-registers a specified window handle
from being notified of device table
changes
BOOL DpcPendingTransactions(HANDLE hif,
int * pctran, ERC *perc)
Parameters
hif
-
handle to JTAG
interface
pctran
-
pointer to store
number of pending transactions
perc
-
pointer to store
error code
Return Values
Returns true if any non-blocking
transactions are pending.
Description
Used to check if non-blocking
transactions are still pending. If the
function returns true, the number of
non-blocking, pending transactions is
returned by reference in pctran.
BOOL DpcQueryConfigStatus(HANDLE hif,
TRID trid, TRS * ptrs, ERC * perc)
Parameters
hif
-
handle to JTAG
interface
trid
-
transaction ID to
query. If 0, then the status of the oldest
transaction is
queried.
ptrs
-
pointer to store
information about transaction
perc
-
pointer to store
error code
Return Values
Returns true if transaction ID is found.
Returns false otherwise.