Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Device_k5fpr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Android-smartphones
zte
blade-a610
work in progress
porting
RajatBillava - k5fpr
Device_k5fpr
Commits
f9e0a747
Commit
f9e0a747
authored
7 years ago
by
TheScarastic
Committed by
DidntRead
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
update fp wrapper
parent
228cfb7c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
fingerprint/FingerprintWrapper.cpp
+33
-1
33 additions, 1 deletion
fingerprint/FingerprintWrapper.cpp
with
33 additions
and
1 deletion
fingerprint/FingerprintWrapper.cpp
+
33
−
1
View file @
f9e0a747
...
...
@@ -99,6 +99,34 @@ static int cancel(struct fingerprint_device *dev)
return
device
->
vendor
.
device
->
cancel
(
device
->
vendor
.
device
);
}
#define MAX_FINGERPRINTS 100
typedef
int
(
*
enumerate_2_0
)(
struct
fingerprint_device
*
dev
,
fingerprint_finger_id_t
*
results
,
uint32_t
*
max_size
);
static
int
enumerate_pre_2_1
(
struct
fingerprint_device
*
dev
)
{
device_t
*
device
=
(
device_t
*
)
dev
;
fingerprint_finger_id_t
results
[
MAX_FINGERPRINTS
];
uint32_t
n
=
MAX_FINGERPRINTS
;
enumerate_2_0
enumerate
=
(
enumerate_2_0
)
device
->
vendor
.
device
->
enumerate
;
int
rv
=
enumerate
(
device
->
vendor
.
device
,
results
,
&
n
);
if
(
rv
==
0
)
{
uint32_t
i
;
fingerprint_msg_t
msg
;
msg
.
type
=
FINGERPRINT_TEMPLATE_ENUMERATING
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
msg
.
data
.
enumerated
.
finger
=
results
[
i
];
msg
.
data
.
enumerated
.
remaining_templates
=
n
-
i
-
1
;
device
->
base
.
notify
(
&
msg
);
}
}
return
rv
;
}
static
int
enumerate
(
struct
fingerprint_device
*
dev
)
{
device_t
*
device
=
(
device_t
*
)
dev
;
...
...
@@ -168,7 +196,11 @@ static int device_open(const hw_module_t *module, const char *name, hw_device_t
device
->
base
.
post_enroll
=
post_enroll
;
device
->
base
.
get_authenticator_id
=
get_authenticator_id
;
device
->
base
.
cancel
=
cancel
;
if
(
vendor
.
module
->
common
.
module_api_version
>=
FINGERPRINT_MODULE_API_VERSION_2_1
)
{
device
->
base
.
enumerate
=
enumerate
;
}
else
{
device
->
base
.
enumerate
=
enumerate_pre_2_1
;
}
device
->
base
.
remove
=
remove
;
device
->
base
.
set_active_group
=
set_active_group
;
device
->
base
.
authenticate
=
authenticate
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment