Commit Graph

29 Commits

Author SHA1 Message Date
poljar (Damir Jelić) 3fd2dca207 hameg-hmo: Add missing cases in config_get(). 2014-03-25 20:48:58 +01:00
poljar (Damir Jelić) bbabdaf1e2 hameg-hmo: Add the TRIGGER_SLOPE entry to config_list(). 2014-03-25 20:48:58 +01:00
poljar (Damir Jelić) 422a1c0d58 hameg-hmo: Fix the logic for the horizontal trigger position in config_set()
This patch fixes the logic calculating the trigger position as well as the
(hopefully) last remaining locale issue.
2014-03-25 20:48:58 +01:00
Uwe Hermann 67bd805523 Switch to a non-recursive automake setup.
Instead of >= 44 Makefile.am's we now only have one top-level
Makefile.am, and use the 'subdir-objects' automake option to
handle the build via non-recursive (auto)make.

This has the advantage of fewer (boilerplate or other) files and less
clutter in general, as well as performance advantages since the new
setup can build many files in parallel (with 'make -j'), not only 2 or 3
files within the same (e.g. hardware/xxxx/* subdirectory) and also since
we no longer need to build intermediate libtool helper libs per subdirectory.

A quick, non-scientific test build on a quad-core laptop with 'make -j 4'
yields a build time reduction from 35s to 19s.

All autotools features that worked before are still intact without any
regressions, including the Make targets 'install', 'uninstall', 'check',
'dist', 'clean', 'distclean' and so on, as well as all the usual portability
handling (build works on any OS, with any Make implementation such as
GNU Make or BSD Make, with any shell such as sh/ksh/zsh/bash/dash, etc. etc.)
and features such as out-of-tree build support, cross-compile support,
testsuite support (also with colored output), "silent make rules", etc. etc.
2014-03-20 13:10:05 +01:00
Aurelien Jacobs ca28abd6a5 hameg-hmo: use the new scpi scan API 2014-02-07 18:53:04 +01:00
Aurelien Jacobs 17bdda5868 scpi: add a struct drv_context parameter to scpi_dev_inst_new() 2014-02-07 18:53:04 +01:00
Daniel Elstner ca9b9f4834 hwdriver: Change TRIGGER_SLOPE setting to string type.
Drivers interpreted the uint64 values to the SR_CONF_TRIGGER_SLOPE
configuration setting in different ways.  In order to orthogonalize
the API, change the type of the setting to a string with the same
format as uses for logic probes.
2014-01-27 20:55:01 +01:00
Uwe Hermann 55eb33dbf8 hameg-hmo: Fix two compiler warnings on Windows.
CC       libsigrok_hw_hameg_hmo_la-protocol.lo
api.c: In function 'auto_find_usb':
api.c:70:39: warning: unused parameter 'vendor_id' [-Wunused-parameter]
 static GSList *auto_find_usb(uint16_t vendor_id, uint16_t product_id)
                                       ^
api.c:70:59: warning: unused parameter 'product_id' [-Wunused-parameter]
 static GSList *auto_find_usb(uint16_t vendor_id, uint16_t product_id)
                                                           ^
2014-01-17 00:38:47 +01:00
poljar (Damir Jelić) c06c24d2d3 hameg-hmo: Silence warning about format security.
The command for fetching the sample rate while in single shot mode doesn't take
an argument so the snprintf here is redundant.
2014-01-16 23:02:47 +01:00
poljar (Damir Jelić) ef1a346b0b hameg-hmo: Reset the number of acquired frames in acquisition stop. 2014-01-16 23:02:47 +01:00
poljar (Damir Jelić) ccf1461825 hameg-hmo: Expose more options with config_get().
This patch exposes the TRIGGER_SOURCE and COUPLING options via config_get().
2014-01-16 16:27:35 +01:00
poljar (Damir Jelić) eff1ee0321 hameg-hmo: Advertise the frame limit option. 2014-01-16 16:27:35 +01:00
poljar (Damir Jelić) 23e1ea7a7d hameg-hmo: Update the sample rate when the channel states or the timebase change.
The sample rate on the Hameg scopes changes depending on the number of channels
turned on and on the current timebase.

Update the sample rate if any of the above change.
2014-01-16 16:27:35 +01:00
poljar (Damir Jelić) 14a2f74d9a hameg-hmo: Add support for sample rate fetching. 2014-01-16 16:27:35 +01:00
poljar (Damir Jelić) 8de2dc3b2e hameg-hmo: Change the way vdiv and timebase are saved.
The current vertical division setting (per channel) and the timebase are stored
as a floating point number. This is suboptimal since clients expect us to send
this information to them in form of a rational number.

Store only the index of the current setting since all the supported settings are
already stored inside of an array.
2014-01-16 16:27:35 +01:00
poljar (Damir Jelić) 66e3219dbd hameg-hmo: Send the DF_END packet in acquisition_stop()
The DF_END packet was send out after all configured frames were fetched, but
devices may stop the acquisition at any point in time and an DF_END will not be
send out in this case.

Send the DF_END packet inside of acquisition_stop() so this can't happen.
2014-01-16 16:27:35 +01:00
poljar (Damir Jelić) 68e3d07014 hameg-hmo: Close the device after initial scan.
The device is after a scan left open and clients that don't call unconditionally
dev_open() will never fetch the initial device state.

Close the device after the scan so clients know they need to open it.
2014-01-16 16:27:35 +01:00
poljar (Damir Jelić) 965b463d98 hameg-hmo: Handle floating point numbers while ignoring the locale. 2014-01-16 16:27:35 +01:00
Aurelien Jacobs d87c1766f2 change a bunch of functions from SR_PRIV to static
None of those functions are called across compilation units.
2014-01-14 23:39:23 +01:00
Aurelien Jacobs c3515cea44 scpi: factorize dev_inst_new calls out of individual drivers 2014-01-11 22:36:46 +01:00
Bert Vermeulen 53cd1c78f5 hameg-hmo: Support DC LINE coupling. 2013-12-27 16:28:42 +01:00
Martin Ling 3544f848e0 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
poljar (Damir Jelić) e9a6213976 hameg-hmo: Move the declaration of the driver info out of protocol.h
This fixes duplicate symbol error on Mac OS X.

BugLink: http://sigrok.org/bugzilla/show_bug.cgi?id=216
2013-12-18 22:17:30 +01:00
Martin Ling 23f43dff15 Make SCPI functions device independent, with separate serial backend. 2013-12-03 22:00:31 +00:00
Uwe Hermann 082972e8c5 hameg-hmo: Reduce unnecessarily high nesting level. 2013-12-03 17:13:50 +01:00
Uwe Hermann 719eff68ad hameg-hmo: Use hmo_ prefix for driver-local SR_PRIV functions. 2013-12-03 16:58:34 +01:00
Uwe Hermann 89280b1a4c hameg-hmo: Minor cosmetics, coding-style fixes. 2013-12-03 16:48:21 +01:00
poljar (Damir Jelić) 13f2b9d789 hameg-hmo: Add initial working driver version.
This patch adds initial support for Hameg's HMO oscilloscopes. It currently
supports only the HMO compact series (70MHz-200MHz).
2013-12-03 15:13:30 +01:00
poljar (Damir Jelić) 06a3e78adb hameg-hmo: Initial driver skeleton. 2013-12-03 15:13:30 +01:00