Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | * AuthenTec AES2660 driver for libfprint | ||
3 | * Copyright (C) 2012 Vasily Khoruzhick | ||
4 | * | ||
5 | * This library is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU Lesser General Public | ||
7 | * License as published by the Free Software Foundation; either | ||
8 | * version 2.1 of the License, or (at your option) any later version. | ||
9 | * | ||
10 | * This library is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * Lesser General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU Lesser General Public | ||
16 | * License along with this library; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | |||
20 | #define FP_COMPONENT "aes2660" | ||
21 | |||
22 | #include "drivers_api.h" | ||
23 | #include "aeslib.h" | ||
24 | #include "aesx660.h" | ||
25 | #include "aes2660.h" | ||
26 | |||
27 | #define FRAME_WIDTH 192 | ||
28 | #define IMAGE_WIDTH (FRAME_WIDTH + (FRAME_WIDTH / 2)) | ||
29 | |||
30 | struct _FpiDeviceAes2660 | ||
31 | { | ||
32 | FpiDeviceAesX660 parent; | ||
33 | }; | ||
34 | G_DECLARE_FINAL_TYPE (FpiDeviceAes2660, fpi_device_aes2660, FPI, | ||
35 | DEVICE_AES2660, FpiDeviceAesX660); | ||
36 |
4/5✓ Branch 0 taken 120 times.
✓ Branch 1 taken 24 times.
✓ Branch 2 taken 120 times.
✓ Branch 3 taken 120 times.
✗ Branch 4 not taken.
|
768 | G_DEFINE_TYPE (FpiDeviceAes2660, fpi_device_aes2660, FPI_TYPE_DEVICE_AES_X660); |
37 | |||
38 | static struct fpi_frame_asmbl_ctx assembling_ctx = { | ||
39 | .frame_width = FRAME_WIDTH, | ||
40 | .frame_height = AESX660_FRAME_HEIGHT, | ||
41 | .image_width = IMAGE_WIDTH, | ||
42 | .get_pixel = aes_get_pixel, | ||
43 | }; | ||
44 | |||
45 | static const FpIdEntry id_table[] = { | ||
46 | { .vid = 0x08ff, .pid = 0x2660, }, | ||
47 | { .vid = 0x08ff, .pid = 0x2680, }, | ||
48 | { .vid = 0x08ff, .pid = 0x2681, }, | ||
49 | { .vid = 0x08ff, .pid = 0x2682, }, | ||
50 | { .vid = 0x08ff, .pid = 0x2683, }, | ||
51 | { .vid = 0x08ff, .pid = 0x2684, }, | ||
52 | { .vid = 0x08ff, .pid = 0x2685, }, | ||
53 | { .vid = 0x08ff, .pid = 0x2686, }, | ||
54 | { .vid = 0x08ff, .pid = 0x2687, }, | ||
55 | { .vid = 0x08ff, .pid = 0x2688, }, | ||
56 | { .vid = 0x08ff, .pid = 0x2689, }, | ||
57 | { .vid = 0x08ff, .pid = 0x268a, }, | ||
58 | { .vid = 0x08ff, .pid = 0x268b, }, | ||
59 | { .vid = 0x08ff, .pid = 0x268c, }, | ||
60 | { .vid = 0x08ff, .pid = 0x268d, }, | ||
61 | { .vid = 0x08ff, .pid = 0x268e, }, | ||
62 | { .vid = 0x08ff, .pid = 0x268f, }, | ||
63 | { .vid = 0x08ff, .pid = 0x2691, }, | ||
64 | { .vid = 0, .pid = 0, .driver_data = 0 }, | ||
65 | }; | ||
66 | |||
67 | static void | ||
68 | ✗ | fpi_device_aes2660_init (FpiDeviceAes2660 *self) | |
69 | { | ||
70 | ✗ | } | |
71 | |||
72 | static void | ||
73 | 120 | fpi_device_aes2660_class_init (FpiDeviceAes2660Class *klass) | |
74 | { | ||
75 | 120 | FpDeviceClass *dev_class = FP_DEVICE_CLASS (klass); | |
76 | 120 | FpImageDeviceClass *img_class = FP_IMAGE_DEVICE_CLASS (klass); | |
77 | 120 | FpiDeviceAesX660Class *aes_class = FPI_DEVICE_AES_X660_CLASS (klass); | |
78 | |||
79 | 120 | dev_class->id = "aes2660"; | |
80 | 120 | dev_class->full_name = "AuthenTec AES2660"; | |
81 | 120 | dev_class->type = FP_DEVICE_TYPE_USB; | |
82 | 120 | dev_class->id_table = id_table; | |
83 | 120 | dev_class->scan_type = FP_SCAN_TYPE_SWIPE; | |
84 | |||
85 | 120 | img_class->bz3_threshold = 20; | |
86 | |||
87 | 120 | img_class->img_width = FRAME_WIDTH + FRAME_WIDTH / 2; | |
88 | 120 | img_class->img_height = -1; | |
89 | |||
90 | 120 | aes_class->init_seqs[0] = aes2660_init_1; | |
91 | 120 | aes_class->init_seqs_len[0] = G_N_ELEMENTS (aes2660_init_1); | |
92 | 120 | aes_class->init_seqs[1] = aes2660_init_2; | |
93 | 120 | aes_class->init_seqs_len[1] = G_N_ELEMENTS (aes2660_init_2); | |
94 | 120 | aes_class->start_imaging_cmd = (unsigned char *) aes2660_start_imaging_cmd; | |
95 | 120 | aes_class->start_imaging_cmd_len = sizeof (aes2660_start_imaging_cmd); | |
96 | 120 | aes_class->assembling_ctx = &assembling_ctx; | |
97 | } | ||
98 |