Add comedi_disarm() and bump to 0.11.0
Add the comedi_disarm() function to send the INSN_CONFIG_DISARM configuration instruction to a subdevice. In configure.ac, bump the comedilib libtool version code to 11:0:11, so the comedilib version becomes 0.11.0. Also bump the comedilib manual version to 0.11.0 in doc/comedilib.ent.
This commit is contained in:
parent
0378db7399
commit
2062d615ff
6 changed files with 41 additions and 4 deletions
|
@ -18,9 +18,9 @@
|
||||||
# else if any interface has been added, `c:r:a' becomes `c+1:0:a+1';
|
# else if any interface has been added, `c:r:a' becomes `c+1:0:a+1';
|
||||||
# else, `c:r:a' becomes `c:r+1:a'.
|
# else, `c:r:a' becomes `c:r+1:a'.
|
||||||
#
|
#
|
||||||
m4_define([comedilib_lt_current], [10])
|
m4_define([comedilib_lt_current], [11])
|
||||||
m4_define([comedilib_lt_revision], [3])
|
m4_define([comedilib_lt_revision], [0])
|
||||||
m4_define([comedilib_lt_age], [10])
|
m4_define([comedilib_lt_age], [11])
|
||||||
# Set 'letter', normally empty. See below for rules.
|
# Set 'letter', normally empty. See below for rules.
|
||||||
m4_define([comedilib_version_letter], [])
|
m4_define([comedilib_version_letter], [])
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<!ENTITY comedi '<ulink url="http://www.comedi.org"><acronym>Comedi</acronym></ulink>'>
|
<!ENTITY comedi '<ulink url="http://www.comedi.org"><acronym>Comedi</acronym></ulink>'>
|
||||||
<!ENTITY comedilib_version '0.10.3'>
|
<!ENTITY comedilib_version '0.11.0'>
|
||||||
|
|
|
@ -17,6 +17,19 @@ Description:
|
||||||
Returns:
|
Returns:
|
||||||
<literal>0</literal> on success, <literal>-1</literal> on error.
|
<literal>0</literal> on success, <literal>-1</literal> on error.
|
||||||
|
|
||||||
|
Function: comedi_disarm -- disarm a subdevice
|
||||||
|
Retval: int
|
||||||
|
Param: comedi_t * device
|
||||||
|
Param: unsigned int subdevice
|
||||||
|
Status: alpha
|
||||||
|
Description:
|
||||||
|
This function disarms a subdevice. It may, for example, stop a counter
|
||||||
|
counting. This function is only useable on subdevices that provide
|
||||||
|
support for the <constant>INSN_CONFIG_DISARM</constant> configuration
|
||||||
|
instruction.
|
||||||
|
Returns:
|
||||||
|
<literal>0</literal> on success, <literal>-1</literal> on error.
|
||||||
|
|
||||||
Function: comedi_get_clock_source -- get master clock for a subdevice
|
Function: comedi_get_clock_source -- get master clock for a subdevice
|
||||||
Retval: int
|
Retval: int
|
||||||
Param: comedi_t * device
|
Param: comedi_t * device
|
||||||
|
|
|
@ -286,6 +286,7 @@ lsampl_t comedi_from_physical(double data,
|
||||||
int comedi_internal_trigger(comedi_t *dev, unsigned subd, unsigned trignum);
|
int comedi_internal_trigger(comedi_t *dev, unsigned subd, unsigned trignum);
|
||||||
/* INSN_CONFIG wrappers */
|
/* INSN_CONFIG wrappers */
|
||||||
int comedi_arm(comedi_t *device, unsigned subdevice, unsigned source);
|
int comedi_arm(comedi_t *device, unsigned subdevice, unsigned source);
|
||||||
|
int comedi_disarm(comedi_t *device, unsigned subdevice);
|
||||||
int comedi_reset(comedi_t *device, unsigned subdevice);
|
int comedi_reset(comedi_t *device, unsigned subdevice);
|
||||||
int comedi_get_clock_source(comedi_t *device, unsigned subdevice, unsigned channel, unsigned *SWIG_OUTPUT(clock), unsigned *SWIG_OUTPUT(period_ns));
|
int comedi_get_clock_source(comedi_t *device, unsigned subdevice, unsigned channel, unsigned *SWIG_OUTPUT(clock), unsigned *SWIG_OUTPUT(period_ns));
|
||||||
int comedi_get_gate_source(comedi_t *device, unsigned subdevice, unsigned channel,
|
int comedi_get_gate_source(comedi_t *device, unsigned subdevice, unsigned channel,
|
||||||
|
|
|
@ -63,6 +63,24 @@ int _comedi_arm(comedi_t *device, unsigned subdevice, unsigned target)
|
||||||
else return -1;
|
else return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EXPORT_ALIAS_DEFAULT(_comedi_disarm,comedi_disarm,0.11.0);
|
||||||
|
int _comedi_disarm(comedi_t *device, unsigned subdevice)
|
||||||
|
{
|
||||||
|
comedi_insn insn;
|
||||||
|
lsampl_t data[1];
|
||||||
|
|
||||||
|
memset(&insn, 0, sizeof(comedi_insn));
|
||||||
|
insn.insn = INSN_CONFIG;
|
||||||
|
insn.subdev = subdevice;
|
||||||
|
insn.chanspec = 0;
|
||||||
|
insn.data = data;
|
||||||
|
insn.n = sizeof(data) / sizeof(data[0]);
|
||||||
|
data[0] = INSN_CONFIG_DISARM;
|
||||||
|
|
||||||
|
if(comedi_do_insn(device, &insn) >= 0) return 0;
|
||||||
|
else return -1;
|
||||||
|
}
|
||||||
|
|
||||||
EXPORT_ALIAS_DEFAULT(_comedi_get_clock_source,comedi_get_clock_source,0.10.0);
|
EXPORT_ALIAS_DEFAULT(_comedi_get_clock_source,comedi_get_clock_source,0.10.0);
|
||||||
int _comedi_get_clock_source(comedi_t *device, unsigned subdevice, unsigned channel, unsigned *clock, unsigned *period_ns)
|
int _comedi_get_clock_source(comedi_t *device, unsigned subdevice, unsigned channel, unsigned *clock, unsigned *period_ns)
|
||||||
{
|
{
|
||||||
|
|
|
@ -116,3 +116,8 @@ v0.10.0 {
|
||||||
comedi_get_clock_source;
|
comedi_get_clock_source;
|
||||||
comedi_set_clock_source;
|
comedi_set_clock_source;
|
||||||
} v0.9.0;
|
} v0.9.0;
|
||||||
|
|
||||||
|
v0.11.0 {
|
||||||
|
global:
|
||||||
|
comedi_disarm;
|
||||||
|
} v0.10.0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue