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.
Fork of GT511C3 by
Revision 1:1bd535454918, committed 2015-12-10
- Comitter:
- inezraharjo
- Date:
- Thu Dec 10 07:55:54 2015 +0000
- Parent:
- 0:90c64cb9db58
- Commit message:
- LED blinking for the enrolling process;
Changed in this revision
GT511C3.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 90c64cb9db58 -r 1bd535454918 GT511C3.cpp --- a/GT511C3.cpp Fri Jan 03 16:00:00 2014 +0000 +++ b/GT511C3.cpp Thu Dec 10 07:55:54 2015 +0000 @@ -260,8 +260,9 @@ CmosLed(1); while(1){ - if((sts = (*progress)(1,"EnrollStart\n")) != 0) + if((sts = (*progress)(1,"EnrollStart\n")) != 0){ return -9999; + } Parameter = ID; sts = SendRecv(CMD_EnrollStart,&Parameter,&Response); if(sts != 0) @@ -269,48 +270,64 @@ if(Response != CMD_Ack) return -100; - if((sts = (*progress)(0,"Remove finger\n")) != 0) + if((sts = (*progress)(0,"Remove finger\n")) != 0){ return -9999; + } + CmosLed(0); WaitPress(0); - + CmosLed(1); + while(1){ - if((sts = (*progress)(10,"Press finger to Enroll (1st)\n")) != 0) + if((sts = (*progress)(10,"Press finger to Enroll (1st)\n")) != 0){ return -9999; + } WaitPress(1); if(Capture(1) == 0) break; } - if((sts = (*progress)(0,"Remove finger\n")) != 0) + if((sts = (*progress)(0,"Remove finger\n")) != 0){ return -9999; + } + CmosLed(0); + if(Enroll_N(1) != 0) continue; + WaitPress(0); - + CmosLed(1); + while(1){ - if((sts = (*progress)(20,"Press finger to Enroll (2nd)\n")) != 0) + if((sts = (*progress)(20,"Press finger to Enroll (2nd)\n")) != 0){ return -9999; + } WaitPress(1); if(Capture(1) == 0) break; } - if((sts = (*progress)(0,"Remove finger\n")) != 0) + if((sts = (*progress)(0,"Remove finger\n")) != 0){ return -9999; + } + CmosLed(0); if(Enroll_N(2) != 0) continue; WaitPress(0); - + CmosLed(1); while(1){ - if((sts = (*progress)(30,"Press finger to Enroll (3rd)\n")) != 0) + if((sts = (*progress)(30,"Press finger to Enroll (3rd)\n")) != 0){ + CmosLed(1); return -9999; + } WaitPress(1); if(Capture(1) == 0) break; } - if((sts = (*progress)(0,"Remove finger\n")) != 0) + if((sts = (*progress)(0,"Remove finger\n")) != 0){ return -9999; + } + CmosLed(0); if(Enroll_N(3) != 0) continue; WaitPress(0);