]>
sigrok.org Git - libsigrok.git/log
Bert Vermeulen [Fri, 2 Nov 2012 19:43:49 +0000 (20:43 +0100)]
colead-slm: fix sloppy driver context handling
Uwe Hermann [Fri, 2 Nov 2012 18:05:53 +0000 (19:05 +0100)]
HACKING: Document enum setup.
Alexandru Gagniuc [Fri, 2 Nov 2012 16:56:56 +0000 (11:56 -0500)]
Avoid future ABI breakage by hardcoding enum values.
Whenever we added a field to the enums in libsigrok.h, we were running
the risk of breaking ABI compatibility. Any reordering of existing values
or the addition of entries other than at the bottom of the list would
cause an ABI breakage.
By hardcoding the values we ensure that any added field will have an
unused value, and will not take a value previously used by a different
flag. By doing this, we avoid confusing frontends compiled with an
earlier API.
We use 10000 as the first entry of each enum, and each "category" gets
an explicit number (10000, 20000, 30000, and so on).
Also avoid making the first value of an enum zero. A value of zero is
used as terminator item in some lists.
Remove explicit "DUMMY" (terminator) enum entries, they're not needed.
Signed-off-by: Alexandru Gagniuc <redacted>
Uwe Hermann [Fri, 2 Nov 2012 17:49:00 +0000 (18:49 +0100)]
serial: Output successful open and the FD.
Uwe Hermann [Fri, 2 Nov 2012 17:44:52 +0000 (18:44 +0100)]
serial: Fix two segfaults.
Uwe Hermann [Fri, 2 Nov 2012 17:35:08 +0000 (18:35 +0100)]
serial: Fix some sr_err() items.
Uwe Hermann [Fri, 2 Nov 2012 17:16:58 +0000 (18:16 +0100)]
genericdmm: Drop left-over entry.
Uwe Hermann [Fri, 2 Nov 2012 17:05:18 +0000 (18:05 +0100)]
genericdmm: Drop some dead code.
Uwe Hermann [Fri, 2 Nov 2012 14:58:54 +0000 (15:58 +0100)]
serial: More error-checking & logging, add baudrates.
This mostly affects the non-Windows code so far, the rest will follow.
Uwe Hermann [Fri, 2 Nov 2012 14:57:21 +0000 (15:57 +0100)]
serial: Add missing "break"s.
This would otherwise cause bugs when e.g. asking for 2 stopbits.
Bert Vermeulen [Fri, 2 Nov 2012 14:21:43 +0000 (15:21 +0100)]
colead-slm: SL-5868P support
Bert Vermeulen [Fri, 2 Nov 2012 14:20:10 +0000 (15:20 +0100)]
add support for sound pressure level measurements
Bert Vermeulen [Fri, 2 Nov 2012 14:19:01 +0000 (15:19 +0100)]
output/analog: add support for sound pressure level
Bert Vermeulen [Thu, 1 Nov 2012 22:38:10 +0000 (23:38 +0100)]
analog: if no MQ unit was set of recognized, just print the value
Bert Vermeulen [Mon, 29 Oct 2012 21:33:47 +0000 (22:33 +0100)]
colead-slm: Initial driver skeleton.
Uwe Hermann [Thu, 1 Nov 2012 14:58:09 +0000 (15:58 +0100)]
Rework FS9721 parser.
Merge parts of the tekpower-dmm code (the chip of the TekPower
TP4000ZC seems to be an FS9721_LP3 too) and rework parts of the functions.
Adapt the tekpower-dmm and uni-t-dmm code accordingly.
Alexandru Gagniuc [Tue, 30 Oct 2012 04:42:10 +0000 (23:42 -0500)]
tekpower-dmm: Use generic fs9721 parser
Replace the parser with the fs9721 parser, which is just an adapted
version of this parser.
Signed-off-by: Alexandru Gagniuc <redacted>
Uwe Hermann [Tue, 30 Oct 2012 19:30:25 +0000 (20:30 +0100)]
Remove 'float' output module.
This has been replaced by the 'analog' output module.
Uwe Hermann [Tue, 30 Oct 2012 19:20:22 +0000 (20:20 +0100)]
Return SR_ERR_MALLOC upon allocation errors.
Add some TODOs.
Uwe Hermann [Tue, 30 Oct 2012 18:59:21 +0000 (19:59 +0100)]
Factor out serial_readline() to serial.c.
Only one (slightly different) variant remains in agilent-dmm, this will
be merged soon too, though.
Uwe Hermann [Tue, 30 Oct 2012 17:56:04 +0000 (18:56 +0100)]
genericdmm/victor-dmm: Use message logging helpers.
Uwe Hermann [Tue, 30 Oct 2012 17:52:20 +0000 (18:52 +0100)]
radioshack-dmm: Use message logging helpers.
Uwe Hermann [Tue, 30 Oct 2012 17:50:15 +0000 (18:50 +0100)]
agilent-dmm: Use message logging helpers.
Uwe Hermann [Tue, 30 Oct 2012 17:48:33 +0000 (18:48 +0100)]
fluke-dmm: Use message logging helpers.
Uwe Hermann [Tue, 30 Oct 2012 13:23:05 +0000 (14:23 +0100)]
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.
Uwe Hermann [Tue, 30 Oct 2012 12:11:27 +0000 (13:11 +0100)]
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
Bert Vermeulen [Mon, 29 Oct 2012 21:10:05 +0000 (22:10 +0100)]
don't use deprecated g_thread_init/_create
Bert Vermeulen [Mon, 29 Oct 2012 21:08:34 +0000 (22:08 +0100)]
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.
Uwe Hermann [Mon, 29 Oct 2012 14:20:17 +0000 (15:20 +0100)]
uni-t-dmm: Voltcraft VC-820 draft support.
This is commented out so far, will be implemented properly soon.
Uwe Hermann [Mon, 29 Oct 2012 11:02:05 +0000 (12:02 +0100)]
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).
Bert Vermeulen [Mon, 29 Oct 2012 10:54:20 +0000 (11:54 +0100)]
fluke-dmm: code cleanup
Bert Vermeulen [Mon, 29 Oct 2012 10:50:34 +0000 (11:50 +0100)]
Fluke 287/289: support for dBu/dBV measurement units
Uwe Hermann [Sat, 27 Oct 2012 20:41:50 +0000 (22:41 +0200)]
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).
Uwe Hermann [Sat, 27 Oct 2012 20:21:07 +0000 (22:21 +0200)]
la8: Rename driver.[ch] to protocol.[ch].
Uwe Hermann [Sat, 27 Oct 2012 19:27:15 +0000 (21:27 +0200)]
la8: Adapt to new driver conventions.
Uwe Hermann [Sat, 27 Oct 2012 19:07:39 +0000 (21:07 +0200)]
configure.ac: Cosmetics.
Uwe Hermann [Sat, 27 Oct 2012 19:03:02 +0000 (21:03 +0200)]
tekpower-dmm: Cosmetics, coding-style, consistency fixes.
Alexandru Gagniuc [Sun, 21 Oct 2012 01:39:37 +0000 (20:39 -0500)]
Add support for the TekPower TP4000ZC DMM.
Also known as Digitek DT4000ZC.
Signed-off-by: Alexandru Gagniuc <redacted>
Uwe Hermann [Thu, 25 Oct 2012 21:42:20 +0000 (23:42 +0200)]
HACKING: "Adding a new hardware driver" chapter.
Alexandru Gagniuc [Wed, 24 Oct 2012 21:48:41 +0000 (16:48 -0500)]
.gitignore: (Trivial) Ignore KDevelop project files
Signed-off-by: Alexandru Gagniuc <redacted>
Uwe Hermann [Wed, 24 Oct 2012 00:51:17 +0000 (02:51 +0200)]
configure.ac: Small consistency fixes.
Uwe Hermann [Tue, 23 Oct 2012 22:41:21 +0000 (00:41 +0200)]
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.
Uwe Hermann [Mon, 22 Oct 2012 00:32:53 +0000 (02:32 +0200)]
Doxygen: Explain init/shutdown, add small example.
Uwe Hermann [Sun, 21 Oct 2012 23:21:20 +0000 (01:21 +0200)]
Doxygen: libsigrok.h: Explain #include file usage.
Uwe Hermann [Sun, 21 Oct 2012 23:13:36 +0000 (01:13 +0200)]
Doxygen: Various fixes in libsigrok.h.
Uwe Hermann [Sun, 21 Oct 2012 22:30:12 +0000 (00:30 +0200)]
Doxygen: Add @file items for the relevant files.
These short descriptions are shown in the "Files" section of the
Doxygen output.
Uwe Hermann [Sun, 21 Oct 2012 21:43:41 +0000 (23:43 +0200)]
Doxygen: Fix grouping of session_file.c functions.
s/@ingroup/@addtogroup/ and s/grp_device/grp_session/.
Uwe Hermann [Sun, 21 Oct 2012 21:24:42 +0000 (23:24 +0200)]
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.
Uwe Hermann [Sun, 21 Oct 2012 15:49:22 +0000 (17:49 +0200)]
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.
Uwe Hermann [Sun, 21 Oct 2012 14:52:56 +0000 (16:52 +0200)]
Doxygen: Fix a bunch of warnings and outdated docs.
Uwe Hermann [Sun, 21 Oct 2012 14:36:23 +0000 (16:36 +0200)]
Doxygen: Move error handling stuff to error.c.
Also, add an overview mini-section to the main page instead.
Uwe Hermann [Sun, 21 Oct 2012 14:13:36 +0000 (16:13 +0200)]
Doxygen: Initial groups and topic short descriptions.
Uwe Hermann [Fri, 19 Oct 2012 08:07:22 +0000 (10:07 +0200)]
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.
Uwe Hermann [Fri, 19 Oct 2012 08:06:45 +0000 (10:06 +0200)]
Doxygen: Add initial main page documentation section.
Uwe Hermann [Fri, 19 Oct 2012 08:01:45 +0000 (10:01 +0200)]
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.
Uwe Hermann [Thu, 18 Oct 2012 22:30:31 +0000 (00:30 +0200)]
Doxygen: Add sigrok logo PNG for use by Doxygen.
Uwe Hermann [Thu, 18 Oct 2012 20:51:16 +0000 (22:51 +0200)]
Doxyfile: Update to what doxygen 1.8.1.2 generates.
The new version has a number of neat improvements/features we could use.
Uwe Hermann [Mon, 22 Oct 2012 09:54:40 +0000 (11:54 +0200)]
Makefile.am: Add missing backslash.
Uwe Hermann [Mon, 22 Oct 2012 08:17:38 +0000 (10:17 +0200)]
backend.c: Revert accidentally committed test code.
Bert Vermeulen [Sat, 20 Oct 2012 23:34:34 +0000 (01:34 +0200)]
clean up autoconf/autobuild scripts
Uwe Hermann [Sun, 21 Oct 2012 20:41:39 +0000 (22:41 +0200)]
We now require libusb >= 1.0.9.
This is due to the use of libusb_error_name().
Uwe Hermann [Sun, 21 Oct 2012 20:40:43 +0000 (22:40 +0200)]
sr_init/sr_exit: Improve docs, add error checks.
Peter Stuge [Sun, 21 Oct 2012 18:23:36 +0000 (20:23 +0200)]
Add and init libusb_context * in struct sr_context when using libusb-1.0
This allows hardware drivers to use a common libusb_context.
Peter Stuge [Sun, 21 Oct 2012 18:23:14 +0000 (20:23 +0200)]
Add a struct sr_context * parameter to sr_init() and sr_exit()
Uwe Hermann [Fri, 19 Oct 2012 08:35:11 +0000 (10:35 +0200)]
Move 'struct drv_context' to sigrok-internal.h.
It's not meant to be visible to frontends.
Alexandru Gagniuc [Sat, 20 Oct 2012 01:40:50 +0000 (20:40 -0500)]
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 <redacted>
Alexandru Gagniuc [Sat, 20 Oct 2012 01:31:19 +0000 (20:31 -0500)]
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 <redacted>
Alexandru Gagniuc [Fri, 19 Oct 2012 22:50:20 +0000 (17:50 -0500)]
libsigrok: (Trivial) Add support for 2400 baud
Signed-off-by: Alexandru Gagniuc <redacted>
Bert Vermeulen [Thu, 18 Oct 2012 20:43:03 +0000 (22:43 +0200)]
add SR_HWOPT_* documentation
Bert Vermeulen [Tue, 16 Oct 2012 21:32:39 +0000 (23:32 +0200)]
fluke-dmm: add support for Fluke 187
Bert Vermeulen [Tue, 16 Oct 2012 21:31:18 +0000 (23:31 +0200)]
analog: add pretty-printer for dBu and dBV
Bert Vermeulen [Tue, 16 Oct 2012 21:28:04 +0000 (23:28 +0200)]
add SR_UNIT_DECIBEL_VOLT (dBu)
Bert Vermeulen [Tue, 16 Oct 2012 12:03:40 +0000 (14:03 +0200)]
analog: sane printing of very small and negative values
Uwe Hermann [Tue, 16 Oct 2012 12:48:39 +0000 (14:48 +0200)]
HACKING: Cosmetics.
Uwe Hermann [Tue, 16 Oct 2012 10:08:01 +0000 (12:08 +0200)]
Build fix for Windows/MinGW.
On Window/MinGW 'recv' seems to be already defined in some headers.
Use 'receive' instead, for now.
Uwe Hermann [Tue, 16 Oct 2012 09:24:03 +0000 (11:24 +0200)]
Re-add HACKING file after repo split.
Alexandru Gagniuc [Tue, 16 Oct 2012 06:23:50 +0000 (01:23 -0500)]
radioshack-dmm: (Trivial) Convenience fixes
While testing the new radioshack-dmm driver with pulseview, I found
a few inconvenients.
1. Print an info message when a port is probed, and when a device is
found. This makes it easy to tell if and where the driver is looking.
2. num_samples was not reset after the first aquisition, so the
second aquisition would quit right away. Reset num_samples at start
of a new aquisition.
3. There's no need to open the serial port RW, so change O_RDWR to
O_RDONLY when opening the port.
These changes are too trivial to split into different patches.
Signed-off-by: Alexandru Gagniuc <redacted>
Bert Vermeulen [Mon, 15 Oct 2012 16:25:48 +0000 (18:25 +0200)]
radioshack-dmm: build fixes
Alexandru Gagniuc [Mon, 15 Oct 2012 06:17:32 +0000 (01:17 -0500)]
radioshack-dmm: Add support for Radioshack 22-812 DMM
Signed-off-by: Alexandru Gagniuc <redacted>
Alexandru Gagniuc [Mon, 15 Oct 2012 06:14:04 +0000 (01:14 -0500)]
libsigrok.h: Add measured quantity and units used by Radioshack 22-812
The Radioshack 22-812 can measure parameters such as transistor gain,
dbm, etc. Add those to libsigrok.h.
The SR_UNIT_UNITLESS is for quantities that do not have units. Any
ratio or gain are just factors, whic do not have units. Specifically,
a transistor's gain, or hFE, is a unitless quantity.
Signed-off-by: Alexandru Gagniuc <redacted>
Alexandru Gagniuc [Mon, 15 Oct 2012 06:12:53 +0000 (01:12 -0500)]
serial: (Trivial) add support for 4800 baud
Signed-off-by: Alexandru Gagniuc <redacted>
Alexandru Gagniuc [Mon, 15 Oct 2012 06:11:39 +0000 (01:11 -0500)]
.qitignore: Ignore KDE backup files
*.kate-swp files can become annoying, so ignore them.
Signed-off-by: Alexandru Gagniuc <redacted>
Bert Vermeulen [Mon, 15 Oct 2012 09:32:36 +0000 (11:32 +0200)]
analog: support AC+DC unit modifier
Bert Vermeulen [Mon, 8 Oct 2012 21:56:06 +0000 (23:56 +0200)]
don't accept numbers as probe identifiers in trigger string
Only the probe name, as supplied by the device driver, is accepted.
Uwe Hermann [Thu, 11 Oct 2012 21:46:30 +0000 (23:46 +0200)]
Quick workaround for g_match_info_unref().
Uwe Hermann [Wed, 10 Oct 2012 21:08:32 +0000 (23:08 +0200)]
README: Add status, update URL, small fixes.
Bert Vermeulen [Mon, 8 Oct 2012 16:52:36 +0000 (18:52 +0200)]
updated URLs and description
Bert Vermeulen [Mon, 8 Oct 2012 13:53:00 +0000 (15:53 +0200)]
restore pre-split ignores
Uwe Hermann [Thu, 27 Sep 2012 21:29:33 +0000 (23:29 +0200)]
sr: struct drv_context is global now.
Bert Vermeulen [Tue, 25 Sep 2012 17:38:59 +0000 (19:38 +0200)]
fluke-dmm: support for all basic 287 functionality
Bert Vermeulen [Tue, 25 Sep 2012 17:34:53 +0000 (19:34 +0200)]
sr: add support for conductance measurements in Siemens
Bert Vermeulen [Tue, 25 Sep 2012 16:33:42 +0000 (18:33 +0200)]
sr: add support for pulse width measurements
Bert Vermeulen [Sat, 22 Sep 2012 22:03:24 +0000 (00:03 +0200)]
fluke-dmm: definitely use CR as line terminator
Bert Vermeulen [Sat, 22 Sep 2012 21:52:23 +0000 (23:52 +0200)]
fluke-dmm: add Fluke 287 to supported list
Bert Vermeulen [Sat, 22 Sep 2012 21:50:51 +0000 (23:50 +0200)]
sr: always turn off ICRNL on serial ports
It does rather screw with protocols that use CR.
Bert Vermeulen [Mon, 17 Sep 2012 14:31:15 +0000 (16:31 +0200)]
fluke-dmm: flesh out the driver API
Bert Vermeulen [Mon, 17 Sep 2012 13:40:41 +0000 (15:40 +0200)]
fluke-dmm: auto-discover serial bitrate if not provided
Bert Vermeulen [Sun, 16 Sep 2012 19:27:06 +0000 (21:27 +0200)]
fluke-dmm: don't log anything if no conn params given
Bert Vermeulen [Sun, 16 Sep 2012 19:07:17 +0000 (21:07 +0200)]
fluke-dmm: fix discovery
Bert Vermeulen [Sun, 16 Sep 2012 12:07:21 +0000 (14:07 +0200)]
sr: turn off canonical mode and echo ion serial ports by default