1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00
VILLASnode/fpga/include/villas/fpga/dma.h
Steffen Vogel 3d73c759ea Reformat all code with clang-format
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2024-02-29 19:34:27 +01:00

41 lines
1.2 KiB
C

/* C bindings for VILLASfpga
*
* Author: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
* SPDX-FileCopyrightText: 2023 Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _VILLASFPGA_DMA_H
#define _VILLASFPGA_DMA_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
typedef struct villasfpga_handle_t *villasfpga_handle;
typedef struct villasfpga_memory_t *villasfpga_memory;
villasfpga_handle villasfpga_init(const char *configFile);
void villasfpga_destroy(villasfpga_handle handle);
int villasfpga_alloc(villasfpga_handle handle, villasfpga_memory *mem,
size_t size);
int villasfpga_register(villasfpga_handle handle, villasfpga_memory *mem);
int villasfpga_free(villasfpga_memory mem);
void *villasfpga_get_ptr(villasfpga_memory mem);
int villasfpga_read(villasfpga_handle handle, villasfpga_memory mem,
size_t size);
int villasfpga_read_complete(villasfpga_handle handle, size_t *size);
int villasfpga_write(villasfpga_handle handle, villasfpga_memory mem,
size_t size);
int villasfpga_write_complete(villasfpga_handle handle, size_t *size);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // _VILLASFPGA_DMA_H