![]() |
The needed gxsdldr.c loader file is included directly:
The __lib__.h
file contains some library functions used only in the sample programs, such as the lib_function_start
and lib_function_end
functions that implement the simple command line interface and measures the elapsed time between the two function calls.
The main function:
Opening the Passport Reader system:
Connecting to the first device. If no device is connected then the pr_usedevicen() function returns false and the program ends:
Displaying the calibration state of the device:
The calibration loop. Putting the calibration image on the device and calling the pr_calibrate() function to start the calibration process. In case of error false is returned and the error code and error message is displayed by the lib_display_err
library function:
Displaying the state of the device after the calibration process:
Closing the device:
Closing the Passport Reader system:
The sample program ends:
The complete source code:
The needed gxsdldr.c loader file is included directly:
The __lib__.h
file contains some library functions used only in the sample programs, such as the lib_function_start
and lib_function_end
functions that implement the simple command line interface and measures the elapsed time between the two function calls.
The main function:
Opening the Passport Reader system:
Connecting to the first device. If no device is connected then the pr_usedevicen() function returns false and the program ends:
Testing the power state of devices with power switch:
Enabling document motion detection by setting the proper value for the freerun_mode
property:
The main loop. In this short sample the handling of the start button and the document detection is presented. In normal operation when the start button is pressed or a document is detected on the document window, that is the document has PR_TD_IN status, the capture and recognize process can be started. The display leds of the device are used to indicate the status of the device and of the document.
Turning off the lights and stopping the document detection process:
Turning off the display leds:
Closing the device:
Closing the Passport Reader system:
The sample program ends:
The complete source code: