LibDriver AS608
Loading...
Searching...
No Matches
driver_as608.h File Reference

driver as608 header file More...

#include <stdio.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for driver_as608.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  as608_params_s
 as608 params structure definition More...
struct  as608_handle_s
 as608 handle structure definition More...
struct  as608_info_s
 as608 information structure definition More...

Macros

#define DRIVER_AS608_LINK_INIT(HANDLE, STRUCTURE)
 initialize as608_handle_t structure
#define DRIVER_AS608_LINK_UART_INIT(HANDLE, FUC)
 link uart_init function
#define DRIVER_AS608_LINK_UART_DEINIT(HANDLE, FUC)
 link uart_deinit function
#define DRIVER_AS608_LINK_UART_READ(HANDLE, FUC)
 link uart_read function
#define DRIVER_AS608_LINK_UART_WRITE(HANDLE, FUC)
 link uart_write function
#define DRIVER_AS608_LINK_UART_FLUSH(HANDLE, FUC)
 link uart_flush function
#define DRIVER_AS608_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_AS608_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function

Typedefs

typedef struct as608_params_s as608_params_t
 as608 params structure definition
typedef struct as608_handle_s as608_handle_t
 as608 handle structure definition
typedef struct as608_info_s as608_info_t
 as608 information structure definition

Enumerations

enum  as608_bool_t { AS608_BOOL_FALSE = 0x00 , AS608_BOOL_TRUE = 0x01 }
 as608 bool enumeration definition More...
enum  as608_level_t {
  AS608_LEVEL_1 = 0x0001 , AS608_LEVEL_2 = 0x0002 , AS608_LEVEL_3 = 0x0003 , AS608_LEVEL_4 = 0x0004 ,
  AS608_LEVEL_5 = 0x0005
}
 as608 level enumeration definition More...
enum  as608_packet_size_t { AS608_PACKET_SIZE_32_BYTES = 0x0000 , AS608_PACKET_SIZE_64_BYTES = 0x0001 , AS608_PACKET_SIZE_128_BYTES = 0x0002 , AS608_PACKET_SIZE_256_BYTES = 0x0003 }
 as608 packet size enumeration definition More...
enum  as608_buffer_number_t { AS608_BUFFER_NUMBER_1 = 0x01 , AS608_BUFFER_NUMBER_2 = 0x02 }
 as608 buffer number enumeration definition More...
enum  as608_sensor_type_t {
  AS608_SENSOR_TYPE_FPC1011C = 0x0000 , AS608_SENSOR_TYPE_C500 = 0x0002 , AS608_SENSOR_TYPE_S500 = 0x0003 , AS608_SENSOR_TYPE_XWSEMI = 0x0007 ,
  AS608_SENSOR_TYPE_CUSTOM = 0x0009
}
 as608 sensor type enumeration definition More...
enum  as608_burn_code_mode_t { AS608_BURN_CODE_MODE_INFO = 0x00 , AS608_BURN_CODE_MODE_FULL = 0x01 }
 as608 burn code mode enumeration definition More...
enum  as608_image_t { AS608_IMAGE_BIN = 0x00 , AS608_IMAGE_NO_FEATURE = 0x01 , AS608_IMAGE_FEATURE = 0x02 }
 as608 image enumeration definition More...
enum  as608_gpio_number_t { AS608_GPIO_NUMBER_0 = 0x00 , AS608_GPIO_NUMBER_1 = 0x01 }
 as608 gpio number enumeration definition More...
enum  as608_gpio_level_t { AS608_GPIO_LEVEL_LOW = 0x00 , AS608_GPIO_LEVEL_HIGH = 0x01 }
 as608 gpio level enumeration definition More...
enum  as608_status_t {
  AS608_STATUS_OK = 0x00 , AS608_STATUS_FRAME_ERROR = 0x01 , AS608_STATUS_NO_FINGERPRINT = 0x02 , AS608_STATUS_INPUT_ERROR = 0x03 ,
  AS608_STATUS_IMAGE_TOO_DRY = 0x04 , AS608_STATUS_IMAGE_TOO_WET = 0x05 , AS608_STATUS_IMAGE_TOO_CLUTTER = 0x06 , AS608_STATUS_IMAGE_TOO_FEW_FEATURE = 0x07 ,
  AS608_STATUS_NOT_MATCH = 0x08 , AS608_STATUS_NOT_FOUND = 0x09 , AS608_STATUS_FEATURE_COMBINE_ERROR = 0x0A , AS608_STATUS_LIB_ADDR_OVER = 0x0B ,
  AS608_STATUS_LIB_READ_ERROR = 0x0C , AS608_STATUS_UPLOAD_FEATURE_ERROR = 0x0D , AS608_STATUS_NO_FRAME = 0x0E , AS608_STATUS_UPLOAD_IMAGE_ERROR = 0x0F ,
  AS608_STATUS_LIB_DELETE_ERROR = 0x10 , AS608_STATUS_LIB_CLEAR_ERROR = 0x11 , AS608_STATUS_ENTER_LOW_POWER_ERROR = 0x12 , AS608_STATUS_COMMAND_INVALID = 0x13 ,
  AS608_STATUS_RESET_ERROR = 0x14 , AS608_STATUS_BUFFER_INVALID = 0x15 , AS608_STATUS_UPDATE_ERROR = 0x16 , AS608_STATUS_NO_MOVE = 0x17 ,
  AS608_STATUS_FLASH_ERROR = 0x18 , AS608_STATUS_F0_RESPONSE = 0xF0 , AS608_STATUS_F1_RESPONSE = 0xF1 , AS608_STATUS_FLASH_WRITE_SUM_ERROR = 0xF2 ,
  AS608_STATUS_FLASH_WRITE_HEADER_ERROR = 0xF3 , AS608_STATUS_FLASH_WRITE_LENGTH_ERROR = 0xF4 , AS608_STATUS_FLASH_WRITE_LENGTH_TOO_LONG = 0xF5 , AS608_STATUS_FLASH_WRITE_ERROR = 0xF6 ,
  AS608_STATUS_UNKNOWN = 0x19 , AS608_STATUS_REG_INVALID = 0x1A , AS608_STATUS_DATA_INVALID = 0x1B , AS608_STATUS_NOTE_PAGE_INVALID = 0x1C ,
  AS608_STATUS_PORT_INVALID = 0x1D , AS608_STATUS_ENROOL_ERROR = 0x1E , AS608_STATUS_LIB_FULL = 0x1F
}
 as608 status enumeration definition More...

Functions

uint8_t as608_info (as608_info_t *info)
 get chip's information
uint8_t as608_init (as608_handle_t *handle, uint32_t addr)
 initialize the chip
uint8_t as608_deinit (as608_handle_t *handle)
 close the chip
uint8_t as608_get_last_status (as608_handle_t *handle, as608_status_t *status)
 get the last status
uint8_t as608_print_status (as608_handle_t *handle, as608_status_t status)
 print status
uint8_t as608_get_image (as608_handle_t *handle, uint32_t addr, as608_status_t *status)
 get image
uint8_t as608_generate_feature (as608_handle_t *handle, uint32_t addr, as608_buffer_number_t num, as608_status_t *status)
 generate feature
uint8_t as608_match_feature (as608_handle_t *handle, uint32_t addr, uint16_t *score, as608_status_t *status)
 match feature
uint8_t as608_search_feature (as608_handle_t *handle, uint32_t addr, as608_buffer_number_t num, uint16_t start_page, uint16_t page_number, uint16_t *found_page, uint16_t *score, as608_status_t *status)
 search feature
uint8_t as608_combine_feature (as608_handle_t *handle, uint32_t addr, as608_status_t *status)
 combine feature
uint8_t as608_store_feature (as608_handle_t *handle, uint32_t addr, as608_buffer_number_t num, uint16_t page_number, as608_status_t *status)
 store feature
uint8_t as608_load_feature (as608_handle_t *handle, uint32_t addr, as608_buffer_number_t num, uint16_t page_number, as608_status_t *status)
 load feature
uint8_t as608_upload_feature (as608_handle_t *handle, uint32_t addr, as608_buffer_number_t num, uint8_t *output_buffer, uint16_t *output_len, as608_status_t *status)
 upload feature
uint8_t as608_download_feature (as608_handle_t *handle, uint32_t addr, as608_buffer_number_t num, uint8_t *input_buffer, uint16_t input_len, as608_status_t *status)
 download feature
uint8_t as608_upload_image (as608_handle_t *handle, uint32_t addr, uint8_t *output_buffer, uint16_t *output_len, as608_status_t *status)
 upload image
uint8_t as608_download_image (as608_handle_t *handle, uint32_t addr, uint8_t *input_buffer, uint16_t input_len, as608_status_t *status)
 download image
uint8_t as608_delete_feature (as608_handle_t *handle, uint32_t addr, uint16_t page_number, uint16_t number, as608_status_t *status)
 delete feature
uint8_t as608_empty_all_feature (as608_handle_t *handle, uint32_t addr, as608_status_t *status)
 empty all feature
uint8_t as608_set_baud_rate (as608_handle_t *handle, uint32_t addr, uint8_t n_9600, as608_status_t *status)
 set baud rate
uint8_t as608_set_level (as608_handle_t *handle, uint32_t addr, as608_level_t level, as608_status_t *status)
 set level
uint8_t as608_set_packet_size (as608_handle_t *handle, uint32_t addr, as608_packet_size_t size, as608_status_t *status)
 set packet size
uint8_t as608_get_params (as608_handle_t *handle, uint32_t addr, as608_params_t *param, as608_status_t *status)
 get params
uint8_t as608_enroll (as608_handle_t *handle, uint32_t addr, uint16_t *page_number, as608_status_t *status)
 enroll
uint8_t as608_identify (as608_handle_t *handle, uint32_t addr, uint16_t *page_number, uint16_t *score, as608_status_t *status)
 identify
uint8_t as608_set_password (as608_handle_t *handle, uint32_t addr, uint32_t password, as608_status_t *status)
 set password
uint8_t as608_verify_password (as608_handle_t *handle, uint32_t addr, uint32_t password, as608_status_t *status)
 verify password
uint8_t as608_get_random (as608_handle_t *handle, uint32_t addr, uint32_t *randn, as608_status_t *status)
 get random
uint8_t as608_set_chip_address (as608_handle_t *handle, uint32_t addr, uint32_t new_addr, as608_status_t *status)
 set the chip address
uint8_t as608_get_flash_information (as608_handle_t *handle, uint32_t addr, uint8_t *output_buffer, uint16_t *output_len, as608_status_t *status)
 get flash information
uint8_t as608_set_port (as608_handle_t *handle, uint32_t addr, as608_bool_t enable, as608_status_t *status)
 enable or disable port
uint8_t as608_write_notepad (as608_handle_t *handle, uint32_t addr, uint8_t page_number, uint8_t data[32], as608_status_t *status)
 write notepad
uint8_t as608_read_notepad (as608_handle_t *handle, uint32_t addr, uint8_t page_number, uint8_t data[32], as608_status_t *status)
 read notepad
uint8_t as608_burn_code (as608_handle_t *handle, uint32_t addr, as608_burn_code_mode_t mode, uint8_t *input_buffer, uint16_t input_len, as608_status_t *status)
 burn code
uint8_t as608_high_speed_search (as608_handle_t *handle, uint32_t addr, as608_buffer_number_t buffer_number, uint16_t start_page, uint16_t page_number, uint16_t *found_page, uint16_t *score, as608_status_t *status)
 high speed search
uint8_t as608_generate_bin_image (as608_handle_t *handle, uint32_t addr, as608_image_t image, as608_status_t *status)
 generate bin image
uint8_t as608_get_valid_template_number (as608_handle_t *handle, uint32_t addr, uint16_t *num, as608_status_t *status)
 get valid template number
uint8_t as608_set_gpio_level (as608_handle_t *handle, uint32_t addr, as608_gpio_number_t gpio, as608_gpio_level_t input_level, as608_gpio_level_t *output_level, as608_status_t *status)
 set gpio level
uint8_t as608_get_index_table (as608_handle_t *handle, uint32_t addr, uint8_t num, uint8_t table[32], as608_status_t *status)
 get index table
uint8_t as608_command_write_read (as608_handle_t *handle, uint32_t addr, uint8_t type, uint8_t *input_buffer, uint16_t input_len, uint16_t ms, uint8_t *output_buffer, uint16_t *output_len)
 write read data to chip

Detailed Description

driver as608 header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version
1.0.0
Author
Shifeng Li
Date
2023-09-30

history

Date Version Author Description
2023/09/30 1.0 Shifeng Li first upload

Definition in file driver_as608.h.