Albin Sebastian / FPC_R306

Dependents:   Wiz750SR_fingerR306_WITH_MQTT

Fork of GT511C3 by WIZnet

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers FPC_R306.hpp Source File

FPC_R306.hpp

00001 
00002 
00003 
00004 //......Created by the CDI KENGERI TEAM (Christ(Deemed to be University)) Bangalore, Karnataka, India.......//
00005 
00006 
00007 
00008 #ifndef __FPC_R306_HPP
00009 #define __FPC_R306_HPP
00010 #include "mbed.h"
00011 
00012 class FPC_R306 : public Serial {
00013 public:
00014 #define FINGERPRINT_OK 0x00
00015 #define FINGERPRINT_PACKETRECIEVEERR 0x01
00016 #define FINGERPRINT_NOFINGER 0x02
00017 #define FINGERPRINT_IMAGEFAIL 0x03
00018 #define FINGERPRINT_IMAGEMESS 0x06
00019 #define FINGERPRINT_FEATUREFAIL 0x07
00020 #define FINGERPRINT_NOMATCH 0x08
00021 #define FINGERPRINT_NOTFOUND 0x09
00022 #define FINGERPRINT_ENROLLMISMATCH 0x0A
00023 #define FINGERPRINT_BADLOCATION 0x0B
00024 #define FINGERPRINT_DBRANGEFAIL 0x0C
00025 #define FINGERPRINT_UPLOADFEATUREFAIL 0x0D
00026 #define FINGERPRINT_PACKETRESPONSEFAIL 0x0E
00027 #define FINGERPRINT_UPLOADFAIL 0x0F
00028 #define FINGERPRINT_DELETEFAIL 0x10
00029 #define FINGERPRINT_DBCLEARFAIL 0x11
00030 #define FINGERPRINT_PASSFAIL 0x13
00031 #define FINGERPRINT_INVALIDIMAGE 0x15
00032 #define FINGERPRINT_FLASHERR 0x18
00033 #define FINGERPRINT_INVALIDREG 0x1A
00034 #define FINGERPRINT_ADDRCODE 0x20
00035 #define FINGERPRINT_PASSVERIFY 0x21
00036 
00037 #define FINGERPRINT_STARTCODE 0xEF01
00038 
00039 #define FINGERPRINT_COMMANDPACKET 0x1
00040 #define FINGERPRINT_DATAPACKET 0x2
00041 #define FINGERPRINT_ACKPACKET 0x7
00042 #define FINGERPRINT_ENDDATAPACKET 0x8
00043 
00044 #define FINGERPRINT_TIMEOUT 0xFF
00045 #define FINGERPRINT_BADPACKET 0xFE
00046 
00047 #define FINGERPRINT_GETIMAGE 0x01
00048 #define FINGERPRINT_IMAGE2TZ 0x02
00049 #define FINGERPRINT_REGMODEL 0x05
00050 #define FINGERPRINT_STORE 0x06
00051 #define FINGERPRINT_LOAD 0x07
00052 #define FINGERPRINT_UPLOAD 0x08
00053 #define FINGERPRINT_DELETE 0x0C
00054 #define FINGERPRINT_EMPTY 0x0D
00055 #define FINGERPRINT_SETPASSWORD 0x12
00056 #define FINGERPRINT_VERIFYPASSWORD 0x13
00057 #define FINGERPRINT_HISPEEDSEARCH 0x1B
00058 #define FINGERPRINT_TEMPLATECOUNT 0x1D
00059 
00060 
00061 #define DEFAULTTIMEOUT 2000 
00062 
00063     unsigned long LastError;
00064     unsigned long FirmwareVersion; 
00065     unsigned long IsoAreaMaxSize; 
00066     unsigned char DeviceSerialNumber[16]; 
00067 
00068     FPC_R306(PinName _tx, PinName _rx) : Serial(_tx,_rx) {}
00069     int Init(void);
00070     int CMD_GETIMG();
00071     int CMD_IMG2Tz1();
00072     int CMD_IMG2Tz2();
00073     int createModel();
00074     int STORE_MODEL(uint16_t id);
00075     uint8_t RecvResponse();
00076     uint8_t TMPL_COUNT();
00077     uint8_t FAST_SEARCH();
00078     uint8_t Recv_TMPL_COUNT();
00079     uint8_t Recv_FAST_SEARCH();
00080     uint8_t DELETE_ID(uint16_t id);
00081     uint8_t EMPTY_LIB();
00082     
00083     
00084     uint16_t templatecount;
00085     uint16_t fingerID;
00086     uint16_t MatchScore;
00087 
00088 };
00089 
00090 #endif  //__FPC_R306_HPP