glip  0.1.0-dev
The Generic Logic Interfacing Project
Backends

Modules

 Cypress FX2
 
 Cypress FX3
 
 JTAG
 
 TCP
 
 UART
 

Data Structures

struct  glip_option
 

Functions

int glip_get_backends (const char ***name, size_t *count)
 

Detailed Description

GLIP attempts to provide a common API for the different ways of talking to a target device. This leads to a library structure with a thin common API layer and backends which implement most of the communication functionality.

When creating a new GLIP instance with glip_new() one backend needs to be selected. Each GLIP instance can use only one backend; you can of course use more than one GLIP instance at the same time if you need to connect to different targets at the same time.

Each backend implements one communication method, such as USB 2.0, TCP or PCI Express, possibly other libraries to do the low-level communication. Most backends need a set of configuration parameters to connect to the target device. Those options are passed as key/value pairs when calling glip_new().

Backends can be enabled and disabled at compile time, as library user you cannot rely on a backend to be always present. You can use glip_get_backends() to get a list of all supported backends by the installed library version.

Function Documentation

int glip_get_backends ( const char ***  name,
size_t *  count 
)

Get a list of the names of all backends

The name array is allocated for you, you need to free the list after using it. You do not need to free any of the character strings, they are static.

const char** name;
size_t count;
glip_get_backends(&name, &count);
for (size_t i = 0; i < count; i++) {
printf("backend %zu: %s\n", i, name[i]);
}
free(name);
Parameters
[out]namearray of backend names
[out]countnumber of backends (entries in the name array)
Returns
0 if the call was successful, or an error code if something went wrong