EasyManuals Logo
Home>PICO>Data Loggers>USB TC-08

PICO USB TC-08 User Manual

PICO USB TC-08
43 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #18 background imageLoading...
Page #18 background image
USB TC-08 Help
17
© 2005 Pico Technology Limited. All rights reserved.
USBTC08044-2
// Start using the open units
//
3.3.2.2
usb_tc08_open_unit_async
short usb_tc08_open_unit_async (void)
This routine begins enumerating USB TC-08 units in the background and provides a
return immediately, so the calling thread can continue executing other code.
Note: The driver is thread safe and will not allow access to a single unit from more than
one application. If, therefore,
usb_tc08_open_unit_async
does not find a unit, check
that other applications are not using the same USB TC-08. This includes applications on
other user accounts on the same computer, where fast user switching is supported.
Arguments
None
Returns:
1
- The call was successful.
0
- No more units were found.
-1
- An error occurred, call
usb_tc08_get_last_error
with a handle of 0 to
obtain the error code.
Example
The following code is a fragment of a C application which demonstrates how to open a
single unit with the asynchronous open unit functions:
//======================================================
// Opening a unit asynchronously
//======================================================
// Tell the driver to start enumerating the unit in the background
// (usb_tc08_open_unit_async returns immediately)
result =
usb_tc08_open_unit_async
();
// handle any error conditions
if
(result == -
1
)
{
error_code =
usb_tc08_get_last_error
(
0
);
printf(
"Unit failed to open\nThe error code is %d"
, error_code);
// could terminate the application here
}
else
if
(result ==
0
)
{
printf(
"No USB TC08 units found"
);
// could terminate the application here
}
// No errors, so start polling usb_tc08_open_unit_progress
// continuously for its enumeration state
do
{
result =
usb_tc08_open_unit_progress
(&handle, &progress);
switch
(result)
{

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the PICO USB TC-08 and is the answer not in the manual?

PICO USB TC-08 Specifications

General IconGeneral
BrandPICO
ModelUSB TC-08
CategoryData Loggers
LanguageEnglish