Name

comedi_connect_route — connect device-global route

Synopsis

#include <comedilib.h>
int comedi_connect_route(comedi_t * device,
 unsigned int source,
 unsigned int destination);
 

Status

alpha

Description

This function connects a globally-named route if such is connectible. This operation is effectively the same as calling comedi_set_routing and comedi_dio_config on the appropriate subdevice. There are several routes that are not globally connectable via comedi_connect_route, such as (NI_PFI(i) --> NI_AO_SampleClock) as they must be connected via a trigger argument, such as comedi_cmd->start_arg for NI_AO_StartTrigger.

The source parameter specifies the source of the signal route, whereas the destination parameter specifies the destination. Possible values for source and destination are driver dependent but are generally required to be values that are recognizable globally for a particular device, independent of sub-device.

Return value

0 on success, -1 on error (and errno is set appropriately--EALREADY: route is already connected; EINVAL: route invalid for this device; EBUSY: destination selector used for another route).