43 #define CHIP_NAME "Synochip AS608"
44 #define MANUFACTURER_NAME "Synochip"
45 #define SUPPLY_VOLTAGE_MIN 3.0f
46 #define SUPPLY_VOLTAGE_MAX 3.6f
47 #define MAX_CURRENT 60.0f
48 #define TEMPERATURE_MIN -40.0f
49 #define TEMPERATURE_MAX 85.0f
50 #define DRIVER_VERSION 1000
55 #define AS608_COMMAND_GET_IMAGE 0x01
56 #define AS608_COMMAND_GEN_CHAR 0x02
57 #define AS608_COMMAND_MATCH 0x03
58 #define AS608_COMMAND_SEARCH 0x04
59 #define AS608_COMMAND_REG_MODEL 0x05
60 #define AS608_COMMAND_STORE_CHAR 0x06
61 #define AS608_COMMAND_LOAD_CHAR 0x07
62 #define AS608_COMMAND_UP_CHAR 0x08
63 #define AS608_COMMAND_DOWN_CHAR 0x09
64 #define AS608_COMMAND_UP_IMAGE 0x0A
65 #define AS608_COMMAND_DOWN_IMAGE 0x0B
66 #define AS608_COMMAND_DELETE_CHAR 0x0C
67 #define AS608_COMMAND_EMPTY 0x0D
68 #define AS608_COMMAND_WRITE_REG 0x0E
69 #define AS608_COMMAND_READ_SYS_PARA 0x0F
70 #define AS608_COMMAND_ENROLL 0x10
71 #define AS608_COMMAND_IDENTIFY 0x11
72 #define AS608_COMMAND_SET_PWD 0x12
73 #define AS608_COMMAND_VFY_PWD 0x13
74 #define AS608_COMMAND_GET_RANDOM_CODE 0x14
75 #define AS608_COMMAND_SET_CHIP_ADDR 0x15
76 #define AS608_COMMAND_READ_INFO_PAGE 0x16
77 #define AS608_COMMAND_PORT_CONTROL 0x17
78 #define AS608_COMMAND_WRITE_NOTEPAD 0x18
79 #define AS608_COMMAND_READ_NOTEPAD 0x19
80 #define AS608_COMMAND_BURN_CODE 0x1A
81 #define AS608_COMMAND_HIGH_SPEED_SEARCH 0x1B
82 #define AS608_COMMAND_GEN_BIN_IMAGE 0x1C
83 #define AS608_COMMAND_VALID_TEMPLATE_NUM 0x1D
84 #define AS608_COMMAND_USER_GPIO 0x1E
85 #define AS608_COMMAND_READ_INDEX_TABLE 0x1F
90 #define AS608_TYPE_COMMAND 0x01
91 #define AS608_TYPE_DATA 0x02
92 #define AS608_TYPE_RESPONSE 0x07
93 #define AS608_TYPE_END 0x08
108 static uint8_t a_as608_uart_write(
as608_handle_t *handle, uint32_t addr, uint8_t type,
109 uint8_t *buf, uint16_t len)
115 if ((len + 11) > 384)
119 handle->
buf[0] = 0xEF;
120 handle->
buf[1] = 0x01;
121 handle->
buf[2] = (addr >> 24) & 0xFF;
122 handle->
buf[3] = (addr >> 16) & 0xFF;
123 handle->
buf[4] = (addr >> 8) & 0xFF;
124 handle->
buf[5] = (addr >> 0) & 0xFF;
125 handle->
buf[6] = type;
127 handle->
buf[7] = (l >> 8) & 0xFF;
128 handle->
buf[8] = (l >> 0) & 0xFF;
129 memcpy(handle->
buf + 9, buf, len);
132 for(i = 6; i < l; i++)
134 sum += handle->
buf[i];
136 handle->
buf[l] = (sum >> 8) & 0xFF;
137 handle->
buf[l + 1] = (sum >> 0) & 0xFF;
168 static uint8_t a_as608_uart_decode(
as608_handle_t *handle, uint32_t ms, uint32_t *addr,
169 uint8_t *buf, uint16_t *len)
190 for(i = 6; i < ll; i++)
192 sum += handle->
buf[i];
194 sum_check = (uint16_t)((uint16_t)handle->
buf[l - 2] << 8) | handle->
buf[l - 1];
195 if (sum != sum_check)
201 ll = (uint16_t)((uint16_t)handle->
buf[7] << 8) | handle->
buf[8];
208 if ((handle->
buf[0] != 0xEF) && (handle->
buf[1] != 0x01))
210 handle->
debug_print(
"as608: header is invalid.\n");
214 *addr = (uint32_t)((uint32_t)handle->
buf[2] << 24) |
215 (uint32_t)((uint32_t)handle->
buf[3] << 16) |
216 (uint32_t)((uint32_t)handle->
buf[4] << 8) |
217 (uint32_t)((uint32_t)handle->
buf[5] << 0);
224 read_len = ((*len) < (ll - 2)) ? (*len) : (ll - 2);
225 memcpy(buf, &handle->
buf[9], read_len);
256 static uint8_t a_as608_uart_decode_with_length(
as608_handle_t *handle, uint16_t input_len,
257 uint32_t ms, uint32_t *addr,
258 uint8_t *buf, uint16_t *len)
285 for(i = 6; i < ll; i++)
287 sum += handle->
buf[i];
289 sum_check = (uint16_t)((uint16_t)handle->
buf[l - 2] << 8) | handle->
buf[l - 1];
290 if (sum != sum_check)
296 ll = (uint16_t)((uint16_t)handle->
buf[7] << 8) | handle->
buf[8];
303 if ((handle->
buf[0] != 0xEF) && (handle->
buf[1] != 0x01))
305 handle->
debug_print(
"as608: header is invalid.\n");
309 *addr = (uint32_t)((uint32_t)handle->
buf[2] << 24) |
310 (uint32_t)((uint32_t)handle->
buf[3] << 16) |
311 (uint32_t)((uint32_t)handle->
buf[4] << 8) |
312 (uint32_t)((uint32_t)handle->
buf[5] << 0);
319 read_len = ((*len) < (ll - 2)) ? (*len) : (ll - 2);
320 memcpy(buf, &handle->
buf[9], read_len);
352 static uint8_t a_as608_uart_parse_data(
as608_handle_t *handle, uint32_t ms,uint32_t *addr, uint8_t *buf,
372 l = (uint16_t)(((uint16_t)handle->
buf[7]) << 8) | handle->
buf[8];
389 for(i = 6; i < ll; i++)
391 sum += handle->
buf[i];
393 sum_check = (uint16_t)((uint16_t)handle->
buf[l - 2] << 8) | handle->
buf[l - 1];
394 if (sum != sum_check)
400 ll = (uint16_t)((uint16_t)handle->
buf[7] << 8) | handle->
buf[8];
407 if ((handle->
buf[0] != 0xEF) && (handle->
buf[1] != 0x01))
409 handle->
debug_print(
"as608: header is invalid.\n");
413 *addr = (uint32_t)((uint32_t)handle->
buf[2] << 24) |
414 (uint32_t)((uint32_t)handle->
buf[3] << 16) |
415 (uint32_t)((uint32_t)handle->
buf[4] << 8) |
416 (uint32_t)((uint32_t)handle->
buf[5] << 0);
431 read_len = ((*len) < (ll - 2)) ? (*len) : (ll - 2);
432 memcpy(buf, &handle->
buf[9], read_len);
434 if ((ll - 2) > (*len))
482 handle->
debug_print(
"as608: uart_init is null.\n");
488 handle->
debug_print(
"as608: uart_deinit is null.\n");
494 handle->
debug_print(
"as608: uart_read is null.\n");
500 handle->
debug_print(
"as608: uart_write is null.\n");
506 handle->
debug_print(
"as608: uart_flush is null.\n");
529 handle->
debug_print(
"as608: uart write failed.\n");
535 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
542 if (addr_check != addr)
557 handle->
packet_size = (uint16_t)(32.0f * powf(2.0f, (
float)((uint16_t)
558 ((uint16_t)buf[13] << 8) | buf[14])));
588 handle->
debug_print(
"as608: uart deinit failed.\n");
658 handle->
debug_print(
"as608: uart write failed.\n");
663 res = a_as608_uart_decode(handle, 500, &addr_check, buf, &len);
668 if (addr_check != addr)
723 handle->
debug_print(
"as608: uart write failed.\n");
728 res = a_as608_uart_decode(handle, 400, &addr_check, buf, &len);
733 if (addr_check != addr)
787 handle->
debug_print(
"as608: uart write failed.\n");
792 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
797 if (addr_check != addr)
811 *score = (uint16_t)((uint16_t)buf[1] << 8) | buf[2];
837 uint16_t start_page, uint16_t page_number, uint16_t *found_page,
856 buf[2] = (start_page >> 8) & 0xFF;
857 buf[3] = (start_page >> 0) & 0xFF;
858 buf[4] = (page_number >> 8) & 0xFF;
859 buf[5] = (page_number >> 0) & 0xFF;
863 handle->
debug_print(
"as608: uart write failed.\n");
868 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
873 if (addr_check != addr)
887 *found_page = (uint16_t)((uint16_t)buf[1] << 8) | buf[2];
888 *score = (uint16_t)((uint16_t)buf[3] << 8) | buf[4];
928 handle->
debug_print(
"as608: uart write failed.\n");
933 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
938 if (addr_check != addr)
992 buf[2] = (page_number >> 8) & 0xFF;
993 buf[3] = (page_number >> 0) & 0xFF;
997 handle->
debug_print(
"as608: uart write failed.\n");
1002 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
1007 if (addr_check != addr)
1048 uint32_t addr_check;
1061 buf[2] = (page_number >> 8) & 0xFF;
1062 buf[3] = (page_number >> 0) & 0xFF;
1066 handle->
debug_print(
"as608: uart write failed.\n");
1071 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
1076 if (addr_check != addr)
1114 uint8_t *output_buffer, uint16_t *output_len,
as608_status_t *status)
1121 uint32_t addr_check;
1137 handle->
debug_print(
"as608: uart write failed.\n");
1142 res = a_as608_uart_decode_with_length(handle, 12, 100, &addr_check,
1148 if (addr_check != addr)
1171 res = a_as608_uart_parse_data(handle, 100, &addr_check,
1172 output_buffer + point,
1173 &l, &end_enable, &full_enable);
1178 if (addr_check != addr)
1197 *output_len = point;
1221 uint8_t *input_buffer, uint16_t input_len,
as608_status_t *status)
1229 uint32_t addr_check;
1245 handle->
debug_print(
"as608: uart write failed.\n");
1250 res = a_as608_uart_decode_with_length(handle, 12, 100, &addr_check, buf, &len);
1255 if (addr_check != addr)
1274 for (i = 0; i < m; i++)
1281 handle->
debug_print(
"as608: uart write failed.\n");
1291 handle->
debug_print(
"as608: uart write failed.\n");
1299 for (i = 0; i < (m - 1); i++)
1306 handle->
debug_print(
"as608: uart write failed.\n");
1317 handle->
debug_print(
"as608: uart write failed.\n");
1353 uint32_t addr_check;
1368 handle->
debug_print(
"as608: uart write failed.\n");
1373 res = a_as608_uart_decode_with_length(handle, 12, 100,
1374 &addr_check, buf, &len);
1379 if (addr_check != addr)
1402 res = a_as608_uart_parse_data(handle, 100, &addr_check,
1403 output_buffer + point,
1404 &l, &end_enable, &full_enable);
1409 if (addr_check != addr)
1428 *output_len = point;
1459 uint32_t addr_check;
1474 handle->
debug_print(
"as608: uart write failed.\n");
1479 res = a_as608_uart_decode_with_length(handle, 12, 100, &addr_check, buf, &len);
1484 if (addr_check != addr)
1503 for (i = 0; i < m; i++)
1510 handle->
debug_print(
"as608: uart write failed.\n");
1520 handle->
debug_print(
"as608: uart write failed.\n");
1528 for (i = 0; i < (m - 1); i++)
1535 handle->
debug_print(
"as608: uart write failed.\n");
1546 handle->
debug_print(
"as608: uart write failed.\n");
1578 uint32_t addr_check;
1590 buf[1] = (page_number >> 8) & 0xFF;
1591 buf[2] = (page_number >> 0) & 0xFF;
1592 buf[3] = (number >> 8) & 0xFF;
1593 buf[4] = (number >> 0) & 0xFF;
1597 handle->
debug_print(
"as608: uart write failed.\n");
1602 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
1607 if (addr_check != addr)
1645 uint32_t addr_check;
1660 handle->
debug_print(
"as608: uart write failed.\n");
1665 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
1670 if (addr_check != addr)
1709 uint32_t addr_check;
1726 handle->
debug_print(
"as608: uart write failed.\n");
1731 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
1736 if (addr_check != addr)
1775 uint32_t addr_check;
1792 handle->
debug_print(
"as608: uart write failed.\n");
1797 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
1802 if (addr_check != addr)
1841 uint32_t addr_check;
1858 handle->
debug_print(
"as608: uart write failed.\n");
1863 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
1868 if (addr_check != addr)
1882 handle->
packet_size = (uint16_t)(32.0f * powf(2.0f,
1883 (
float)((uint16_t)size)));
1909 uint32_t addr_check;
1924 handle->
debug_print(
"as608: uart write failed.\n");
1929 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
1934 if (addr_check != addr)
1948 param->
status = (uint16_t)((uint16_t)buf[1] << 8) | buf[2];
1950 ((uint16_t)((uint16_t)buf[3] << 8) | buf[4]);
1953 ((uint16_t)((uint16_t)buf[7] << 8) | buf[8]);
1954 param->
address = (uint32_t)((uint32_t)buf[9] << 24) |
1955 (uint32_t)((uint32_t)buf[10] << 16) |
1956 (uint32_t)((uint32_t)buf[11] << 8) |
1957 (uint32_t)((uint32_t)buf[12] << 0);
1959 ((uint16_t)((uint16_t)buf[13] << 8) | buf[14]);
1960 param->
n_9600 = (uint16_t)((uint16_t)buf[15] << 8) | buf[16];
1986 uint32_t addr_check;
2001 handle->
debug_print(
"as608: uart write failed.\n");
2006 res = a_as608_uart_decode(handle, 1000, &addr_check, buf, &len);
2011 if (addr_check != addr)
2025 *page_number = (uint16_t)((uint16_t)buf[1]) | buf[2];
2052 uint32_t addr_check;
2067 handle->
debug_print(
"as608: uart write failed.\n");
2072 res = a_as608_uart_decode(handle, 1000, &addr_check, buf, &len);
2077 if (addr_check != addr)
2091 *page_number = (uint16_t)((uint16_t)buf[1]) | buf[2];
2092 *score = (uint16_t)((uint16_t)buf[3]) | buf[4];
2118 uint32_t addr_check;
2130 buf[1] = (password >> 24) & 0xFF;
2131 buf[2] = (password >> 16) & 0xFF;
2132 buf[3] = (password >> 8) & 0xFF;
2133 buf[4] = (password >> 0) & 0xFF;
2137 handle->
debug_print(
"as608: uart write failed.\n");
2142 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
2147 if (addr_check != addr)
2186 uint32_t addr_check;
2198 buf[1] = (password >> 24) & 0xFF;
2199 buf[2] = (password >> 16) & 0xFF;
2200 buf[3] = (password >> 8) & 0xFF;
2201 buf[4] = (password >> 0) & 0xFF;
2205 handle->
debug_print(
"as608: uart write failed.\n");
2210 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
2215 if (addr_check != addr)
2254 uint32_t addr_check;
2269 handle->
debug_print(
"as608: uart write failed.\n");
2274 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
2279 if (addr_check != addr)
2293 *randn = (uint32_t)((uint32_t)buf[1] << 24) |
2294 (uint32_t)((uint32_t)buf[2] << 16) |
2295 (uint32_t)((uint32_t)buf[3] << 8) |
2296 (uint32_t)((uint32_t)buf[4] << 0);
2322 uint32_t addr_check;
2334 buf[1] = (new_addr >> 24) & 0xFF;
2335 buf[2] = (new_addr >> 16) & 0xFF;
2336 buf[3] = (new_addr >> 8) & 0xFF;
2337 buf[4] = (new_addr >> 0) & 0xFF;
2341 handle->
debug_print(
"as608: uart write failed.\n");
2346 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
2351 if (addr_check != new_addr)
2388 uint8_t *output_buffer, uint16_t *output_len,
as608_status_t *status)
2395 uint32_t addr_check;
2410 handle->
debug_print(
"as608: uart write failed.\n");
2415 res = a_as608_uart_decode_with_length(handle, 12, 100, &addr_check,
2421 if (addr_check != addr)
2444 res = a_as608_uart_parse_data(handle, 100, &addr_check,
2445 output_buffer + point,
2446 &l, &end_enable, &full_enable);
2451 if (addr_check != addr)
2470 *output_len = point;
2496 uint32_t addr_check;
2512 handle->
debug_print(
"as608: uart write failed.\n");
2517 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
2522 if (addr_check != addr)
2563 uint32_t addr_check;
2573 if (page_number > 16)
2575 handle->
debug_print(
"as608: page_number > 16.\n");
2581 buf[1] = page_number;
2582 memcpy(&buf[2], data, 32);
2586 handle->
debug_print(
"as608: uart write failed.\n");
2591 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
2596 if (addr_check != addr)
2637 uint32_t addr_check;
2647 if (page_number > 16)
2649 handle->
debug_print(
"as608: page_number > 16.\n");
2655 buf[1] = page_number;
2659 handle->
debug_print(
"as608: uart write failed.\n");
2664 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
2669 if (addr_check != addr)
2683 memcpy(data, &buf[1], 32);
2707 uint8_t *input_buffer, uint16_t input_len,
as608_status_t *status)
2715 uint32_t addr_check;
2731 handle->
debug_print(
"as608: uart write failed.\n");
2736 res = a_as608_uart_decode_with_length(handle, 12, 100, &addr_check, buf, &len);
2741 if (addr_check != addr)
2760 for (i = 0; i < m; i++)
2767 handle->
debug_print(
"as608: uart write failed.\n");
2777 handle->
debug_print(
"as608: uart write failed.\n");
2785 for (i = 0; i < (m - 1); i++)
2792 handle->
debug_print(
"as608: uart write failed.\n");
2803 handle->
debug_print(
"as608: uart write failed.\n");
2834 uint16_t start_page, uint16_t page_number,
2835 uint16_t *found_page, uint16_t *score,
2841 uint32_t addr_check;
2853 buf[1] = buffer_number;
2854 buf[2] = (start_page >> 8) & 0xFF;
2855 buf[3] = (start_page >> 0) & 0xFF;
2856 buf[4] = (page_number >> 8) & 0xFF;
2857 buf[5] = (page_number >> 0) & 0xFF;
2861 handle->
debug_print(
"as608: uart write failed.\n");
2866 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
2871 if (addr_check != addr)
2885 *found_page = (uint16_t)((uint16_t)buf[1] << 8) | buf[2];
2886 *score = (uint16_t)((uint16_t)buf[3] << 8) | buf[4];
2912 uint32_t addr_check;
2928 handle->
debug_print(
"as608: uart write failed.\n");
2933 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
2938 if (addr_check != addr)
2977 uint32_t addr_check;
2992 handle->
debug_print(
"as608: uart write failed.\n");
2997 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
3002 if (addr_check != addr)
3016 *num = (uint16_t)((uint16_t)buf[1] << 8) | buf[2];
3045 uint32_t addr_check;
3058 buf[2] = input_level;
3062 handle->
debug_print(
"as608: uart write failed.\n");
3067 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
3072 if (addr_check != addr)
3115 uint32_t addr_check;
3137 handle->
debug_print(
"as608: uart write failed.\n");
3142 res = a_as608_uart_decode(handle, 300, &addr_check, buf, &len);
3147 if (addr_check != addr)
3161 memcpy(table, &buf[1], 32);
3209 handle->
debug_print(
"as608: fingerprint image error.\n");
3215 handle->
debug_print(
"as608: fingerprint image too dry.\n");
3221 handle->
debug_print(
"as608: fingerprint image too wet.\n");
3227 handle->
debug_print(
"as608: fingerprint too clutter.\n");
3233 handle->
debug_print(
"as608: fingerprint feature too few.\n");
3251 handle->
debug_print(
"as608: feature combine error.\n");
3257 handle->
debug_print(
"as608: fingerprint lib addr is over.\n");
3263 handle->
debug_print(
"as608: fingerprint lib read error.\n");
3269 handle->
debug_print(
"as608: upload feature error.\n");
3281 handle->
debug_print(
"as608: upload image error.\n");
3287 handle->
debug_print(
"as608: delete lib error.\n");
3299 handle->
debug_print(
"as608: enter low power error.\n");
3359 handle->
debug_print(
"as608: flash header error.\n");
3365 handle->
debug_print(
"as608: flash length error.\n");
3371 handle->
debug_print(
"as608: flash length too long.\n");
3377 handle->
debug_print(
"as608: flash write error.\n");
3401 handle->
debug_print(
"as608: note page invalid.\n");
3454 uint8_t *input_buffer, uint16_t input_len,
3455 uint16_t ms, uint8_t *output_buffer, uint16_t *output_len)
3458 uint32_t addr_check;
3469 res = a_as608_uart_write(handle, addr, type, input_buffer, input_len);
3472 handle->
debug_print(
"as608: uart write failed.\n");
3476 res = a_as608_uart_decode(handle, ms, &addr_check, output_buffer, output_len);
3481 if (addr_check != addr)
#define AS608_COMMAND_BURN_CODE
#define AS608_COMMAND_REG_MODEL
#define AS608_COMMAND_DELETE_CHAR
#define AS608_COMMAND_DOWN_IMAGE
#define AS608_COMMAND_READ_SYS_PARA
#define AS608_COMMAND_PORT_CONTROL
#define AS608_COMMAND_GET_RANDOM_CODE
#define AS608_COMMAND_MATCH
#define AS608_TYPE_RESPONSE
#define AS608_COMMAND_DOWN_CHAR
#define AS608_COMMAND_HIGH_SPEED_SEARCH
#define AS608_TYPE_COMMAND
chip type definition
#define SUPPLY_VOLTAGE_MAX
#define AS608_COMMAND_SEARCH
#define AS608_COMMAND_WRITE_NOTEPAD
#define AS608_COMMAND_IDENTIFY
#define AS608_COMMAND_SET_PWD
#define AS608_COMMAND_GEN_CHAR
#define AS608_COMMAND_USER_GPIO
#define MANUFACTURER_NAME
#define SUPPLY_VOLTAGE_MIN
#define AS608_COMMAND_VFY_PWD
#define AS608_COMMAND_LOAD_CHAR
#define AS608_COMMAND_ENROLL
#define AS608_COMMAND_READ_INDEX_TABLE
#define AS608_COMMAND_VALID_TEMPLATE_NUM
#define AS608_COMMAND_READ_INFO_PAGE
#define AS608_COMMAND_EMPTY
#define AS608_COMMAND_READ_NOTEPAD
#define CHIP_NAME
chip information definition
#define AS608_COMMAND_SET_CHIP_ADDR
#define AS608_COMMAND_UP_CHAR
#define AS608_COMMAND_UP_IMAGE
#define AS608_COMMAND_GEN_BIN_IMAGE
#define AS608_COMMAND_STORE_CHAR
#define AS608_COMMAND_GET_IMAGE
chip command definition
#define AS608_COMMAND_WRITE_REG
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
as608_sensor_type_t
as608 sensor type enumeration definition
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_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_random(as608_handle_t *handle, uint32_t addr, uint32_t *randn, as608_status_t *status)
get random
uint8_t as608_init(as608_handle_t *handle, uint32_t addr)
initialize the chip
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_generate_feature(as608_handle_t *handle, uint32_t addr, as608_buffer_number_t num, as608_status_t *status)
generate feature
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_store_feature(as608_handle_t *handle, uint32_t addr, as608_buffer_number_t num, uint16_t page_number, as608_status_t *status)
store feature
as608_status_t
as608 status enumeration definition
uint8_t as608_info(as608_info_t *info)
get chip's information
uint8_t as608_set_password(as608_handle_t *handle, uint32_t addr, uint32_t password, as608_status_t *status)
set password
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_write_notepad(as608_handle_t *handle, uint32_t addr, uint8_t page_number, uint8_t data[32], as608_status_t *status)
write notepad
as608_bool_t
as608 bool enumeration definition
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_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_get_image(as608_handle_t *handle, uint32_t addr, as608_status_t *status)
get image
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_get_last_status(as608_handle_t *handle, as608_status_t *status)
get the last status
as608_gpio_level_t
as608 gpio level enumeration definition
uint8_t as608_combine_feature(as608_handle_t *handle, uint32_t addr, as608_status_t *status)
combine feature
uint8_t as608_print_status(as608_handle_t *handle, as608_status_t status)
print status
as608_buffer_number_t
as608 buffer number enumeration definition
as608_gpio_number_t
as608 gpio number enumeration definition
uint8_t as608_match_feature(as608_handle_t *handle, uint32_t addr, uint16_t *score, as608_status_t *status)
match feature
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_set_level(as608_handle_t *handle, uint32_t addr, as608_level_t level, as608_status_t *status)
set level
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_set_baud_rate(as608_handle_t *handle, uint32_t addr, uint8_t n_9600, as608_status_t *status)
set baud rate
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_deinit(as608_handle_t *handle)
close the chip
uint8_t as608_identify(as608_handle_t *handle, uint32_t addr, uint16_t *page_number, uint16_t *score, as608_status_t *status)
identify
as608_burn_code_mode_t
as608 burn code mode enumeration definition
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_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_read_notepad(as608_handle_t *handle, uint32_t addr, uint8_t page_number, uint8_t data[32], as608_status_t *status)
read notepad
as608_packet_size_t
as608 packet size enumeration definition
uint8_t as608_empty_all_feature(as608_handle_t *handle, uint32_t addr, as608_status_t *status)
empty all feature
as608_image_t
as608 image enumeration definition
as608_level_t
as608 level enumeration definition
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_generate_bin_image(as608_handle_t *handle, uint32_t addr, as608_image_t image, as608_status_t *status)
generate bin image
uint8_t as608_verify_password(as608_handle_t *handle, uint32_t addr, uint32_t password, as608_status_t *status)
verify password
uint8_t as608_enroll(as608_handle_t *handle, uint32_t addr, uint16_t *page_number, as608_status_t *status)
enroll
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_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
@ AS608_STATUS_FEATURE_COMBINE_ERROR
@ AS608_STATUS_UPDATE_ERROR
@ AS608_STATUS_DATA_INVALID
@ AS608_STATUS_BUFFER_INVALID
@ AS608_STATUS_F0_RESPONSE
@ AS608_STATUS_FRAME_ERROR
@ AS608_STATUS_F1_RESPONSE
@ AS608_STATUS_LIB_CLEAR_ERROR
@ AS608_STATUS_INPUT_ERROR
@ AS608_STATUS_FLASH_WRITE_SUM_ERROR
@ AS608_STATUS_PORT_INVALID
@ AS608_STATUS_IMAGE_TOO_CLUTTER
@ AS608_STATUS_IMAGE_TOO_WET
@ AS608_STATUS_IMAGE_TOO_FEW_FEATURE
@ AS608_STATUS_REG_INVALID
@ AS608_STATUS_FLASH_WRITE_ERROR
@ AS608_STATUS_NO_FINGERPRINT
@ AS608_STATUS_FLASH_ERROR
@ AS608_STATUS_LIB_DELETE_ERROR
@ AS608_STATUS_ENROOL_ERROR
@ AS608_STATUS_FLASH_WRITE_LENGTH_TOO_LONG
@ AS608_STATUS_COMMAND_INVALID
@ AS608_STATUS_LIB_ADDR_OVER
@ AS608_STATUS_ENTER_LOW_POWER_ERROR
@ AS608_STATUS_RESET_ERROR
@ AS608_STATUS_NOTE_PAGE_INVALID
@ AS608_STATUS_UPLOAD_FEATURE_ERROR
@ AS608_STATUS_FLASH_WRITE_HEADER_ERROR
@ AS608_STATUS_FLASH_WRITE_LENGTH_ERROR
@ AS608_STATUS_UPLOAD_IMAGE_ERROR
@ AS608_STATUS_LIB_READ_ERROR
@ AS608_STATUS_IMAGE_TOO_DRY
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
as608 handle structure definition
uint8_t(* uart_flush)(void)
uint8_t(* uart_write)(uint8_t *buf, uint16_t len)
void(* delay_ms)(uint32_t ms)
uint8_t(* uart_deinit)(void)
void(* debug_print)(const char *const fmt,...)
uint16_t(* uart_read)(uint8_t *buf, uint16_t len)
uint8_t(* uart_init)(void)
as608 information structure definition
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v
as608 params structure definition
as608_sensor_type_t sensor_type
uint16_t fingerprint_size
as608_packet_size_t packet_size