Gerhard Sittig
c83bdde9da
input: provide accessor routine for (struct sr_input *)->module
...
Add a public API routine which allows applications to query the
sr_input_module from an sr_input.
2018-05-17 22:31:27 +02:00
Uwe Hermann
3601d50e26
libsigrok.h: Fix multiple compiler warnings (-Wshift-overflow=2).
...
../include/libsigrok/libsigrok.h:653:19: warning: result of ‘1 << 31’ requires 33 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
SR_CONF_GET = (1 << 31),
^~
[...]
2018-05-16 23:57:58 +02:00
Soeren Apel
addb7340dd
Introduce sr_resourcepaths_get()
...
This provides an interface to fix #1128 .
2018-03-18 18:25:36 +01:00
Uwe Hermann
187c300b59
libsigrok.h: Fix SR_CONF_UNDER_VOLTAGE_CONDITION_THRESHOLD order.
...
This has to be the last entry in its "category", otherwise it'll mean an
ABI breakage.
2018-03-03 19:25:57 +01:00
Frank Stettner
3d70d77709
arachnid-labs-re-load-pro: Add SR_CONF_UNDER_VOLTAGE_THRESHOLD.
2018-03-03 19:10:51 +01:00
Uwe Hermann
d9b716fc5f
Use UINT64_C instead of "ULL" number suffix.
...
Avoid hardcoding a "ULL" number suffix, use the more portable and more
correct UINT64_C.
2018-02-20 20:03:21 +01:00
Frank Stettner
79034d4f39
strutil: Locale independent snprintf() and vsnprintf() functions
2018-02-11 23:15:39 +01:00
Uwe Hermann
31bdc10ec2
Add SR_CONF_POWERMETER.
2017-07-19 15:40:41 +02:00
Soeren Apel
6ad2fbaad2
Introduce A2L methods
...
The memory allocation for sr_datafeed_logic is broken, the memory
will never be freed. #994 is used to handle this issue.
2017-07-06 00:16:24 +02:00
Uwe Hermann
42be2adb5a
Add APIs to query libsigrok build information.
2017-05-26 18:00:58 +02:00
Gerhard Sittig
fe3004f5a0
minor nit, fixup whitespace in libsigrok.h
2017-05-05 18:25:10 +02:00
Soeren Apel
6984cfb245
Rework sr_period_string
2017-03-07 17:13:46 +01:00
Uwe Hermann
6928c4a928
Add SR_CONF_SIGNAL_GENERATOR.
2017-03-02 15:17:53 +01:00
Aurelien Jacobs
841aadc95b
libsigrok.h: Add SR_MQ_HARMONIC_RATIO.
2017-01-22 19:03:29 +01:00
Aurelien Jacobs
5728718b66
analog: use SI prefix only with units that accept SI prefixes
2016-10-17 02:24:53 +02:00
Aurelien Jacobs
cdc311957b
analog: use correct unit for dBm/dBV
2016-10-17 02:09:18 +02:00
Aurelien Jacobs
962172e495
analog: improve output readability by using SI prefix
2016-08-29 00:25:19 +02:00
Aurelien Jacobs
96117c5660
document encoding.digits and spec.spec_digits
2016-08-23 12:58:06 +02:00
Aurelien Jacobs
28c95cc6c4
analog: add support for negative number of digits
...
When a meter display 105.2 kΩ, libsigrok will return 105200 Ω
but it is really valuable to know that the last 2 digits are not
significant, so encoding.digits should be set to -2.
This would allow a sigrok client to display 105200 as 105.2 k
instead of 105.200 k.
2016-06-26 20:32:56 +02:00
Aurelien Jacobs
9ea62f2e0a
rigol-ds: add support for getting/setting trigger level.
2016-06-25 18:19:47 +02:00
Uwe Hermann
24f4a9d50b
session: Drop SR_DF_ANALOG_OLD support completely.
...
This closes bug #728 .
2016-06-17 15:13:12 +02:00
Stefan Brüns
17d5a11c69
analog: Implement division for sr_rational
2016-05-16 23:35:10 +02:00
Stefan Brüns
ee1b6054d6
analog: Implement multiplication for sr_rational
2016-05-16 23:35:10 +02:00
Stefan Brüns
bdba362695
analog: Add equality check for sr_rational
2016-05-16 23:35:10 +02:00
Stefan Brüns
5ec172d7e9
strutil: add method to get an sr_rational from a string
...
The method accepts strings with numbers in scientific or normal notation,
e.g. -1.25 or 3.37e-6. The numeric range is limited by the sr_rational
range, i.e +-9.2e18, resolution is ~19 digits.
2016-05-16 23:35:10 +02:00
Soeren Apel
b6b4f03e40
Input: Add reset() function
2016-05-09 13:02:29 +02:00
Uwe Hermann
695dc859c1
dev_acquisition_{start,stop}(): Drop duplicate 'cb_data' parameter.
...
These are always 'sdi', which is passed in already.
2016-04-29 19:20:53 +02:00
Alexandru Gagniuc
6d5cd3bd38
analog: Add MQ Flag for four-wire measurements
...
On the high-end bench multimeters, resistance can be measured with a
kelvin connection as well as the more common two wire method. Provide
a flag which can indicate if four-wire mode is used.
2016-04-23 17:44:26 +02:00
Alexandru Gagniuc
fadb19ac96
hwdriver: Add configuration key for number of powerline cycles
...
High precision multimeters have a special setting, called "number of
powerline cycles" (NPLC) which determines the integration time of the
ADC in terms of the power line period. Some devices need their NPLC
adjusted from the default value before they can measure at their full
rated precision.
2016-03-30 12:39:25 +02:00
Uwe Hermann
2fe1011f1d
Add SR_CONF_UNDER_VOLTAGE_CONDITION* config keys.
...
Add two new config keys:
- SR_CONF_UNDER_VOLTAGE_CONDITION
- SR_CONF_UNDER_VOLTAGE_CONDITION_ACTIVE
2016-02-11 14:42:50 +01:00
Daniel Elstner
32ba0d8005
resource: Replace ssize_t with gssize to avoid unistd.h
2016-01-04 20:53:30 +01:00
Uwe Hermann
f014a8fd4c
proto.h: Add missing unistd.h #include.
...
The ssize_t and size_t usage requires the unistd.h #include.
Thanks to Daniel Glöckner for the bug report.
This fixes bug #721 .
2016-01-03 03:00:45 +01:00
Uwe Hermann
8141a0325c
Rename sr_driver_scan_options() to sr_driver_scan_options_list().
2015-12-31 19:04:34 +01:00
Uwe Hermann
0c697a4b33
Rename sr_dev_config_capabilities() to sr_dev_config_capabilities_list().
2015-12-31 19:04:28 +01:00
Uwe Hermann
7d7fd93c94
Restore number "categories" in sr_configkey.
2015-12-31 19:00:16 +01:00
Martin Ling
e318f01b2f
Make SR_CONF_MASK an internal constant.
2015-12-31 19:00:16 +01:00
Martin Ling
cffdc3e63b
Make SR_CONF_{SCAN,DEVICE}_OPTIONS into internal constants.
...
These are no longer needed in the public API as we have new wrapper functions.
They are still used internally by drivers.
2015-12-31 19:00:16 +01:00
Martin Ling
8f3168b89b
Add new sr_driver_scan_options() helper function.
...
This function replaces the pattern of calling config_list() with
SR_CONF_SCAN_OPTIONS to obtain a list of scan options.
2015-12-31 19:00:16 +01:00
Martin Ling
e7136c626f
Add new sr_dev_options() helper function.
...
This function replaces the pattern of calling config_list() with
SR_CONF_DEVICE_OPTIONS to obtain a list of device options. Note
that this does not include the SR_CONF_{GET,SET,LIST} bitmask,
which is now retrieved for a specific key by calling
sr_dev_config_capabilties().
2015-12-31 19:00:16 +01:00
Martin Ling
71e9c54dab
Add new sr_dev_config_capabilities() helper function.
2015-12-31 19:00:15 +01:00
Martin Ling
c57aa1ac19
Make SR_CONF_{GET,SET,LIST} into a new enum.
2015-12-31 18:27:56 +01:00
Stefan Brüns
fe7b8efc6b
session: fix use after free of session->devs as reported by valgrind
...
==7478== Invalid write of size 8
==7478== at 0x4E59182: sr_session_dev_remove_all (session.c:302)
==7478== by 0x4E591CD: sr_session_destroy (session.c:265)
==7478== by 0x4095D9: load_input_file_module (input.c:143)
==7478== by 0x4097AB: load_input_file (input.c:157)
==7478== by 0x40531E: main (main.c:288)
==7478== Address 0x7877eb8 is 88 bytes inside a block of size 96 free'd
==7478== at 0x4C2A37C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7478== by 0x4E5F454: sr_input_free (input.c:573)
==7478== by 0x4095C3: load_input_file_module (input.c:140)
==7478== by 0x4097AB: load_input_file (input.c:157)
==7478== by 0x40531E: main (main.c:288)
2015-11-29 01:13:58 +01:00
Uwe Hermann
2c24077466
Constify a lot more items.
...
This fixes various compiler warnings when -Wdiscarded-qualifiers is used.
2015-11-08 19:11:25 +01:00
Tilman Sauerbeck
e5ef649be3
Constify sr_dev_driver::name and sr_dev_driver::long_name.
...
This fixes a bunch of warnings when compiling with -Wwrite-strings.
2015-11-06 17:55:55 +01:00
Uwe Hermann
222fdfd526
Drop unneeded sr_analog_float_to_string().
...
A simple g_strdup_printf() is sufficient, no need for an extra
libsigrok API call here.
2015-10-24 21:21:50 +02:00
Uwe Hermann
8ea0c90268
sr_analog_float_to_string(): Make 'digits' argument unsigned.
2015-10-21 00:29:29 +02:00
Uwe Hermann
dd13d47a9e
bindings: Use SR_DF_ANALOG, drop SR_DF_ANALOG_OLD support.
...
All SR_DF_ANALOG_OLD packets are automatically converted to SR_DF_ANALOG
in the session already.
2015-10-21 00:29:29 +02:00
Uwe Hermann
edb691fced
SR_DF_ANALOG2 and sr_datafeed_analog2 renames.
...
Rename SR_DF_ANALOG2 to SR_DF_ANALOG, and 'struct sr_datafeed_analog2'
to 'struct sr_datafeed_analog'.
2015-10-20 23:32:45 +02:00
Uwe Hermann
5faebab290
SR_DF_ANALOG_OLD and sr_datafeed_analog_old renames.
...
Rename SR_DF_ANALOG to SR_DF_ANALOG_OLD, and 'struct sr_datafeed_analog'
to 'struct sr_datafeed_analog_old'.
2015-10-20 23:32:45 +02:00
Daniel Elstner
ee9953ef12
session: Make event source injection API private
...
Also remove the corresponding functionality from the bindings.
2015-10-17 17:40:42 +02:00