|
本帖最后由 Davidwxj 于 2017-10-25 16:47 编辑
uint8_t FPMXX::searchFinger(uint8_t bufferId, uint16_t startPage, uint16_t endPage, uint16_t * pageId, uint16_t * score)
{
uint8_t content[] = { 0x01,0x00,0x08,0x04,0x00,0xFF,0xFF,0x00,0x00 };
content[4] = bufferId;
content[5] = (uint8_t)(startPage >> 8);
content[6] = (uint8_t)startPage;
content[7] = (uint8_t)(endPage >> 8);
content[8] = (uint8_t)endPage;
sendCmd(8, content);
uint8_t r = getReply(content);
if (r == 5) {
if (content[0] != FPMXX_CODE_OK) *score = 0;
else {
*pageId = content[1];
*pageId <<= 8;
*pageId |= content[2];
*score = content[3];
*score <<= 8;
*score |= content[4];
}
return content[0];
}
return r;
}
uint8_t FPMXX::searchFinger(uint8_t bufferId, uint16_t startPage, uint16_t endPage, uint16_t * pageId)
{
uint16_t s;
return searchFinger(bufferId, startPage, endPage, pageId, &s);
}
亲 没看懂这里 为什么要有两个searchFinger函数
|
|