Technical reference
18
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
"Unit failed to open\nThe error code is %d"
// could terminate the application here
USBTC08_PROGRESS_PENDING:
"\nThe unit is %d percent enumerated"
// wait for approx. half a second
USBTC08_PROGRESS_COMPLETE:
"\n\nThe unit with handle '%d', opened successfully"
(result == USBTC08_PROGRESS_PENDING);
// Start using the open unit
3.3.2.3
usb_tc08_open_unit_progress
short usb_tc08_open_unit_progress( short * handle,
. Repeatedly call it to determine
the state of the background enumeration process. For an example of usage, see
(Out) A handle (positive short) to the unit if the enumeration
is completed. Handle will always be 0 if the enumeration is
(Out) (Optional - can pass NULL) returns a number from 0 to
100 representing the percentage completion of the
-1 (USBTC08_PROGRESS_FAIL)
handle of 0 to obtain the error
0 (USBTC08_PROGRESS_PENDING)
Enumeration has not completed
usb_tc08_open_unit_progres
1 (USBTC08_PROGRESS_COMPLETE)
Enumeration has completed and