Lines Matching refs:tx_packet
22 static int transceive_packet(const struct device *dev, union r502a_packet *tx_packet, in transceive_packet() argument
28 if (tx_packet) { in transceive_packet()
32 check_sum = (pkg_len >> 8) + (pkg_len & 0xFF) + tx_packet->pid; in transceive_packet()
34 tx_packet->start = sys_cpu_to_be16(R502A_STARTCODE); in transceive_packet()
35 tx_packet->addr = sys_cpu_to_be32(cfg->comm_addr); in transceive_packet()
36 tx_packet->len = sys_cpu_to_be16(pkg_len); in transceive_packet()
39 check_sum += tx_packet->data[i]; in transceive_packet()
41 sys_put_be16(check_sum, &tx_packet->buf[data_len + R502A_HEADER_LEN]); in transceive_packet()
44 drv_data->tx_buf.data = tx_packet->buf; in transceive_packet()
193 union r502a_packet tx_packet = { in fps_set_sys_param() local
198 ret = transceive_packet(dev, &tx_packet, &rx_packet, set_sys_param_len); in fps_set_sys_param()
226 union r502a_packet tx_packet = { in r502a_read_sys_param() local
233 ret = transceive_packet(dev, &tx_packet, &rx_packet, read_sys_param_len); in r502a_read_sys_param()
285 union r502a_packet tx_packet = { in fps_led_control() local
291 ret = transceive_packet(dev, &tx_packet, &rx_packet, led_ctrl_len); in fps_led_control()
318 union r502a_packet tx_packet = { in fps_verify_password() local
323 sys_put_be32(R502A_DEFAULT_PASSWORD, &tx_packet.data[1]); in fps_verify_password()
325 ret = transceive_packet(dev, &tx_packet, &rx_packet, verify_pwd_len); in fps_verify_password()
352 union r502a_packet tx_packet = { in fps_get_template_count() local
357 ret = transceive_packet(dev, &tx_packet, &rx_packet, get_temp_cnt_len); in fps_get_template_count()
386 union r502a_packet tx_packet = { in fps_read_template_table() local
393 ret = transceive_packet(dev, &tx_packet, &rx_packet, temp_table_len); in fps_read_template_table()
441 union r502a_packet tx_packet = { in fps_get_image() local
446 ret = transceive_packet(dev, &tx_packet, &rx_packet, get_img_len); in fps_get_image()
476 union r502a_packet tx_packet = { in fps_image_to_char() local
481 ret = transceive_packet(dev, &tx_packet, &rx_packet, img_to_char_len); in fps_image_to_char()
507 union r502a_packet tx_packet = { in fps_create_model() local
512 ret = transceive_packet(dev, &tx_packet, &rx_packet, create_model_len); in fps_create_model()
546 union r502a_packet tx_packet = { in fps_store_model() local
550 sys_put_be16(id, &tx_packet.data[2]); in fps_store_model()
554 ret = transceive_packet(dev, &tx_packet, &rx_packet, store_model_len); in fps_store_model()
586 union r502a_packet tx_packet = { in fps_delete_model() local
590 sys_put_be16(id, &tx_packet.data[1]); in fps_delete_model()
591 sys_put_be16(count + R502A_DELETE_COUNT_OFFSET, &tx_packet.data[3]); in fps_delete_model()
595 ret = transceive_packet(dev, &tx_packet, &rx_packet, delete_model_len); in fps_delete_model()
623 union r502a_packet tx_packet = { in fps_empty_db() local
630 ret = transceive_packet(dev, &tx_packet, &rx_packet, empty_db_len); in fps_empty_db()
667 union r502a_packet tx_packet = { in fps_search() local
671 sys_put_be16(R02A_LIBRARY_START_IDX, &tx_packet.data[2]); in fps_search()
672 sys_put_be16(R502A_DEFAULT_CAPACITY, &tx_packet.data[4]); in fps_search()
676 ret = transceive_packet(dev, &tx_packet, &rx_packet, search_len); in fps_search()
720 union r502a_packet tx_packet = { in fps_load_template() local
724 sys_put_be16(id, &tx_packet.data[2]); in fps_load_template()
728 ret = transceive_packet(dev, &tx_packet, &rx_packet, load_tmp_len); in fps_load_template()
765 union r502a_packet tx_packet = { in fps_match_templates() local
772 ret = transceive_packet(dev, &tx_packet, &rx_packet, match_templates_len); in fps_match_templates()
851 union r502a_packet tx_packet = { in fps_upload_char_buf() local
858 ret = transceive_packet(dev, &tx_packet, &rx_packet, upload_temp_len); in fps_upload_char_buf()
918 union r502a_packet tx_packet = { in fps_download_char_buf() local
925 ret = transceive_packet(dev, &tx_packet, &rx_packet, down_temp_len); in fps_download_char_buf()
945 tx_packet.pid = R502A_DATA_PACKET; in fps_download_char_buf()
946 memcpy(tx_packet.data, &temp->data[i], CONFIG_R502A_DATA_PKT_SIZE); in fps_download_char_buf()
948 ret = transceive_packet(dev, &tx_packet, NULL, CONFIG_R502A_DATA_PKT_SIZE); in fps_download_char_buf()
956 memcpy(tx_packet.data, &temp->data[i], (R502A_TEMPLATE_MAX_SIZE - i)); in fps_download_char_buf()
957 tx_packet.pid = R502A_END_DATA_PACKET; in fps_download_char_buf()
958 ret = transceive_packet(dev, &tx_packet, NULL, (R502A_TEMPLATE_MAX_SIZE - i)); in fps_download_char_buf()