Commit Graph

135 Commits

Author SHA1 Message Date
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
Matt Ranostay 7b0a57fd1c ols: add swap channels feature
Allow channel groups to be swapped. This is useful
for demux at 200mhz with the unbuffered channels.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-28 10:21:59 +02:00
Matt Ranostay eb1b610b12 ols: add external clock support
Add external clock support that allows you to use the tracing
targets bus clock line for sampling.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-26 10:28:45 +02:00
Marcus Comstedt db11d7d2d0 saleae-logic16: Add voltage threshold conf. 2013-08-20 19:55:57 +02:00
Bert Vermeulen 6caeef6ee5 Add SR_CONF key for data source 2013-06-19 12:23:17 +02:00
Bert Vermeulen 32de50b7f3 Add SR_CONF key for powering off a device 2013-06-17 16:17:39 +02:00
Bert Vermeulen 8417ebad12 Add SR_CONF key for sound pressure level measurement range 2013-06-17 16:17:39 +02:00
Bert Vermeulen 9fd6bc2054 Add SR_CONF keys for max/min hold modes 2013-06-17 16:17:39 +02:00
Bert Vermeulen fd8854c4d0 Add SR_CONF keys for sound pressure level time and frequency weighting 2013-06-17 16:17:39 +02:00
Bert Vermeulen 3e62166ed3 Add SR_ERR_TIMEOUT 2013-06-17 16:17:38 +02:00
Bert Vermeulen 17f63de642 Fix output API receive() function
This changes the new output API's recv() to receive(), and has it
return an integer status code. The output of the function, if any,
is stored in a new parameter as a pointer to a newly allocated GString.

All output modules using this API have been adjusted.
2013-04-27 17:29:46 +02:00
Martin Ling 9c48c2e91e Remove SR_MAX_NUM_PROBES, which is now no longer used. 2013-04-27 15:49:50 +02:00
Uwe Hermann 409a811b8c error.c: Add SR_ERR_DEV_CLOSED. 2013-04-27 10:49:52 +02:00
Bert Vermeulen b9470914d0 Remove sr_rational 2013-04-26 22:51:12 +02:00
Bert Vermeulen e73ffd4238 Enforce open device before config_set()/dev_acquisition_start() 2013-04-24 22:03:50 +02:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Bert Vermeulen 9e2e98640a sr: add conn to sdi, for storing a ptr to device-specific connection info
What's in conn depends on the long-ignored inst_type field.
2013-04-16 17:57:08 +02:00
Martin Ling 2726474a61 Add a void *cb_data parameter to datafeed callbacks. 2013-04-16 11:13:18 +02:00
Bert Vermeulen bd6fbf628a drivers: return SR_ERR_NA on unsupported config key
Fixes bug 89.
2013-04-16 11:00:55 +02:00
Alexandru Gagniuc 33c6e4c5a4 session: Make sr_session_stop thread-safe
With the sigrok session running in a worker thread, if sr_session_stop is called
from another thread, it shuts down the pollfds used by the hardware drivers,
without ensuring that the sigrok event loop is no longer using those pollfds.

On the demo driver, this involves shutting down the GIOChannels, causing a
segfault when the sigrok event loop tries to use them. This is evident when
using the Stop button in PulseView, while the session is running.

This isn't a problem with just the demo driver; any driver's resources may be
freed by sr_session_stop concurrently with the sigrok session running.

To solve this problem, we don't touch the session itself in sr_session_stop().
Instead, we mark it for decommissioning and return. The session polls this flag,
and shuts itself down when requested.

This fixes bug 4.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2013-04-14 23:39:15 +02:00
Bert Vermeulen 2efa699fda Add SR_CONF keys to report the number of timebases and vdivs
Number of timebases is needed to properly interpret a frame's worth
of samples. Number of vertical divisions isn't, but may nevertheless
be interesting for a frontend that wants to reproduce the scope's
native display.
2013-04-11 18:32:08 +02:00
Bert Vermeulen 38f1e846a8 struct sr_samplerates is now obsolete
sr_config_get() of SR_CONF_SAMPLERATE now returns a GVARIANT_TYPE_DICTIONARY.
This dictionary contains a single key-value pair. Possible values for the key:

 - "samplerates": the value is an array of GVARIANT_TYPE_UINT64 representing
   all valid samplerates.
 - "samplerate-steps": the value is an array of GVARIANT_TYPE_UINT64 with
   exactly three members, which represent the lowest samplerate, highest
   samplerate, and the minimum step, respectively.
2013-04-11 18:32:06 +02:00
Bert Vermeulen bc1c2f001a Use GVariant for sr_config_*() functions
sr_config_get() provides a GVariant owned by the caller, so it must be
released with g_variant_unref() when done.

sr_config_set() takes a GVariant from the caller which may be floating;
it will be properly sunk and release after use by this function. Thus
the output of g_variant_new_*() may be used as an argument.

sr_config_list() also provides a GVariant owned by the caller, to be
unreferenced when done.

sr_config_make() can take a floating reference.
2013-04-11 18:32:06 +02:00