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

32
include/gxfp/device.h Normal file
View File

@@ -0,0 +1,32 @@
// 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