glip
0.1.0-dev
The Generic Logic Interfacing Project
|
Data Structures | |
struct | glip_version |
Functions | |
const struct glip_version * | glip_get_version (void) |
void | glip_set_caller_ctx (struct glip_ctx *ctx, void *caller_ctx) |
void * | glip_get_caller_ctx (struct glip_ctx *ctx) |
unsigned int | glip_get_fifo_width (struct glip_ctx *ctx) |
unsigned int | glip_get_channel_count (struct glip_ctx *ctx) |
Some functionality of GLIP cannot be put into a real category, so this "Utility" group contains a mixed bag of useful library functions.
const struct glip_version* glip_get_version | ( | void | ) |
Get the version of the GLIP library
void glip_set_caller_ctx | ( | struct glip_ctx * | ctx, |
void * | caller_ctx | ||
) |
Set a caller context pointer
In some cases GLIP executes callback functions. These functions always provide the GLIP context object of type struct glip_ctx. To make it possible to associate the GLIP context with the right context of the calling application register the context or this
(in C++) pointer with GLIP and retrieve it inside the callback using glip_get_caller_ctx().
GLIP does not use this pointer in any way, you're free to set it to whatever your application needs.
ctx | the library context |
caller_ctx | the caller context pointer |
void* glip_get_caller_ctx | ( | struct glip_ctx * | ctx | ) |
Get the caller context pointer
ctx | the library context |
unsigned int glip_get_fifo_width | ( | struct glip_ctx * | ctx | ) |
Get the width of the FIFO on the logic side in bytes
Depending on the used backend and possibly the logic configuration different FIFO widths on the logic side are possible. Data is always transferred in chunks of at least one FIFO width, so make sure to always transfer at least as many bytes as the FIFO is wide.
ctx | the library context |
unsigned int glip_get_channel_count | ( | struct glip_ctx * | ctx | ) |
Get the number of supported channels
Depending on the backend (and possibly the target device) a different number of channels might be supported.
ctx | the library contexxt |