Commit Graph

153 Commits

Author SHA1 Message Date
Frank Stettner ccf68765aa Add config key SR_CONF_DIGITS. 2019-12-20 13:02:06 +01:00
Frank Stettner 84b4f9a1ff Add config key SR_CONF_RANGE. 2019-12-20 13:02:06 +01:00
Uwe Hermann ea9e7a3e82 config keys: Revert re-orderings to avoid ABI changes. 2019-07-30 23:53:42 +02:00
Guido Trentalancia 97a000748a hameg-hmo: Add SR_CONF_HIGH_RESOLUTION and SR_CONF_PEAK_DETECTION.
Implement High Resolution mode and Peak Detection settings.

Beautify the code by reordering the Trigger Source settings
definitions.
2019-07-26 01:43:19 +02:00
Guido Trentalancia 4fa4db2c79 hameg-hmo: Add SR_CONF_TRIGGER_PATTERN support.
Introduce support for the Pattern Trigger functionality, sometimes also
called Logic Trigger.
2019-07-26 00:11:07 +02:00
Guido Trentalancia e131be0ac3 hameg-hmo: Add support for SR_CONF_LOGIC_THRESHOLD/_CUSTOM.
Update the Hameg/Rohde&Schwarz HMO driver (hameg-hmo) so that it
is possible to configure the logic threshold for digital signals.

The user can get or set the logic threshold configuration using
the channel group POD0 (and/or POD1 where available), for example:

sigrok-cli --driver hameg-hmo --get logic_threshold -g POD0
sigrok-cli --driver hameg-hmo --config logic_threshold=TTL --set -g POD0

sigrok-cli --driver hameg-hmo --get logic_threshold_custom -g POD0
sigrok-cli --driver hameg-hmo --config logic_threshold_custom=0.7 --set -g POD0
2019-07-26 00:11:07 +02:00
Frank Stettner 43ff1110fb scpi-pps: Add SR_CONF_REGULATION for HP 66xxB power supplies. 2019-04-17 17:11:21 +02:00
Frank Stettner 78ec6cf99d Add new config key OFFSET. 2019-03-29 16:15:37 +01:00
Uwe Hermann 3bae09ab9f Make sr_packet_{copy,free} API calls public.
This fixes bug #1277.
2018-09-18 23:39:56 +02:00
Gerhard Sittig b736fa0c7d proto.h: move routine declaration to its respective group 2018-09-03 22:22:40 +02:00
Uwe Hermann ee425a466a Add a new sr_log_callback_get() API call. 2018-08-30 19:11:30 +02:00
Andrej Valek bc294eaca8 Add SR_CONF_EXTERNAL_CLOCK_SOURCE key.
Signed-off-by: Andrej Valek <andy@skyrain.eu>
2018-06-05 22:01:12 +02:00
Frank Stettner 21ef355e50 strutil: Locale independent sprintf() and vsprintf() functions 2018-06-01 15:46:17 +02:00
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