Files
goodix-gxfp5130-userspace/include/gxfp/device.h

33 lines
738 B
C

// SPDX-License-Identifier: GPL-2.0-only
#ifndef GXFP_DEVICE_H
#define GXFP_DEVICE_H
#include <stddef.h>
#include <stdint.h>
struct gxfp_device {
int fd;
};
struct gxfp_rx_record {
uint32_t mp_type;
uint64_t timestamp_ns;
uint8_t *payload;
size_t payload_len;
};
int gxfp_device_open(struct gxfp_device *device, const char *path);
void gxfp_device_close(struct gxfp_device *device);
int gxfp_device_flush_rx(struct gxfp_device *device);
int gxfp_device_send_mp(struct gxfp_device *device, uint8_t mp_flags,
const void *payload, size_t payload_len);
int gxfp_device_receive(struct gxfp_device *device,
struct gxfp_rx_record *record,
int timeout_ms);
void gxfp_rx_record_release(struct gxfp_rx_record *record);
#endif