Initial GXFP5130 userspace prototype
This commit is contained in:
34
include/gxfp/fdt.h
Normal file
34
include/gxfp/fdt.h
Normal file
@@ -0,0 +1,34 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#ifndef GXFP_FDT_H
|
||||
#define GXFP_FDT_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct gxfp_device;
|
||||
struct gxfp_frame_view;
|
||||
|
||||
enum gxfp_fdt_event {
|
||||
GXFP_FDT_EVENT_NONE = 0,
|
||||
GXFP_FDT_EVENT_READY,
|
||||
GXFP_FDT_EVENT_FINGER_DOWN,
|
||||
GXFP_FDT_EVENT_FINGER_UP,
|
||||
GXFP_FDT_EVENT_REVERSE,
|
||||
};
|
||||
|
||||
struct gxfp_fdt {
|
||||
bool waiting_for_up;
|
||||
};
|
||||
|
||||
void gxfp_fdt_init(struct gxfp_fdt *fdt);
|
||||
int gxfp_fdt_arm_down(struct gxfp_device *device);
|
||||
int gxfp_fdt_arm_up(struct gxfp_device *device);
|
||||
|
||||
enum gxfp_fdt_event
|
||||
gxfp_fdt_decode(const struct gxfp_frame_view *frame, uint16_t *status);
|
||||
|
||||
int gxfp_fdt_handle_event(struct gxfp_fdt *fdt,
|
||||
struct gxfp_device *device,
|
||||
enum gxfp_fdt_event event);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user