代码拉取完成,页面将自动刷新
同步操作将从 peng-zhihui/FingerBoard 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#pragma once
#include "fingerprint.h"
#include "Keyboard.h"
#define MAX_FINGERS 20
enum FbStatus
{
ERROR_SENSOR_NOT_FOUND = -2,
SUCCESS = 0,
ERROR_NO_FINGER = -1
};
class FingerBoard
{
public:
FingerBoard(HardwareSerial* hs);
FbStatus Begin();
FbStatus Begin(Serial_* hs);
bool CmdCheck();
int GetFingerID();
bool AddFinger(unsigned int id);
void DeleteAllFingers();
void InputPassword(String pswd);
void TypeString(String s, bool enter);
void PressKey(uint8_t k);
void ReleaseAll();
private:
Serial_* debug = NULL;
HardwareSerial* sensorSerial = NULL;
Fingerprint sensor = NULL;
char comdata[256], data_p; //串口缓存数据
long time;
long INTERVAL = 200; //ms
bool isTouching = false;
String passwords[MAX_FINGERS];
volatile unsigned char FPMXX_RECEIVE_BUFFER[64];
unsigned char FPMXX_Pack_Head[6] = { 0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF }; //协议包头
unsigned char FPMXX_Get_Img[6] = { 0x01, 0x00, 0x03, 0x01, 0x0, 0x05 }; //获得指纹图像
unsigned char FPMXX_Save_Finger[9] = { 0x01, 0x00, 0x06, 0x06, 0x01, 0x00, 0x0B, 0x00, 0x19 }; //将BUFFER1中的特征码存放到指定的位置
unsigned char FPMXX_Search[11] = { 0x01, 0x0, 0x08, 0x04, 0x01, 0x0, 0x0, 0x03, 0xE7, 0x0, 0xF8 }; //搜索指纹搜索范围0 - 999,使用BUFFER1中的特征码搜索
unsigned char FPMXX_Get_Device[6] = { 0x01, 0x00, 0x03, 0x16, 0x00, 0x1A };
unsigned char FPMXX_Get_Templete_Count[6] = { 0x01, 0x00, 0x03, 0x1D, 0x00, 0x21 }; //获得模版总数
unsigned char FPMXX_Img_To_Buffer1[7] = { 0x01, 0x0, 0x04, 0x02, 0x01, 0x0, 0x08 }; //将图像放入到BUFFER1
unsigned char FPMXX_Img_To_Buffer2[7] = { 0x01, 0x0, 0x04, 0x02, 0x02, 0x0, 0x09 }; //将图像放入到BUFFER2
unsigned char FPMXX_Reg_Model[6] = { 0x01, 0x0, 0x03, 0x05, 0x0, 0x09 }; //将BUFFER1跟BUFFER2合成特征模版
unsigned char FPMXX_Delete_All_Model[6] = { 0x01, 0x0, 0x03, 0x0d, 0x00, 0x11 }; //删除指纹模块里所有的模版
void FPMXX_Cmd_Save_Finger(unsigned int storeID);
void FPMXX_Send_Cmd(unsigned char length, unsigned char* address, unsigned char returnLength);
void FPMXX_Cmd_Receive_Data(unsigned int r_size);
void FPMXX_Cmd_StoreTemplate(unsigned int ID);
bool FPMXX_Add_Fingerprint(unsigned int writeID);
void FPMXX_Delete_All_Fingerprint();
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。