User`s guide

Driver Formats & Routines
11
Copyright © 1995-2007 Pico Technology. All rights reserved. adc1042.en-2
4.2
Procedures
4.2.1
adc10_get_driver_version
short adc10_get_driver_version (void)
This routine returns the version number of the ADC-10 driver. You can use it to check
that your application is used only with the driver version that it was designed for use
with.
Generally speaking, new driver versions will be fully backward compatible with earlier
versions, though the converse is not always true, so it should be safe to check that
the driver version is greater than or equal to the version that it was designed for use
with.
The version is a two-byte value, of which the upper byte is the major version and the
lower byte is the minor version.
4.2.2
adc10_open_unit
short adc10_open_unit
(
short port,
short product
)
This routine opens the ADC-10 driver.
If possible, it checks the BIOS printer address table and gets the address of the
specified printer port. If not, it assumes that the printer ports 1..3 are at 0x378,
0x278 and 0x3BC.
It then calibrates the timing functions for the computer. It returns TRUE if successful.
If it is not successful, you can call adc10_get_unit_info to find out why it failed.
Arguments
port The number of the parallel port or USB port that the ADC-10 is
connected to:
1 - LPT1
2 - LPT2 etc
101 - USB-PP1
102 - USB-PP2 etc
product This identifies the type of product that you wish to use:
10 - ADC-10
12 - ADC-12
40 - ADC-40
42 - ADC-42
4.2.3
adc10_close_unit
short adc10_close_unit
(
short port
)