fingerprint3 2.0.0.0
fingerprint3.h File Reference

This file contains API for Fingerprint 3 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  fingerprint3_pkg_t
 Package structure. More...
 
struct  fingerprint3_product_info_t
 Product Info structure. More...
 
struct  fingerprint3_sys_parameter_t
 System Parameters structure. More...
 
struct  fingerprint3_t
 Click ctx object definition. More...
 
struct  fingerprint3_cfg_t
 Click configuration structure definition. More...
 

Macros

#define FINGERPRINT3_MAP_MIKROBUS(cfg, mikrobus)
 
#define FINGERPRINT3_RETVAL   uint8_t
 
#define FINGERPRINT3_OK   0x00
 
#define FINGERPRINT3_INIT_ERROR   0xFF
 
#define FINGERPRINT3_CMD_GET_IMAGE   0x01
 
#define FINGERPRINT3_CMD_IMAGE_2_TZ   0x02
 
#define FINGERPRINT3_CMD_MATCH   0x03
 
#define FINGERPRINT3_CMD_SEARCH   0x04
 
#define FINGERPRINT3_CMD_REG_MODEL   0x05
 
#define FINGERPRINT3_CMD_STORE   0x06
 
#define FINGERPRINT3_CMD_LOAD_CHAR   0x07
 
#define FINGERPRINT3_CMD_UPLOAD_CHAR   0x08
 
#define FINGERPRINT3_CMD_DOWNLOAD_CHAR   0x09
 
#define FINGERPRINT3_CMD_UPLOAD_IMAGE   0x0A
 
#define FINGERPRINT3_CMD_DOWNLOAD_IMAGE   0x0B
 
#define FINGERPRINT3_CMD_DELETE_CHAR   0x0C
 
#define FINGERPRINT3_CMD_EMPTY   0x0D
 
#define FINGERPRINT3_CMD_SET_SYS_PARAM   0x0E
 
#define FINGERPRINT3_CMD_READ_SYS_PARAM   0x0F
 
#define FINGERPRINT3_CMD_SET_PASSWORD   0x12
 
#define FINGERPRINT3_CMD_VERIFY_PASSWORD   0x13
 
#define FINGERPRINT3_CMD_GET_RANDOM_CODE   0x14
 
#define FINGERPRINT3_CMD_SET_ADDRESS   0x15
 
#define FINGERPRINT3_CMD_READ_INFO_PAGE   0x16
 
#define FINGERPRINT3_CMD_PORT_CONTROL   0x17
 
#define FINGERPRINT3_CMD_WRITE_NOTEPAD   0x18
 
#define FINGERPRINT3_CMD_READ_NOTEPAD   0x19
 
#define FINGERPRINT3_CMD_TEMPLATE_NUM   0x1D
 
#define FINGERPRINT3_CMD_READ_INDEX_TEMPLATE   0x1F
 
#define FINGERPRINT3_CMD_GET_IMAGE_EXT   0x28
 
#define FINGERPRINT3_CMD_CANCEL   0x30
 
#define FINGERPRINT3_CMD_AURA_CONTROL   0x35
 
#define FINGERPRINT3_CMD_CHECK_SENSOR   0x36
 
#define FINGERPRINT3_CMD_GET_ALG_VERSION   0x39
 
#define FINGERPRINT3_CMD_GET_FW_VERSION   0x3A
 
#define FINGERPRINT3_CMD_READ_PRODUCT_INFO   0x3C
 
#define FINGERPRINT3_CMD_SOFT_RESET   0x3D
 
#define FINGERPRINT3_CMD_HAND_SHAKE   0x40
 
#define FINGERPRINT3_CONF_CMD_OK   0x00
 
#define FINGERPRINT3_CONF_PACKET_RECEIVE_ERROR   0x01
 
#define FINGERPRINT3_CONF_NO_FINGER   0x02
 
#define FINGERPRINT3_CONF_ENROLL_FAIL   0x03
 
#define FINGERPRINT3_CONF_OVER_DISORDERLY_FAIL   0x06
 
#define FINGERPRINT3_CONF_OVER_SMALLNESS_FAIL   0x07
 
#define FINGERPRINT3_CONF_NO_MATCH   0x08
 
#define FINGERPRINT3_CONF_NOT_FOUND   0x09
 
#define FINGERPRINT3_CONF_FAIL_TO_COMBINE   0x0A
 
#define FINGERPRINT3_CONF_BAD_LOCATION   0x0B
 
#define FINGERPRINT3_CONF_READ_TEMPLATE_FAIL   0x0C
 
#define FINGERPRINT3_CONF_UPLOAD_TEMPLATE_FAIL   0x0D
 
#define FINGERPRINT3_CONF_PACKET_RECEIVE_FAIL   0x0E
 
#define FINGERPRINT3_CONF_UPLOAD_IMAGE_FAIL   0x0F
 
#define FINGERPRINT3_CONF_DELETE_TEMPLATE_FAIL   0x10
 
#define FINGERPRINT3_CONF_LIBRARY_CLEAR_FAIL   0x11
 
#define FINGERPRINT3_CONF_WRONG_PASSWORD   0x13
 
#define FINGERPRINT3_CONF_GENERATE_IMAGE_FAIL   0x15
 
#define FINGERPRINT3_CONF_FLASH_WRITE_ERROR   0x18
 
#define FINGERPRINT3_CONF_NO_DEFINITION_ERROR   0x19
 
#define FINGERPRINT3_CONF_INVALID_REG_NUM   0x1A
 
#define FINGERPRINT3_CONF_INCORRECT_REG_CONFIG   0x1B
 
#define FINGERPRINT3_CONF_WRONG_PAGE_NUM   0x1C
 
#define FINGERPRINT3_CONF_COM_PORT_FAIL   0x1D
 
#define FINGERPRINT3_HEADER   0xEF01
 
#define FINGERPRINT3_HEADER_MSB   0xEF
 
#define FINGERPRINT3_HEADER_LSB   0x01
 
#define FINGERPRINT3_DEFAULT_ADDRESS   0xFFFFFFFFul
 
#define FINGERPRINT3_DEFAULT_PASSWORD   0x00000000ul
 
#define FINGERPRINT3_COMMAND_PACKET   0x01
 
#define FINGERPRINT3_DATA_PACKET   0x02
 
#define FINGERPRINT3_ACK_PACKET   0x07
 
#define FINGERPRINT3_END_DATA_PACKET   0x08
 
#define FINGERPRINT3_DETECT_FINGER   0x00
 
#define FINGERPRINT3_DETECT_NO_FINGER   0x01
 
#define FINGERPRINT3_ERR_TIMEOUT   0xFB
 
#define FINGERPRINT3_ERR_PACKAGE_LEN   0xFC
 
#define FINGERPRINT3_ERR_CHKSUM   0xFD
 
#define FINGERPRINT3_ERR_RESPONSE   0xFE
 
#define FINGERPRINT3_ERR_HEADER   0xFF
 
#define FINGERPRINT3_AURA_LED_RED   0x01
 
#define FINGERPRINT3_AURA_LED_BLUE   0x02
 
#define FINGERPRINT3_AURA_LED_PURPLE   0x03
 
#define FINGERPRINT3_AURA_CTRL_BREATH   0x01
 
#define FINGERPRINT3_AURA_CTRL_FLASH   0x02
 
#define FINGERPRINT3_AURA_CTRL_ON   0x03
 
#define FINGERPRINT3_AURA_CTRL_OFF   0x04
 
#define FINGERPRINT3_AURA_CTRL_GRADUAL_ON   0x05
 
#define FINGERPRINT3_AURA_CTRL_GRADUAL_OFF   0x06
 
#define FINGERPRINT3_AURA_TIME_INFINITE   0x00
 
#define FINGERPRINT3_MAX_PACKAGE_LENGTH   256
 
#define FINGERPRINT3_DRV_TX_BUFFER_SIZE   500
 
#define FINGERPRINT3_DRV_RX_BUFFER_SIZE   500
 
#define FINGERPRINT3_TIMEOUT   500
 

Functions

void fingerprint3_cfg_setup (fingerprint3_cfg_t *cfg)
 Config Object Initialization function.
 
err_t fingerprint3_init (fingerprint3_t *ctx, fingerprint3_cfg_t *cfg)
 Initialization function.
 
uint8_t fingerprint3_set_config (fingerprint3_t *ctx, uint32_t addr, uint32_t pass)
 Set config function.
 
void fingerprint3_set_rst_pin (fingerprint3_t *ctx, uint8_t rst_pin)
 Set RST pin state function.
 
void fingerprint3_generic_write (fingerprint3_t *ctx, uint8_t *data_buf, uint16_t len)
 Generic write function.
 
int32_t fingerprint3_generic_read (fingerprint3_t *ctx, uint8_t *data_buf, uint16_t max_len)
 Generic read function.
 
uint8_t fingerprint3_send_package (fingerprint3_t *ctx, uint8_t pkg_id, uint8_t *pkg_content, uint16_t pkg_len)
 Send package function.
 
uint8_t fingerprint3_finger_indicator (fingerprint3_t *ctx)
 Finger indicator function.
 
uint8_t fingerprint3_aura_control (fingerprint3_t *ctx, uint8_t control, uint8_t speed, uint8_t color, uint8_t times)
 Aura LED control function.
 
uint8_t fingerprint3_verify_password (fingerprint3_t *ctx, uint32_t pass)
 Verify password function.
 
uint8_t fingerprint3_read_product_info (fingerprint3_t *ctx)
 Read product info function.
 
uint8_t fingerprint3_read_sys_param (fingerprint3_t *ctx)
 Read system parameter function.
 
uint8_t fingerprint3_set_security_lvl (fingerprint3_t *ctx, uint8_t lvl)
 Set security level function.
 
uint8_t fingerprint3_hand_shake (fingerprint3_t *ctx)
 Hand shake function.
 
uint8_t fingerprint3_check_sensor (fingerprint3_t *ctx)
 Check sensor function.
 
uint8_t fingerprint3_soft_reset (fingerprint3_t *ctx)
 Soft reset function.
 
uint8_t fingerprint3_read_index_table (fingerprint3_t *ctx, uint8_t *table, uint8_t page)
 Read index table function.
 
uint8_t fingerprint3_take_image (fingerprint3_t *ctx)
 Take image function.
 
uint8_t fingerprint3_extract_features (fingerprint3_t *ctx, uint8_t char_buffer)
 Extract features function.
 
uint8_t fingerprint3_create_template (fingerprint3_t *ctx)
 Create template function.
 
uint8_t fingerprint3_store_template (fingerprint3_t *ctx, uint8_t char_buffer, uint16_t location)
 Create template function.
 
uint8_t fingerprint3_delete_template (fingerprint3_t *ctx, uint16_t location)
 Delete template function.
 
uint8_t fingerprint3_empty_library (fingerprint3_t *ctx)
 Empty the library function.
 
uint8_t fingerprint3_load_template (fingerprint3_t *ctx, uint8_t char_buffer, uint16_t location)
 Create template function.
 
uint8_t fingerprint3_match_finger (fingerprint3_t *ctx, uint16_t *score)
 Empty the library function.
 
uint8_t fingerprint3_search_finger (fingerprint3_t *ctx, uint8_t char_buffer, uint16_t *location, uint16_t *score)
 Empty the library function.
 

Detailed Description

This file contains API for Fingerprint 3 Click driver.