mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-01-02 18:10:27 +01:00
Add experimental Samsung 730B driver skeleton
This commit is contained in:
parent
b069c78348
commit
dede35fade
4 changed files with 89 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
|||
*.o
|
||||
*.swp
|
||||
_build
|
||||
.cache/
|
||||
tests/__pycache__/
|
||||
|
|
|
|||
84
libfprint/drivers/samsung730b.c
Normal file
84
libfprint/drivers/samsung730b.c
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
#define FP_COMPONENT "samsung730b"
|
||||
|
||||
#include "drivers_api.h"
|
||||
|
||||
#define SAMSUNG730B_VID 0x04e8
|
||||
#define SAMSUNG730B_PID 0x730b
|
||||
|
||||
struct _FpiDeviceSamsung730b
|
||||
{
|
||||
FpImageDevice parent;
|
||||
};
|
||||
|
||||
G_DECLARE_FINAL_TYPE (FpiDeviceSamsung730b,
|
||||
fpi_device_samsung730b,
|
||||
FPI, DEVICE_SAMSUNG730B,
|
||||
FpImageDevice);
|
||||
|
||||
G_DEFINE_TYPE (FpiDeviceSamsung730b,
|
||||
fpi_device_samsung730b,
|
||||
FP_TYPE_IMAGE_DEVICE);
|
||||
|
||||
static void
|
||||
samsung730b_dev_init (FpImageDevice *dev)
|
||||
{
|
||||
fpi_image_device_open_complete (dev, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
samsung730b_dev_deinit (FpImageDevice *dev)
|
||||
{
|
||||
fpi_image_device_close_complete (dev, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
samsung730b_dev_activate (FpImageDevice *dev)
|
||||
{
|
||||
fpi_image_device_activate_complete (dev, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
samsung730b_dev_deactivate (FpImageDevice *dev)
|
||||
{
|
||||
fpi_image_device_deactivate_complete (dev, NULL);
|
||||
}
|
||||
|
||||
static const FpIdEntry samsung730b_id_table[] = {
|
||||
{
|
||||
.pid = SAMSUNG730B_PID,
|
||||
.vid = SAMSUNG730B_VID,
|
||||
.driver_data = 0,
|
||||
},
|
||||
{
|
||||
.pid = 0,
|
||||
.vid = 0,
|
||||
.driver_data = 0,
|
||||
},
|
||||
};
|
||||
|
||||
static void
|
||||
fpi_device_samsung730b_init (FpiDeviceSamsung730b *self)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
fpi_device_samsung730b_class_init (FpiDeviceSamsung730bClass *klass)
|
||||
{
|
||||
FpDeviceClass *dev_class = FP_DEVICE_CLASS (klass);
|
||||
FpImageDeviceClass *img_class = FP_IMAGE_DEVICE_CLASS (klass);
|
||||
|
||||
dev_class->id = "samsung730b";
|
||||
dev_class->full_name = "Samsung 730B (experimental)";
|
||||
dev_class->type = FP_DEVICE_TYPE_USB;
|
||||
dev_class->id_table = samsung730b_id_table;
|
||||
dev_class->scan_type = FP_SCAN_TYPE_PRESS;
|
||||
|
||||
img_class->img_open = samsung730b_dev_init;
|
||||
img_class->img_close = samsung730b_dev_deinit;
|
||||
img_class->activate = samsung730b_dev_activate;
|
||||
img_class->deactivate = samsung730b_dev_deactivate;
|
||||
|
||||
img_class->bz3_threshold = 20;
|
||||
img_class->img_width = -1;
|
||||
img_class->img_height = -1;
|
||||
}
|
||||
|
|
@ -153,6 +153,8 @@ driver_sources = {
|
|||
[ 'drivers/realtek/realtek.c' ],
|
||||
'focaltech_moc' :
|
||||
[ 'drivers/focaltech_moc/focaltech_moc.c' ],
|
||||
'samsung730b' :
|
||||
[ 'drivers/samsung730b.c' ],
|
||||
}
|
||||
|
||||
helper_sources = {
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ default_drivers = [
|
|||
'fpcmoc',
|
||||
'realtek',
|
||||
'focaltech_moc',
|
||||
'samsung730b',
|
||||
]
|
||||
|
||||
spi_drivers = [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue