Fingerprint Scanner API using GT511C3 fingerprint scanner.

Dependencies:   4DGL-uLCD-SE GT511C3 SDFileSystem mbed

Fork of GT511C3test by Toshihisa T

The fingerprint scanner is designed to take attendance over a group of students. It requires a the group owner to store a preloaded list of student id numbers in a .txt file to the memory (SD card) in return of a 5 digits keypass to gain access to the database when taking attendance.

While there may exist multiple group owner and a group owner with multiple databases, each group will be uniquely identified by the 5 digits keypass. The program limits each scanner to open ONE session at a time where only one group will be able to take attendance during its session. Once a session is closed, a report of the attendance taken during the open session is generated and sent via ethernet to owner and there is no way to reopen the session again.

For the initial setup, each fingerprint database needs to be populated by the students. This set up can be done continuously during a session while taking attendance that session.

Committer:
yoshua0207
Date:
Tue Dec 01 19:10:10 2015 +0000
Revision:
8:a1ba925cf903
Current fingerprint scanner code.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yoshua0207 8:a1ba925cf903 1 //useful things to include in code
yoshua0207 8:a1ba925cf903 2
yoshua0207 8:a1ba925cf903 3 #ifndef TYPES_H
yoshua0207 8:a1ba925cf903 4 #define TYPES_H
yoshua0207 8:a1ba925cf903 5
yoshua0207 8:a1ba925cf903 6 #ifndef WIN32
yoshua0207 8:a1ba925cf903 7 // true/false defines
yoshua0207 8:a1ba925cf903 8 #define FALSE 0
yoshua0207 8:a1ba925cf903 9 #define TRUE -1
yoshua0207 8:a1ba925cf903 10 #endif
yoshua0207 8:a1ba925cf903 11
yoshua0207 8:a1ba925cf903 12 // datatype definitions macros
yoshua0207 8:a1ba925cf903 13 typedef unsigned char u08;
yoshua0207 8:a1ba925cf903 14 typedef signed char s08;
yoshua0207 8:a1ba925cf903 15 typedef unsigned short u16;
yoshua0207 8:a1ba925cf903 16 typedef signed short s16;
yoshua0207 8:a1ba925cf903 17 typedef unsigned long u32;
yoshua0207 8:a1ba925cf903 18 typedef signed long s32;
yoshua0207 8:a1ba925cf903 19 typedef unsigned long long u64;
yoshua0207 8:a1ba925cf903 20 typedef signed long long s64;
yoshua0207 8:a1ba925cf903 21
yoshua0207 8:a1ba925cf903 22 /* use inttypes.h instead
yoshua0207 8:a1ba925cf903 23 // C99 standard integer type definitions
yoshua0207 8:a1ba925cf903 24 typedef unsigned char uint8_t;
yoshua0207 8:a1ba925cf903 25 typedef signed char int8_t;
yoshua0207 8:a1ba925cf903 26 typedef unsigned short uint16_t;
yoshua0207 8:a1ba925cf903 27 typedef signed short int16_t;
yoshua0207 8:a1ba925cf903 28 typedef unsigned long uint32_t;
yoshua0207 8:a1ba925cf903 29 typedef signed long int32_t;
yoshua0207 8:a1ba925cf903 30 typedef unsigned long uint64_t;
yoshua0207 8:a1ba925cf903 31 typedef signed long int64_t;
yoshua0207 8:a1ba925cf903 32 */
yoshua0207 8:a1ba925cf903 33 // maximum value that can be held
yoshua0207 8:a1ba925cf903 34 // by unsigned data types (8,16,32bits)
yoshua0207 8:a1ba925cf903 35 #define MAX_U08 255
yoshua0207 8:a1ba925cf903 36 #define MAX_U16 65535
yoshua0207 8:a1ba925cf903 37 #define MAX_U32 4294967295
yoshua0207 8:a1ba925cf903 38
yoshua0207 8:a1ba925cf903 39 // maximum values that can be held
yoshua0207 8:a1ba925cf903 40 // by signed data types (8,16,32bits)
yoshua0207 8:a1ba925cf903 41 #define MIN_S08 -128
yoshua0207 8:a1ba925cf903 42 #define MAX_S08 127
yoshua0207 8:a1ba925cf903 43 #define MIN_S16 -32768
yoshua0207 8:a1ba925cf903 44 #define MAX_S16 32767
yoshua0207 8:a1ba925cf903 45 #define MIN_S32 -2147483648
yoshua0207 8:a1ba925cf903 46 #define MAX_S32 2147483647
yoshua0207 8:a1ba925cf903 47
yoshua0207 8:a1ba925cf903 48 #ifndef WIN32
yoshua0207 8:a1ba925cf903 49 // more type redefinitions
yoshua0207 8:a1ba925cf903 50 typedef unsigned char BOOL;
yoshua0207 8:a1ba925cf903 51 typedef unsigned char BYTE;
yoshua0207 8:a1ba925cf903 52 typedef unsigned int WORD;
yoshua0207 8:a1ba925cf903 53 typedef unsigned long DWORD;
yoshua0207 8:a1ba925cf903 54
yoshua0207 8:a1ba925cf903 55 typedef unsigned char UCHAR;
yoshua0207 8:a1ba925cf903 56 typedef unsigned int UINT;
yoshua0207 8:a1ba925cf903 57 typedef unsigned short USHORT;
yoshua0207 8:a1ba925cf903 58 typedef unsigned long ULONG;
yoshua0207 8:a1ba925cf903 59
yoshua0207 8:a1ba925cf903 60 typedef char CHAR;
yoshua0207 8:a1ba925cf903 61 typedef int INT;
yoshua0207 8:a1ba925cf903 62 typedef long LONG;
yoshua0207 8:a1ba925cf903 63 #endif
yoshua0207 8:a1ba925cf903 64
yoshua0207 8:a1ba925cf903 65 #endif