Commit Graph

72 Commits

Author SHA1 Message Date
Martin Ling 8f996b8948 probe_groups: API changes required to implement probe groups. 2013-11-08 01:03:16 +01:00
Uwe Hermann 88f544f27e Add support for the Metex M-4650CR.
(the Voltcraft M-4650CR is a rebadged Metex M-4650CR)
2013-10-30 14:44:44 +01:00
Uwe Hermann 2b83d7fee1 Add support for the Voltcraft M-4650CR. 2013-10-30 14:44:44 +01:00
Aurelien Jacobs df6b0f99af ISO-TECH IDM103N: remove the useless -ser postfix 2013-10-13 14:54:54 +02:00
Uwe Hermann 72e1672fc9 es519xx: Cosmetics, coding style, minor fixes. 2013-10-07 00:36:18 +02:00
Aurelien Jacobs de737bfc11 add ISO-TECH IDM103N serial-dmm driver 2013-10-07 00:36:18 +02:00
Uwe Hermann e52bb9be83 Voltcraft VC-830: Fix diode mode handling.
This DMM is not using the standard bits in the FS9922 protocol/structure
to indicate the "volt" and "diode mode" flags. Instead, it only sets the
user-defined bit "z1" to indicate both "diode mode" and "volt".

This fixes #142.
2013-09-01 15:27:21 +02:00
Uwe Hermann 2b691be806 serial-dmm/uni-t-dmm: Drop Tecpel DMM-8060.
The Tecpel DMM-8060 was added since we assumed it would be a rebadged
Voltcraft VC-820 (since we know the Tecpel DMM-8061 is a rebadged VC-840).

However, according to the vendor webpage it doesn't have PC connectivity
at all, so drop it for now (until someone can confirm that it does or does
not actually have RS232/USB connectivity).
2013-07-18 12:43:07 +02:00
Florian Knodt a7a163a795 Support for UNI-T UT60A/E multimeters via RS232 or USB 2013-07-09 22:57:55 +02:00
Uwe Hermann 6045b91aa4 serial-dmm: Add support for the Voltcraft VC-830. 2013-06-23 10:23:21 +02:00
Florian Steinhardt 5f2a4aff4b added Voltcraft M-3650D Multimeter 2013-06-14 01:03:29 +02:00
Uwe Hermann 3b412e3a30 s/clear_instances/dev_clear/.
Consistently use the same name for the dev_clear() API callback
everywhere.
2013-06-02 16:56:41 +02:00
Uwe Hermann f6beaac55c std: Drop hw_ from function names.
The per-driver API calls no longer have a hw_ prefix (e.g. hw_init()
became init() and so on), so drop the 'hw_' from the std versions
for those API callbacks too.
2013-06-02 16:46:18 +02:00
Uwe Hermann 6078d2c996 Use consistent API callback function names.
This now matches what the 'new-driver' tool generates.
2013-05-10 20:01:37 +02:00
Uwe Hermann 3f0513bac1 serial-dmm: Use std_dev_clear(). 2013-05-10 18:53:42 +02:00
Uwe Hermann 29a27196a1 s/DRIVER_LOG_DOMAIN/LOG_PREFIX/.
This is more correct anyway, and also a bit shorter and more readable.
2013-05-03 21:59:32 +02:00
Uwe Hermann c2fa697afa serial-dmm: Add Tecpel DMM-8060 support. 2013-05-01 03:16:47 +02:00
Uwe Hermann b38e08fbb7 serial-dmm: Add Tecpel DMM-8061 support. 2013-05-01 03:13:43 +02:00
Uwe Hermann 2451a20ff5 fs9721: Factor out common code from serial-dmm.
These functions are FS9721 specific (and DMM specific), and can be used
from various drivers (e.g. serial-dmm or uni-t-dmm or possibly others).
2013-05-01 02:16:55 +02:00
Uwe Hermann 4853559466 uni-t-dmm/serial-dmm: Handle Voltcraft VC-840 temperature. 2013-05-01 01:58:42 +02:00
Uwe Hermann ae3a59de62 serial-dmm: Add support for the UNI-T UT61D.
This DMM is already supported via the uni-t-dmm driver when using the
USB/HID cable. The serial-dmm support makes it usable with the RS232
cable too.
2013-04-30 20:22:17 +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
Uwe Hermann 1e1bfcd0fe serial-dmm: Use sr_dev_inst to store connection handle. 2013-04-23 20:55:04 +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
Bert Vermeulen ede25f4e6f serial-dmm: Adjust to GVariant-based sr_config_* functions 2013-04-11 18:32:07 +02:00
Alexandru Gagniuc 3864648bb6 serial-dmm: Add support for RadioShack 22-805
Protocol-wise, this is identical to the 22-168, except that it communicates at
600 baud instead of 1200 baud.
2013-03-20 20:36:56 -05:00
Uwe Hermann cd2f0fe22c Add/use std_hw_dev_acquisition_stop_serial(). 2013-02-08 23:32:45 +01:00
Uwe Hermann 6fab7b8f53 Driver struct cleanups.
- Explicitly list .config_get in all drivers for consistency, and set it
   to NULL if unused (whether or not a driver implements it is optional).

 - List all 'struct sr_dev_driver' entries in the same order in all drivers.

 - Move the check whether .config_set/.config_list exist (i.e., are non-NULL)
   into sanity_check_all_drivers().
2013-02-07 10:58:35 +01:00
Uwe Hermann 4afdfd4628 Add and use std_session_send_df_header().
This is a small helper function which sends the SR_DF_HEADER packet that
drivers usually emit in their hw_dev_acquisition_start() API callback.
It simplifies and shortens the hw_dev_acquisition_start() functions
quite a bit.

It also simplifies the input modules which send an SR_DF_HEADER packet, too.

This patch also automatically removes some unneeded malloc/free in some
drivers for the 'packet' and 'header' structs used for SR_DF_HEADER.
2013-02-07 10:46:28 +01:00
Uwe Hermann 961009b0c4 hw_dev_close(): Move common checks to wrapper.
Check the relevant arguments for != NULL before calling the actual
driver-specific function, so that the driver can safely assume those
arguments are non-NULL. This removes the need to duplicate these
checks in every driver.
2013-02-05 18:46:33 +01:00
Uwe Hermann 0e94d524c1 Shorten/simplify hw_dev_list() implementations. 2013-02-05 18:27:05 +01:00
Uwe Hermann 063e7aef6d Factor out common hw_init() driver code.
Most drivers do pretty much the same things in their hw_init()
right now, so factor out that code to std_hw_init() in std.c.
2013-01-29 12:56:02 +01:00
Bert Vermeulen 6a4710fac2 drivers: Trim unused config_get() calls
None of the driver config_get/set/list calls are required.
2013-01-25 16:05:48 +01:00
Bert Vermeulen 0d485e30c6 Deprecate SR_DI_HWOPTS.
This is replaced by SR_CONF_SCAN_OPTIONS.
2013-01-25 15:09:20 +01:00
Bert Vermeulen 9a6517d14b Deprecate SR_DI_HWCAPS.
This is replaced by SR_CONF_DEVICE_OPTIONS.
2013-01-25 15:01:49 +01:00
Bert Vermeulen a1c743fc51 drivers: implement config_list() 2013-01-25 02:37:26 +01:00
Bert Vermeulen 035a1078fd drivers: rename and reorganize config get/set
The driver API calls info_get() and dev_config_set() have been renamed
to config_get() and config_set(), respectively.
2013-01-24 19:19:09 +01:00
Bert Vermeulen 1953564a96 Rename SR_HWOPT_* and SR_HWCAP_* to SR_CONF_* 2013-01-21 23:32:50 +01:00
Bert Vermeulen 1987b8d63e drivers: use new sr_config struct
Sending an SR_DF_META packet at the start of every stream is not
mandatory; the frontend should ask for what it needs, and any extra
information the driver wants to send will come in due time.
2013-01-21 23:32:49 +01:00
Bert Vermeulen 6b8d6f93bb Get rid of obsolete SR_DI_NUM_PROBES and SR_DI_PROBE_NAMES.
Frontends should use the probe list in the device's sr_dev_inst
to get this information.
2013-01-15 17:42:23 +01:00
Uwe Hermann 986fde755d serial-dmm: Add UNI-T UT61E support (UT-D02 cable). 2013-01-03 01:13:57 +01:00
Uwe Hermann 1476661970 serial-dmm: Rename VOLTCRAFT_VC820 to VOLTCRAFT_VC820_SER.
This matches the _ser suffix of the other functions/variables for this
device ("ser" denotes that it is used with the serial UNI-T UT-D02 cable
as opposed the USB/HID based cables which are handled by the uni-t-dmm driver).

But more importantly, the _SER suffix for the enum value will prevent
name clashes later, when the uni-t-dmm driver gets a VOLTCRAFT_VC820 enum.

Do the same for VOLTCRAFT_VC840.
2012-12-26 02:11:00 +01:00
Alexandru Gagniuc f9b9bd632f serial-dmm: Handle time-limited acquisition
Implement SR_HWCAP_LIMIT_MSEC capability, to allow acquisition to automatically
stop after a specified amount of time.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-25 23:55:42 +01:00
Uwe Hermann 54d1122187 serial-dmm: Add Voltcraft VC-840 (UT-D02) support.
This works with the UNI-T UT-D02 (RS232) cable. For the USB/HID
based cable (UNI-T UT-D04), the uni-t-dmm driver must be used.

Note: This is untested, but should work just fine for all settings, with
the possible exception of temperature (testers needed!)
2012-12-17 14:21:12 +01:00
Uwe Hermann 40830061eb serial-dmm: Add Voltcraft VC-820 (UT-D02) support.
This works with the UNI-T UT-D02 (RS232) cable. For the USB/HID
based cable (UNI-T UT-D04), the uni-t-dmm driver must be used.
2012-12-17 14:21:12 +01:00
Uwe Hermann 16b7b79005 serial-dmm: Eliminate unneeded "subdriver" field.
Just use the 'int dmm' + wrapper method that is used for all other
functions which need this information. There is no real need to
special-case the hw_dev_acquisition_start() API call here.
2012-12-17 14:21:12 +01:00
Uwe Hermann 22f5419235 serial-dmm: Cosmetics, documentation fixes. 2012-12-17 14:21:12 +01:00
Alexandru Gagniuc c69049091e libsigrok.h: Don't store subdriver in sr_dev_driver
Not all drivers use subdrivers. The only reason the subdriver field was
introduced was to accomodate the model of serial-dmm.

The sr_dev_driver struct is available to the frontend. Exposing the subdriver
field creates the problem of exposing knowledge of libsigrok's internal driver
layout, even though the drivers are designed to be a flat list to the frontend.

Store the subdriver in the dev_context struct of serial-dmm.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-13 23:16:34 +01:00
Alexandru Gagniuc d128bf12b2 serial-dmm: Remove global sr_dev_driver *di alias
The global *di alias was used to keep track of the driver context.
It caused issues with trying to use several subdrivers at once, so
its use was obsoleted.

The correct context is preserved through different mechanisms, either
the *sdi pointer, or wrappers which pass the correct context.

The *di alias is no longer used, so remove it.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-13 23:16:34 +01:00