Commit Graph

105 Commits

Author SHA1 Message Date
Uwe Hermann 695f32d89d Bring back link-mso19/nexus-osciprime for now.
This patch will be re-introduced later.
2013-04-26 10:47:34 +02:00
Uwe Hermann 9d1164f9a1 Drop link-mso19/nexus-osciprime in preparation for release.
These two drivers are currently unfinished and don't work, so disable
and "unhook" them for now in preparation of the next libsigrok release.

They're still in the git repository, but not hooked up to the build
system, so that they won't get detected or built, and also don't end up
in the release tarball.

Since link-mso19 is the only driver that currently requires libudev,
drop any reference to that, too.

It should be relatively easy to apply this patch in reverse after the
release to bring back both drivers.
2013-04-25 19:16:13 +02:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Bert Vermeulen d8284802ca use driver callbacks directly 2013-04-11 18:32:08 +02:00
Bert Vermeulen 6cefe516aa return SR_ERR_ARG if a driver doesn't implement sr_config_*() 2013-04-11 18:32:08 +02:00
Bert Vermeulen 8e34ca86fb Add SR_CONF_TRIGGER_TYPE config_info list 2013-04-11 18:32:06 +02:00
Bert Vermeulen 722db131a4 Add sr_config_free()
Due to struct sr_config now containing a GVariant, this needs to be
cleaned up after use properly. This is a helper function for that.
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
Bert Vermeulen 13d8e03c4f Bump copyright year 2013-04-11 18:32:06 +02:00
Uwe Hermann ca0938c50b Doxygen: Fix a few warnings. 2013-04-06 19:25:23 +02:00
Uwe Hermann 3ebce226a2 s/sr_config_make/sr_config_new/.
This matches the naming of other/similar functions better.
2013-03-23 14:16:00 +01: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
Bert Vermeulen e6551ea640 add SR_CONF_DATALOG 2013-03-11 16:37:02 +01:00
Uwe Hermann 6f3e5335ad mic-985xx: Add support for the MIC 98581.
This device only supports temperature measurements, no humidity.
2013-02-11 16:53:28 +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 c5d6f5cc1c brymen-dmm: Cosmetics, coding-style, consistency.
Also, name the driver "brymen-bm857" in preparation to doing "subdrivers"
for other Brymen models later (similar to serial-dmm).
2013-02-02 12:07:45 +01:00
Alexandru Gagniuc 20cbc7854d brymen-dmm: Initial driver skeleton. 2013-02-02 11:19:27 +01:00
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