diff options
author | Sasha Levitskiy <sanek@google.com> | 2014-05-07 09:07:11 -0700 |
---|---|---|
committer | Sasha Levitskiy <sanek@google.com> | 2014-05-16 15:48:25 -0700 |
commit | 969466c75bf5c2b479ce36258ff6feafc90a7369 (patch) | |
tree | 1b5a0d98d3274de0a724a8f18de6c5f4538d4066 /include | |
parent | c1e0179a9501c63bdb4c458e108577df71d50dbe (diff) | |
download | hardware_libhardware-969466c75bf5c2b479ce36258ff6feafc90a7369.zip hardware_libhardware-969466c75bf5c2b479ce36258ff6feafc90a7369.tar.gz hardware_libhardware-969466c75bf5c2b479ce36258ff6feafc90a7369.tar.bz2 |
Libhardware: HAL: Fingerprint: Add template collection progress hint; remove match confidence.
Change-Id: I62ce57054b7e0cfda8aa260176e504113677d993
Signed-off-by: Sasha Levitskiy <sanek@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hardware/fingerprint.h | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/include/hardware/fingerprint.h b/include/hardware/fingerprint.h index c1e29ef..7f6fa28 100644 --- a/include/hardware/fingerprint.h +++ b/include/hardware/fingerprint.h @@ -37,11 +37,24 @@ typedef enum fingerprint_error { typedef struct fingerprint_enroll { uint32_t id; /* samples_remaining goes from N (no data collected, but N scans needed) - * to 0 (no more data is needed to build a template) - * If HAL fails to decrement samples_remaining between calls the client - * will declare template collection a failure and should abort the operation - * by calling module->common.methods->close() */ - uint32_t samples_remaining; + * to 0 (no more data is needed to build a template). + * The progress indication may be augmented by a bitmap encoded indication + * of finger area that needs to be presented by the user. + * Bit numbers mapped to physical location: + * + * distal + * +-+-+-+ + * |2|1|0| + * |5|4|3| + * medial |8|7|6| lateral + * |b|a|9| + * |e|d|c| + * +-+-+-+ + * proximal + * + */ + uint16_t data_collected_bmp; + uint16_t samples_remaining; } fingerprint_enroll_t; typedef struct fingerprint_removed { @@ -50,7 +63,6 @@ typedef struct fingerprint_removed { typedef struct fingerprint_scanned { uint32_t id; /* 0 is a special id and means no match */ - uint32_t confidence; /* Goes form 0 (no match) to 0xffffFFFF (100% sure) */ } fingerprint_scanned_t; typedef struct fingerprint_msg { @@ -92,6 +104,18 @@ typedef struct fingerprint_device { int (*enroll)(struct fingerprint_device *dev, uint32_t timeout_sec); /* + * Cancel fingerprint enroll request: + * Switches the HAL state machine back to accept a fingerprint scan mode. + * (fingerprint_msg.type == FINGERPRINT_TEMPLATE_ENROLLING && + * fingerprint_msg.data.enroll.samples_remaining == 0) + * will indicate switch back to the scan mode. + * + * Function return: 0 if cancel request is accepted + * -1 otherwise. + */ + int (*enroll_cancel)(struct fingerprint_device *dev); + + /* * Fingerprint remove request: * deletes a fingerprint template. * If the fingerprint id is 0 the entire template database will be removed. |