Initial GXFP5130 userspace prototype

This commit is contained in:
2026-08-03 11:43:42 +03:00
commit 088d8ef75c
30 changed files with 5318 additions and 0 deletions

29
include/gxfp/protocol.h Normal file
View File

@@ -0,0 +1,29 @@
// SPDX-License-Identifier: GPL-2.0-only
#ifndef GXFP_PROTOCOL_H
#define GXFP_PROTOCOL_H
#include <stddef.h>
#include <stdint.h>
#define GXFP_MP_COMMAND 0xA0
#define GXFP_MP_RX_COMMAND 0x0A
#define GXFP_GOODIX_CHECKSUM_TARGET 0xAA
#define GXFP_GOODIX_ACK 0xB0
#define GXFP_CMD_IMAGE_CAPTURE 0x20
struct gxfp_frame_view {
uint8_t command;
const uint8_t *payload;
size_t payload_len;
uint8_t checksum;
};
int gxfp_frame_build(uint8_t command,
const void *payload, size_t payload_len,
uint8_t *output, size_t output_capacity,
size_t *output_len);
int gxfp_frame_parse(const void *frame, size_t frame_len,
struct gxfp_frame_view *view);
#endif