glip  0.1.0-dev
The Generic Logic Interfacing Project
Connection Handling

Functions

int glip_open (struct glip_ctx *ctx, unsigned int num_channels)
 
int glip_close (struct glip_ctx *ctx)
 

Detailed Description

Before communicating with a device, you need to connect to it; and after you're done, you need to disconnect. This functionality is provided by the two functions glip_open() and glip_close().

When opening a connection you need to specify the number of channels you want to open. Depending on the target device and the used GLIP backend additional connection options may be required, like the communication port, the name of the USB device, etc. All those settings are done through options that you passed when calling glip_new(). Refer to the documentation of the backend for information on the required and optional options.

Function Documentation

int glip_open ( struct glip_ctx ctx,
unsigned int  num_channels 
)

Open a connection to the target

Parameters
ctxlibrary context
num_channelsthe number of channels to open to the target
Returns
0 if the call was successful, or an error code if something went wrong
int glip_close ( struct glip_ctx ctx)

Close the connection to the target

Parameters
ctxlibrary context
Returns
0 if the call was successful, or an error code if something went wrong