29 lines
552 B
C
29 lines
552 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
#ifndef GXFP_REQUEST_H
|
|
#define GXFP_REQUEST_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
struct gxfp_device;
|
|
|
|
struct gxfp_response {
|
|
uint8_t command;
|
|
uint8_t *payload;
|
|
size_t payload_len;
|
|
uint64_t timestamp_ns;
|
|
};
|
|
|
|
int gxfp_request(struct gxfp_device *device,
|
|
uint8_t command,
|
|
const void *payload,
|
|
size_t payload_len,
|
|
uint8_t expected_command,
|
|
unsigned int max_frames,
|
|
int timeout_ms,
|
|
struct gxfp_response *response);
|
|
|
|
void gxfp_response_release(struct gxfp_response *response);
|
|
|
|
#endif
|