42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
67#define FINGERPRINT2_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
69 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
70 cfg.ld1 = MIKROBUS( mikrobus, MIKROBUS_AN ); \
71 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
72 cfg.gp1 = MIKROBUS( mikrobus, MIKROBUS_CS ); \
73 cfg.gp2 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
74 cfg.ld2 = MIKROBUS( mikrobus, MIKROBUS_INT )
81#define FINGERPRINT2_RETVAL uint8_t
83#define FINGERPRINT2_OK 0x00
84#define FINGERPRINT2_INIT_ERROR 0xFF
92#define FINGERPRINT2_CMD_GET_FW_VER "<C>GetFWVer</C>"
93#define FINGERPRINT2_CMD_GET_DS "<C>GetDS</C>"
94#define FINGERPRINT2_CMD_FP_CMP "<C>CompareFingerprint</C>"
95#define FINGERPRINT2_CMD_FP_REG "<C>RegisterFingerprint</C>"
96#define FINGERPRINT2_CMD_FP_CLR "<C>ClearRegisteredFp</C>"
97#define FINGERPRINT2_CMD_FP_IMG_INFO "<C>FpImageInformation</C>"
98#define FINGERPRINT2_CMD_FP_IMG_SCAN "<C>ScanFpImage</C>"
99#define FINGERPRINT2_CMD_FP_REG_NO "<C>CheckRegisteredNo</C>"
100#define FINGERPRINT2_CMD_LOCK_DEV "<C>LockDevice</C>"
101#define FINGERPRINT2_CMD_UNLOCK_DEV "<C>UnlockCompareFp</C>"
116#define DRV_RX_BUFFER_SIZE 800
117#define DRV_TX_BUFFER_SIZE 100
#define DRV_RX_BUFFER_SIZE
Definition fingerprint2.h:116
#define DRV_TX_BUFFER_SIZE
Definition fingerprint2.h:117
#define FINGERPRINT2_RETVAL
Definition fingerprint2.h:81
void fingerprint2_set_gp1_status(fingerprint2_t *ctx, uint8_t status)
Generic function for setting gp1 pin status.
uint8_t fingerprint2_get_ld2_status(fingerprint2_t *ctx)
Generic function for reading ld2 pin status.
void fingerprint2_generic_write(fingerprint2_t *ctx, char *data_buf, uint16_t len)
Generic write function.
void fingerprint2_delete_one_fp(fingerprint2_t *ctx, uint8_t fp_index)
Function for deleting fingerprint on index.
void fingerprint2_cfg_setup(fingerprint2_cfg_t *cfg)
Config Object Initialization function.
void fingerprint2_reset(fingerprint2_t *ctx)
Function for restarting device.
void fingerprint2_set_rst_status(fingerprint2_t *ctx, uint8_t status)
Generic function for setting rst pin status.
uint8_t fingerprint2_get_ld1_status(fingerprint2_t *ctx)
Generic function for reading ld1 pin status.
void fingerprint2_reg_one_fp(fingerprint2_t *ctx, uint8_t fp_index)
Function for fingerprint registration on index.
int32_t fingerprint2_generic_read(fingerprint2_t *ctx, char *data_buf, uint16_t max_len)
Generic read function.
void fingerprint2_set_gp2_status(fingerprint2_t *ctx, uint8_t status)
Generic function for setting gp2 pin status.
FINGERPRINT2_RETVAL fingerprint2_init(fingerprint2_t *ctx, fingerprint2_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition fingerprint2.h:156
uint32_t baud_rate
Definition fingerprint2.h:172
pin_name_t gp2
Definition fingerprint2.h:167
bool uart_blocking
Definition fingerprint2.h:173
uart_data_bits_t data_bit
Definition fingerprint2.h:174
pin_name_t tx_pin
Definition fingerprint2.h:160
pin_name_t ld2
Definition fingerprint2.h:168
pin_name_t rx_pin
Definition fingerprint2.h:159
uart_stop_bits_t stop_bit
Definition fingerprint2.h:176
pin_name_t gp1
Definition fingerprint2.h:166
uart_parity_t parity_bit
Definition fingerprint2.h:175
pin_name_t ld1
Definition fingerprint2.h:164
pin_name_t rst
Definition fingerprint2.h:165
Click ctx object definition.
Definition fingerprint2.h:131
digital_out_t gp2
Definition fingerprint2.h:136
digital_in_t ld1
Definition fingerprint2.h:140
uart_t uart
Definition fingerprint2.h:145
digital_out_t gp1
Definition fingerprint2.h:135
digital_out_t rst
Definition fingerprint2.h:134
digital_in_t ld2
Definition fingerprint2.h:141