Commit Graph

88 Commits

Author SHA1 Message Date
Uwe Hermann 0cd8e23140 Initial driver implementation for MIC 98583.
This is a USB/serial (Prolific) based temperature and humidity logger.
2013-02-02 11:13:45 +01:00
Uwe Hermann 7ec5b54955 mic-985xx: Initial driver skeleton. 2013-02-01 23:52:57 +01:00
Uwe Hermann 4b97c74e0b sr_driver_scan(): Improve checks.
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.

Also, do some minor whitespace and consistency improvements.
2013-01-29 12:56:02 +01:00
Uwe Hermann c0eea11c45 sr_driver_init(): Improve checks.
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.

Also, change one SR_ERR to the more correct SR_ERR_MALLOC, and assign
sr_ctx in the rigol-ds1xx2's hw_init() function, like all the other
drivers do.
2013-01-29 12:56:02 +01:00
Uwe Hermann bd36d826d4 hwdriver: Use message logging helpers. 2013-01-29 12:56:02 +01:00
Joel Holdsworth 140185af6c Check sr_config_set value argument is not NULL 2013-01-28 20:28:03 +00:00
Joel Holdsworth 4c961f5ed5 Made sr_config_list driver argument a const pointer 2013-01-28 20:26:37 +00:00
Joel Holdsworth 9fd504b9eb Made sr_config_get driver argument a const pointer 2013-01-28 20:25:56 +00:00
Bert Vermeulen cbadb856d6 Code cleanup. 2013-01-26 01:18:19 +01:00
Bert Vermeulen 41bad9283d Remove sr_driver_hwcap_exists(). 2013-01-25 20:41:49 +01:00
Bert Vermeulen ddd9b41f5a Rename sr_info_get() to sr_config_get(). 2013-01-25 15:48:44 +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 c5fb502f97 New driver API function: config_list()
This takes an sr_config key and returns a list of possible values for
that key to be submitted with config_set(). The format of the list and
its contents is dependent on the key.

This will replace the SR_DI_* keys that returned such a list before,
such as SR_DI_SAMPLERATES.
2013-01-25 01:24:42 +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 c89c1c9c21 Unify all SR_HWOPT_* and SR_HWCAP_* enums.
Only two functions remain for accessing meta info on the keys:
sr_config_info_get() and sr_config_info_name_get().
2013-01-21 23:32:49 +01:00
Bert Vermeulen 083d64f94f Use new struct sr_config_info for option metadata 2013-01-21 23:32:49 +01:00
Bert Vermeulen 4c0e310ca3 Add small helper for creating struct sr_config 2013-01-21 23:32:49 +01:00
Bert Vermeulen 72e435ab94 Adjust option helpers to new sr_config struct 2013-01-21 23:32:49 +01:00
Martin Ling f4816ac6cc rigol-ds1xx2: Initial driver skeleton. 2013-01-03 18:41:28 +01:00
Uwe Hermann 986fde755d serial-dmm: Add UNI-T UT61E support (UT-D02 cable). 2013-01-03 01:13:57 +01:00
Bert Vermeulen 35a078bce5 nexus-osciprime: Initial driver skeleton. 2012-12-24 20:55:23 +01:00
Uwe Hermann 0254651dcb alsa: Update to latest APIs/conventions.
The alsa driver was out of date wrt APIs and libsigrok conventions in
general, and wasn't compiling.

This fixes the compile and updates it to _basically_ work with the current
state of analog support in libsigrok.

This is not finished/full support for ALSA analog sampling yet, though,
various TODOs remain that will be addressed later.
2012-12-20 14:42:15 +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
Peter Stuge 34f06b903e Add a struct sr_context * parameter to hw_init() 2012-12-03 12:07:40 +01:00
Peter Stuge 44fc870c9c Add a struct sr_context * parameter to sr_driver_init()
Since the public API is changed, this commit also bumps the libtool
version component SR_LIB_VERSION_CURRENT in configure.ac.
2012-12-03 12:07:40 +01:00
Bert Vermeulen 46697e38b2 lascar-el-usb: Initial driver skeleton. 2012-12-03 03:53:44 +01:00
Uwe Hermann 162b735218 Remove some radioshack-dmm leftovers. 2012-12-02 22:22:07 +01:00
Alexandru Gagniuc 21829e6708 radioshack-dmm: Integrate into serial-dmm
Use the infrastructure of serial-dmm to handle the RadioShack 22-812,
and completely remove radioshack-dmm.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-02 22:22:07 +01:00
Alexandru Gagniuc d5ce233fe1 serial-dmm: Add RadioShack 22-168 support.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-02 17:38:05 +01:00
Uwe Hermann d4bd66a0c7 serial-dmm: Add PCE PCE-DM32 support. 2012-12-02 14:28:29 +01:00
Uwe Hermann a376ffea49 serial-dmm: Add PeakTech 4370 support. 2012-12-02 14:22:51 +01:00
Uwe Hermann a53da08254 serial-dmm: Add Metex M-3640D support. 2012-12-02 14:22:51 +01:00
Uwe Hermann 6dca2f16ee serial-dmm: Add V&A VA18B support. 2012-12-02 14:22:51 +01:00
Uwe Hermann 5887c9cc1a serial-dmm: Add MASTECH MAS345 support. 2012-12-02 14:22:51 +01:00
Uwe Hermann f0ac4929d3 serial-dmm: Add PeakTech 3410 support. 2012-12-02 14:22:51 +01:00
Uwe Hermann ce3777ada9 serial-dmm: Add Metex ME-31 support. 2012-12-02 14:22:46 +01:00
Uwe Hermann f086b83011 serial-dmm: Add Digitek DT4000ZC support. 2012-12-02 14:21:19 +01:00
Uwe Hermann 21a7f2692e Rename tekpower-dmm to serial-dmm.
This is now a generic driver for multiple DMM "subdrivers" that use simple
serial port protocols.
2012-12-02 14:21:18 +01:00
Uwe Hermann 729b01f988 tekpower-dmm: Generalize & first-class TP4000ZC driver.
Prepare the tekpower-dmm driver to be able to support various simple
serial port based DMMs.

Also, make a 'tekpower-tp4000zc' "first-class" driver which is currently
the only user of this generic driver.
2012-12-02 14:21:18 +01:00
Uwe Hermann bda8fc98b1 Drop obsolete genericdmm driver. 2012-11-14 15:26:11 +01:00
Uwe Hermann aa2af32432 tondaj-sl-814: Initial driver skeleton. 2012-11-10 01:01:28 +01:00
Bert Vermeulen ac3898d2d0 victor-dmm: Initial driver skeleton. 2012-11-06 15:16:22 +01:00
Bert Vermeulen 4d729ddcaf colead-slm: Initial driver skeleton. 2012-11-02 15:24:30 +01:00
Uwe Hermann fdbcb86dba Draft: Make UT61D and VC-820 "first-class" drivers.
The 'uni-t-dmm' driver/directory will not appear as a "driver" to
frontends anymore, it's just an internal thing.

The frontends will see a uni-t-ut61d and voltcraft-vc820 driver now,
with the correct names and parsers etc. attached to them.

This is not fully finished yet, but it's a start (and works mostly):

  $ sigrok-cli -D
  The following devices were found:
  UNI-T UT61D with 1 probe: P1
  Voltcraft VC-820 with 1 probe: P1

  $ sigrok-cli --driver voltcraft-vc820 -D
  The following devices were found:
  Voltcraft VC-820 with 1 probe: P1

  $ sigrok-cli --driver uni-t-ut61d -D
  The following devices were found:
  UNI-T UT61D with 1 probe: P1

  # Now attaching a UNI-T UT61D device via USB.

  $ sigrok-cli --driver uni-t-ut61d --samples 3 -O analog
  P1: -0.017800 V DC
  P1: -0.017600 V DC
  P1: -0.017700 V DC

  # Now attaching a Voltcraft VC-820 device via USB instead.

  $ sigrok-cli --driver voltcraft-vc820 --samples 3 -O analog
  P1: -0.319200 V DC
  P1: -0.319300 V DC
  P1: -0.319300 V DC
2012-10-30 13:11:27 +01:00
Uwe Hermann 79081ec80c Initial support for UNI-T DMMs.
This is not yet fully finished, but works for most use-cases.

Tested with a UNI-T UT61D using the UT-D04 USB/HID cable (new version).
2012-10-27 23:17:30 +02:00
Uwe Hermann bbabddbd64 tekpower-dmm: Cosmetics, coding-style, consistency fixes. 2012-10-27 22:25:04 +02:00
Alexandru Gagniuc 7dc55d930f Add support for the TekPower TP4000ZC DMM.
Also known as Digitek DT4000ZC.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-10-27 22:25:04 +02:00
Uwe Hermann 545f978639 config.h usage cleanups.
- Drop config.h #include from files that don't actually use any of
   its contents (at the moment).

 - Add comment for those that do need it.
2012-10-24 00:41:21 +02:00