diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-09-02 15:59:28 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-03-30 01:35:36 +0000 |
commit | 9bc769f7af79e4ab7b5b4cebee6db3bd310317c2 (patch) | |
tree | f8673f3775b7119be4406ca44c67f0d1810404f9 /include | |
parent | 70f1908a46b3ac24b29e684a49ec1cb23633019a (diff) | |
download | chrome-ec-9bc769f7af79e4ab7b5b4cebee6db3bd310317c2.tar.gz |
fpsensor: Unify type used to represent template count
BRANCH=none
BUG=b:244781166
TEST=make runhosttests -j
TEST=./test/run_device_tests.py --board bloonchipper
=> PASS
TEST=./test/run_device_tests.py --board dartmonkey
=> PASS
TEST=Flash firmware on nocturne, enroll, lock, unlock
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Id6cf553fdba208b96f71379b97f95aba8bf825d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3872809
Reviewed-by: Yi Chou <yich@google.com>
Reviewed-by: Firas Sammoura <fsammoura@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/fpsensor_state.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/fpsensor_state.h b/include/fpsensor_state.h index e5d1095e8e..9f2785be3a 100644 --- a/include/fpsensor_state.h +++ b/include/fpsensor_state.h @@ -39,7 +39,7 @@ extern "C" { #define TASK_EVENT_SENSOR_IRQ TASK_EVENT_CUSTOM_BIT(0) #define TASK_EVENT_UPDATE_CONFIG TASK_EVENT_CUSTOM_BIT(1) -#define FP_NO_SUCH_TEMPLATE -1 +#define FP_NO_SUCH_TEMPLATE (UINT16_MAX) /* --- Global variables defined in fpsensor_state.c --- */ @@ -58,9 +58,9 @@ extern uint8_t fp_enc_buffer[FP_ALGORITHM_ENCRYPTED_TEMPLATE_SIZE]; extern uint8_t fp_positive_match_salt[FP_MAX_FINGER_COUNT] [FP_POSITIVE_MATCH_SALT_BYTES]; /* Index of the last enrolled but not retrieved template. */ -extern int8_t template_newly_enrolled; +extern uint16_t template_newly_enrolled; /* Number of used templates */ -extern uint32_t templ_valid; +extern uint16_t templ_valid; /* Bitmap of the templates with local modifications */ extern uint32_t templ_dirty; /* Current user ID */ @@ -74,7 +74,7 @@ extern uint32_t sensor_mode; struct positive_match_secret_state { /* Index of the most recently matched template. */ - int8_t template_matched; + uint16_t template_matched; /* Flag indicating positive match secret can be read. */ bool readable; /* Deadline to read positive match secret. */ @@ -129,7 +129,7 @@ enum ec_status fp_set_sensor_mode(uint32_t mode, uint32_t *mode_output); * @param state the state of positive match secret, e.g. readable or not. * @return EC_SUCCESS if the request is valid, error code otherwise. */ -int fp_enable_positive_match_secret(uint32_t fgr, +int fp_enable_positive_match_secret(uint16_t fgr, struct positive_match_secret_state *state); /** |