Repository navigation
API Reference
dilshan edited this page Nov 22, 2026
·
4 revisions
All functions are declared in include/openlru.h. The prefix is olru_.
Every function that can fail returns an olru_status:
0 (OLRU_OK) on success, a negative value on failure.
Probing and opening - details
| Function | Purpose |
|---|---|
olru_probe |
list supported sensors on the USB bus |
olru_open |
open a sensor and check it answers |
olru_close |
release the sensor |
olru_link_check |
re-run the handshake |
Reading fingerprints - details
| Function | Purpose |
|---|---|
olru_capture_image |
one non-blocking "is there a finger?" poll |
olru_wait_for_finger |
blocking poll with timeout |
olru_read_image |
download the 256×288 image |
olru_read_template |
have the sensor extract a 256-byte template and read it |
Image export - details
| Function | Purpose |
|---|---|
olru_image_to_bmp |
raw image → BMP in memory |
olru_image_save_bmp |
raw image → .bmp file |
Diagnostics - details
| Function | Purpose |
|---|---|
olru_strerror |
text for an olru_status
|
olru_device_code |
sensor's last confirmation code |
olru_device_code_text |
text for a sensor code |
- Threading: a handle must not be used from two threads at the same time. Different handles are independent.
-
Blocking: every USB transfer has a 5 second timeout.
olru_wait_for_fingerandolru_openadditionally wait deliberately. All other calls return after a few USB exchanges. -
Ownership: the library never keeps pointers you pass in. Buffers are yours;
olru_device_info.nameis a static string valid for the program's life. - No matching: there are no functions that compare, search or verify fingerprints, by design.
openlru-lib - Open LRU Fingerprint Library · Home