Commit Graph

157 Commits

Author SHA1 Message Date
Bert Vermeulen 3b0ff21c8c Remove obsolete API call sr_dev_trigger_set().
Triggers are now set on the session, not on a channel.
2014-05-28 00:01:54 +02:00
Bert Vermeulen 795c9de35e Rename SR_CONF_TRIGGER_TYPE to SR_CONF_TRIGGER_MATCH.
Drivers supporting triggering need to implement this in config_list()
and return an array of int32_t consisting of SR_TRIGGER_*.
2014-05-27 23:55:26 +02:00
Bert Vermeulen 7b5e6d2978 Add new triggering framework.
The new triggers consist of a set of structs and an API to manipulate
them.  Both logic and analog triggers are supported, in an unlimited
number of stages.

A single struct sr_trigger containing its stages and triggers is then
added to the session.

In case of a driver where the hardware supports triggering, the struct
is then converted and used to arm the hardware trigger. Drivers without
hardware trigger support, such as fx2lafw or multimeter drivers, use it
as the basis for a software-based trigger implementation instead.
2014-05-27 23:53:27 +02:00
Matthias Heidbrink d0a92abd54 Whitespace and comment improvements, no semantical changes. 2014-05-19 19:44:04 +02:00
Uwe Hermann ace218f922 Rename SR_T_CHAR to SR_T_STRING.
This is more correct and less confusing.
2014-05-06 20:18:54 +02:00
Uwe Hermann 4711724141 Add/update Doxygen @since tags. 2014-05-04 20:53:53 +02:00
Uwe Hermann 768579456c libsigrok.h: Add some missing enum names for consistency. 2014-05-04 20:53:53 +02:00
Uwe Hermann 144f6660d0 Don't define names ending with _t (POSIX reserved).
Avoid defining any names ending in _t, those are generally reserved
for POSIX usage. For details see:

http://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html
http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
2014-05-04 16:16:17 +02:00
Martin Ling 831d7c70eb Add SR_CONF_DEVICE_MODE and SR_CONF_TEST_MODE config keys. 2014-05-01 11:17:35 -07:00
Martin Ling e958f9217c Give type names to all enumerations. 2014-04-25 18:15:26 +02:00
Bert Vermeulen dba3e6826e output: Introduce output module API wrappers. 2014-04-21 01:50:43 +02:00
Bert Vermeulen 44559b2c3b Remove obsolete output API. 2014-04-19 13:28:17 +02:00
Uwe Hermann fca75cbb74 A few more random 'probe' to 'channel' changes.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann f3ca73edd2 Rename a few more API calls with 'probe' in their name.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 3f239f0803 Rename various *PROBE* macros to *CHANNEL*.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann ba7dd8bbb8 Replace 'probe' with 'channel' in most places.
Also, consistently use 'ch' for channel variables. This matches how we
consistently use sdi, devc, and so on all over the code-base.

This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 91aea754aa Rename 'struct sr_probe' to 'struct sr_channel' everywhere.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 53b4680fce Consistently use 'cg' for channel group variables.
This matches how we consistently use sdi, devc, and so on all over
the code-base.

This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann a68bf88e3a Replace channel_group.probes with channel_group.channels.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 660e398fe9 Replace 'probe group' with 'channel group' everywhere.
The name 'probe' (and thus 'probe group') is a relic from the times when
sigrok was mostly about logic analyzers. Nowadays we support a lot more
device types where 'probe' is not really a good term and 'channel' is
much better suited.

This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann a84f6ad389 Fix 'aquisition' typo in a few places. 2014-03-11 19:42:20 +01:00
Matthias Heidbrink 813aab691b Update/extend some Doxygen comments. 2014-02-11 18:04:46 +01:00
Uwe Hermann 85d8aa496e sr_probe->index is no longer deprecated (for now). 2014-01-30 17:48:10 +01:00
Daniel Elstner 860bc59b0f hwdriver: Add SR_CONF_CLOCK_EDGE option.
Allow the edge of an external clock input to be configured by
means of an SR_CONF_CLOCK_EDGE configuration setting.  This is
a string option with the same format as SR_CONF_TRIGGER_SLOPE.
2014-01-30 12:04:42 +01:00
Daniel Elstner 2a854d7139 hwdriver: Introduce sr_config_commit() API call.
(sr_dev_driver.config_probe_set): New optional callback enabling
drivers to be notified upon changes to probe settings.
(sr_dev_probe_enable, sr_dev_trigger_set): Invoke new driver
callback on changes.
(sr_dev_driver.config_commit): New optional callback allowing
drivers to defer application of configuration settings until
an explicit call to config_commit().
(sr_config_commit): New public wrapper function.
2014-01-20 14:16:32 +01:00
Bert Vermeulen f0de2dd0fa Remove SR_CONF_MAX_UNCOMPRESSED_SAMPLES again.
The maximum sample size that can be set on a device is now published
by sr_config_list(SR_CONF_LIMIT_SAMPLES). This returns a tuple of
uint64_t representing minimum and maximum number of samples.
2014-01-19 17:18:59 +01:00
Bert Vermeulen 471607f024 Add config keys for programmable power supplies. 2014-01-10 00:39:36 +01:00
Bert Vermeulen d86e0b11c7 Add SR_CONF_MAX_UNCOMPRESSED_SAMPLES. 2014-01-09 12:36:05 +01:00
Bert Vermeulen bf90d4c666 Add config keys for setting the number of analog probes.
This is primarily of use in the demo driver, but this patch also
takes in the logic probe setting config key used only by the
session driver so far.
2013-12-29 10:58:56 +01:00
Bert Vermeulen 32c426d204 Add config keys for upcoming RF demodulator drivers.
Langford driver will be first.
2013-12-28 21:00:46 +01:00
Uwe Hermann df823ac444 Doxygen fixes: Hide private stuff, document some structs. 2013-12-27 16:18:28 +01:00
Aurelien Jacobs f5027ca481 add support for AVG mqflag 2013-12-23 01:21:51 +01:00
Uwe Hermann a582788653 Fix a few #include guard names. 2013-12-17 17:45:18 +01:00
Bert Vermeulen 98582bf53f Make API docs more consistent, avoid tabs to line up comments. 2013-12-09 22:49:12 +01:00
Matthias Heidbrink 04cb915716 Improved doxygen docs. 2013-12-09 15:17:17 +01:00
Bert Vermeulen c1e45c6511 Minor whitespace fix.
Really just for testing some git hooks.
2013-12-07 15:50:46 +01:00
Martin Ling 4b4474ed6a Remove SR_INST_USBTMC which is no longer used. 2013-12-03 23:29:20 +00:00
Martin Ling 23f43dff15 Make SCPI functions device independent, with separate serial backend. 2013-12-03 22:00:31 +00:00
Martin Ling ae67644fe5 Create & use new sr_usbtmc_dev_inst for Rigol DS driver. 2013-11-29 01:13:22 +00:00
Uwe Hermann e2b2382101 Make struct sr_session opaque.
The fields of this structure should not be used directly by frontends
(and none of the current ones do). Thus, make the struct opaque and hide
its contents from the API.
2013-11-22 15:02:12 +01:00
Matthias Heidbrink 367983a744 Added SR_MQ_TIME and SR_MQFLAG_DURATION. 2013-11-22 02:31:17 +01:00
Uwe Hermann a0dc461d7b doxygen: Fix/improve 'struct sr_probe_group' documentation. 2013-11-11 07:42:51 +01:00
Bert Vermeulen bdc955bc06 Add SR_ERR_PROBE_GROUP, denoting a probe group requirement 2013-11-08 01:03:18 +01:00
Martin Ling 5150ef336b probe_groups: Add a name field to sr_probe_group. 2013-11-08 01:03:17 +01:00
Bert Vermeulen 5daed4bc6d Use priv for consistency 2013-11-08 01:03:16 +01:00
Martin Ling 8f996b8948 probe_groups: API changes required to implement probe groups. 2013-11-08 01:03:16 +01:00
Aurelien Jacobs 45315d0460 add energy meter device type and related units 2013-10-24 15:41:11 +01:00
Aurelien Jacobs 87532f23a4 output/analog: add revolutions per minute unit 2013-10-07 00:36:18 +02:00
Uwe Hermann d5c5ea2a29 libsigrok.h: Fix enum entries order.
New enum items must be added at the bottom of the respective "category"
within the enum in order to not change any numbers (i.e. break the ABI).
2013-09-25 14:26:35 +02:00
Bert Vermeulen 5451816fd1 When adding a device instance to a running session, start acquisition on it 2013-09-21 17:44:49 +02:00