35 lines
725 B
C
35 lines
725 B
C
// 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
|