Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: lib.cpp
- Revision:
- 2:1b1c0502bb08
- Parent:
- 1:0e5e9821d89d
- Child:
- 3:83415d375d36
--- a/lib.cpp Sun Apr 24 23:37:04 2016 +0000
+++ b/lib.cpp Mon Apr 25 00:36:32 2016 +0000
@@ -22,4 +22,37 @@
pos++;
}
*size = pos - 1;
+}
+
+bool fp_enroll(FPScanner *fp)
+{
+ bool status = true;
+ fp->SetLED(true);
+ while(!fp->IsPressFinger()) wait(0.030);
+ fp->CaptureFinger(true);
+ if (fp->Identify1_N() == 200) {
+ int id = fp->GetEnrollCount();
+ if (fp->EnrollStart(id) == 0) {
+ fp->CaptureFinger(true);
+ fp->Enroll1();
+ fp->CaptureFinger(true);
+ fp->Enroll2();
+ fp->CaptureFinger(true);
+ fp->Enroll3();
+ fp->SetLED(false);
+ } else status = false;
+ } else status = false;
+
+ return status;
+}
+
+bool fp_auth(FPScanner *fp)
+{
+ bool status = false;
+ fp->SetLED(true);
+ while(!fp->IsPressFinger()) wait(0.030);
+ fp->CaptureFinger(true);
+ if (fp->Identify1_N() != 200) status = true;
+ fp->SetLED(false);
+ return status;
}
\ No newline at end of file