Commit Graph

987 Commits

Author SHA1 Message Date
Uwe Hermann 6f22a8ef2c Factor out serial_readline() to serial.c.
Only one (slightly different) variant remains in agilent-dmm, this will
be merged soon too, though.
2012-10-30 19:59:21 +01:00
Uwe Hermann 2980cc2494 genericdmm/victor-dmm: Use message logging helpers. 2012-10-30 19:43:46 +01:00
Uwe Hermann dccbd0ede0 radioshack-dmm: Use message logging helpers. 2012-10-30 19:43:45 +01:00
Uwe Hermann 38d326e879 agilent-dmm: Use message logging helpers. 2012-10-30 19:35:35 +01:00
Uwe Hermann 31d84da3a2 fluke-dmm: Use message logging helpers. 2012-10-30 19:28:37 +01:00
Uwe Hermann 6ac5f8922e uni-t-dmm: Simplify subdriver setup.
So far, it seems we can make this work with just hw_init() needing to
be subdriver-specific (it will point 'di' to the respective per-subdriver
entry), the rest of the API functions can then use a strcmp() on di->name to
learn which subdriver they belong to.
2012-10-30 14:23:05 +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
Bert Vermeulen 4ca378df88 don't use deprecated g_thread_init/_create 2012-10-29 22:10:05 +01:00
Bert Vermeulen 7445ed9158 require glib version >= 2.32
This allows us to do away with a few deprecated g_thread functions
in demo.c which throw deprecation warnings since glib 2.32.0.
2012-10-29 22:08:34 +01:00
Uwe Hermann 015f1508ad uni-t-dmm: Voltcraft VC-820 draft support.
This is commented out so far, will be implemented properly soon.
2012-10-29 15:20:17 +01:00
Uwe Hermann 6c701476ad Add protocol parser for FS9721_LP3/FS9721B.
The Fortune Semiconductor FS9721_LP3 and FS9721B/Q100 DMM chips are very
similar and the protocol looks identical.

Tested on a Voltcraft VC-820 (FS9721_LP3) with the uni-t-dmm driver
(needs some small changes, tbd).
2012-10-29 15:17:17 +01:00
Bert Vermeulen a28dac0a73 fluke-dmm: code cleanup 2012-10-29 11:54:20 +01:00
Bert Vermeulen 2c04dede20 Fluke 287/289: support for dBu/dBV measurement units 2012-10-29 11:50:34 +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 45e080b60b la8: Rename driver.[ch] to protocol.[ch]. 2012-10-27 22:36:34 +02:00
Uwe Hermann f3a35908ef la8: Adapt to new driver conventions. 2012-10-27 22:36:19 +02:00
Uwe Hermann 9eb2bb9601 configure.ac: Cosmetics. 2012-10-27 22:25:04 +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 2bba3dd3a8 HACKING: "Adding a new hardware driver" chapter. 2012-10-25 23:42:20 +02:00
Alexandru Gagniuc d36777dbf5 .gitignore: (Trivial) Ignore KDevelop project files
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-10-25 19:51:46 +02:00
Uwe Hermann 6f669a68e7 configure.ac: Small consistency fixes. 2012-10-24 02:51:17 +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
Uwe Hermann afe2f28e65 Doxygen: Explain init/shutdown, add small example. 2012-10-22 11:56:19 +02:00
Uwe Hermann 1f345a21d2 Doxygen: libsigrok.h: Explain #include file usage. 2012-10-22 11:56:19 +02:00
Uwe Hermann a02d77bce9 Doxygen: Various fixes in libsigrok.h. 2012-10-22 11:56:18 +02:00
Uwe Hermann 393fb9cb18 Doxygen: Add @file items for the relevant files.
These short descriptions are shown in the "Files" section of the
Doxygen output.
2012-10-22 11:56:18 +02:00
Uwe Hermann 777e2035d8 Doxygen: Fix grouping of session_file.c functions.
s/@ingroup/@addtogroup/ and s/grp_device/grp_session/.
2012-10-22 11:56:18 +02:00
Uwe Hermann 6b2d8d3e5c Doxygen: TODO cleanup, use @todo where needed.
Turn TODOs which should be user-visible into @todo so that Doxygen
shows them in the function docs, and also on the special "Todo List" page.

Those TODOs that should not be in the Doxygen docs are moved out of the
/** */ comment blocks.

Also fix some comments/items, and remove some obsolete ones.
2012-10-22 11:56:18 +02:00
Uwe Hermann 3c0839d524 Doxygen: Various improvements in libsigrok.h.
- Turn SR_OK/SR_ERR_* and SR_LOG_* into proper enums.

 - Use /**< Foo. */ for Doxygen comments that are on the same line as
   the (e.g.) enum entry they document. If the comment is not on the
   same line (but rather directly above the enum entry) a simple
   /** Foo. */ comment is sufficient.

 - Use /** */ instead of /* */ in some places, so that Doxygen actually uses
   the respective comments.

 - Various smaller cosmetic fixes or cleanups.
2012-10-22 11:56:18 +02:00
Uwe Hermann 9c5332d291 Doxygen: Fix a bunch of warnings and outdated docs. 2012-10-22 11:56:18 +02:00
Uwe Hermann f21193fa03 Doxygen: Move error handling stuff to error.c.
Also, add an overview mini-section to the main page instead.
2012-10-22 11:56:18 +02:00
Uwe Hermann 7b870c38e3 Doxygen: Initial groups and topic short descriptions. 2012-10-22 11:56:18 +02:00
Uwe Hermann b4bd70889f Doxygen: Mark non-public stuff for exclusion.
- /** @private */ can be used for functions, and /** @cond PRIVATE */ and
   /** @endcond */ for variables or #defines.

 - Document the above in HACKING.
2012-10-22 11:56:17 +02:00
Uwe Hermann 5b30cca719 Doxygen: Add initial main page documentation section. 2012-10-22 11:56:17 +02:00
Uwe Hermann d5f1d5382d Doxyfile: Various additions/improvements.
- Show a short project description, the libsigrok version (x.y.z or
   "unreleased development snapshot"), and the sigrok logo in the
   Doxygen output.

 - Ignore a bunch of files and directories which don't contain public
   libsigrok API anyway.

 - Remove the SR_API prefix from the Doxygen output (all
   functions/symbols in the output are part of the public API anyway).

 - Various changes of settings to get nicer and more useful output.
2012-10-22 11:56:17 +02:00
Uwe Hermann e61b4fa0d0 Doxygen: Add sigrok logo PNG for use by Doxygen. 2012-10-22 11:56:17 +02:00
Uwe Hermann c63eac737c Doxyfile: Update to what doxygen 1.8.1.2 generates.
The new version has a number of neat improvements/features we could use.
2012-10-22 11:56:17 +02:00
Uwe Hermann 296821683d Makefile.am: Add missing backslash. 2012-10-22 11:54:40 +02:00
Uwe Hermann 8e2d43cc97 backend.c: Revert accidentally committed test code. 2012-10-22 10:17:38 +02:00
Bert Vermeulen 589a10135a clean up autoconf/autobuild scripts 2012-10-22 01:48:39 +02:00
Uwe Hermann d11d606626 We now require libusb >= 1.0.9.
This is due to the use of libusb_error_name().
2012-10-21 22:44:00 +02:00
Uwe Hermann c46762a285 sr_init/sr_exit: Improve docs, add error checks. 2012-10-21 22:40:43 +02:00
Peter Stuge 785b9ff290 Add and init libusb_context * in struct sr_context when using libusb-1.0
This allows hardware drivers to use a common libusb_context.
2012-10-21 20:23:36 +02:00
Peter Stuge b8072700c1 Add a struct sr_context * parameter to sr_init() and sr_exit() 2012-10-21 20:23:14 +02:00
Uwe Hermann 026c822d8c Move 'struct drv_context' to sigrok-internal.h.
It's not meant to be visible to frontends.
2012-10-21 16:40:13 +02:00
Alexandru Gagniuc 7c41dc4774 radioshack-dmm: Implement support for "LOGIC" mode
LOGIC mode sends the following data:
     V < 0 : actual voltage
0 <= V < 1 : LOW
1 <= V < 2 : actual voltage
2 <= V     : HIGH

We follow the same idea, and set our unit to BOOLEAN for the crazy
case (HIGH or LOW).

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-10-20 23:03:51 +02:00
Alexandru Gagniuc dfd8f56ef4 libsigrok: (Trivial) fix packet type in datafeed_dump
datafeed_dump would print SR_DF_META_LOGIC when a SR_DF_META_ANALOG
was recieved. Fix that.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-10-20 23:03:51 +02:00
Alexandru Gagniuc 0f70830194 libsigrok: (Trivial) Add support for 2400 baud
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-10-20 23:02:14 +02:00
Bert Vermeulen 777bbd5b98 add SR_HWOPT_* documentation 2012-10-18 22:59:32 +02:00