Commit Graph

68 Commits

Author SHA1 Message Date
poljar (Damir Jelić) 1130e4229b rigol-ds1xx2: Send a SR_DF_END packet before acquisition stop.
Without a SR_DF_END samples could be cached in the internal buffer of an output
module and never flushed, therefore they would be missing in the final output.

By sending a SR_DF_END packet we force the output to be flushed.
2013-11-15 17:00:07 +01:00
Bert Vermeulen 58f4336963 rigol-ds1xx2: Unbreak listing of _VDIV and _COUPLING 2013-11-08 01:03:19 +01:00
Bert Vermeulen 5f77dffc02 rigol-ds1xx2: Unbreak listing of SR_CONF_DEVICE_OPTIONS 2013-11-08 01:03:19 +01:00
Bert Vermeulen be60a9e4a9 rigol-ds1xx2: Better error reporting when probe groups are required 2013-11-08 01:03:19 +01:00
Bert Vermeulen 78bcc55afa rigol-ds1xx2: Minor coding style fixes 2013-11-08 01:03:19 +01:00
Bert Vermeulen ba358ffd83 rigol-ds1xx2: fix bitrot in device cleanup code 2013-11-08 01:03:18 +01:00
Bert Vermeulen e43fdd8d4f rigol-ds1xx2: Don't assume valid sdi 2013-11-08 01:03:18 +01:00
Bert Vermeulen 45311368de rigol-ds1xx2: Skip obsolete fields 2013-11-08 01:03:18 +01:00
Martin Ling f48e0249b4 rigol-ds1xx2: implement probe group specific options. 2013-11-08 01:03:17 +01:00
Martin Ling 3d3a601e80 rigol-ds1xx2: create probe groups. 2013-11-08 01:03:17 +01:00
Martin Ling 8f996b8948 probe_groups: API changes required to implement probe groups. 2013-11-08 01:03:16 +01:00
Dan Horák b775d753e3 rigol-ds1xx2: detect Rigol DS1xx2 with upgraded bandwith
The bandwith in Rigol DS1xx2D/E scopes can be upgraded to 150 MHz in software.
So detect also scopes with the upgraded bandwith.

using libsigrok-0.2.1 + this change + commit da970d24ec (required for newer kernels):

[dan@eagle sigrok]$ sigrok-cli --scan -d rigol-ds1xx2 -l 5
sr: libsigrok loglevel set to 5.
sr: Sanity-checking all drivers.
sr: Sanity-checking all input modules.
sr: Sanity-checking all output modules.
srd: libsigrokdecode loglevel set to 5.
sr: hwdriver: Initializing driver 'rigol-ds1xx2'.
sr: serial: Opening serial port '/dev/usbtmc0' (flags 1).
sr: serial: Opened serial port '/dev/usbtmc0' (fd 7).
sr: serial: Wrote 5/5 bytes (fd 7).
sr: serial: Closing serial port /dev/usbtmc0 (fd 7).
sr: rigol-ds1xx2: response: /dev/usbtmc0 [Rigol Technologies,DS1152D,DS1EU150XXXXXX,00.04.01.00.02]
sr: hwdriver: Scan of 'rigol-ds1xx2' found 1 devices.
The following devices were found:
rigol-ds1xx2 - Rigol Technologies DS1152D 00.04.01.00.02 with 18 probes: CH1 CH2 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15
2013-11-03 14:20:47 +01:00
Bert Vermeulen da970d24ec rigol-ds1xx2: newer Linux kernels have USBTMC in /sys/class/usbmisc 2013-08-30 13:57:45 +02:00
Uwe Hermann ce4d26ddf9 Various cosmetics, whitespace, consistency fixes. 2013-07-31 13:09:48 +02:00
Uwe Hermann 3b412e3a30 s/clear_instances/dev_clear/.
Consistently use the same name for the dev_clear() API callback
everywhere.
2013-06-02 16:56:41 +02:00
Uwe Hermann f6beaac55c std: Drop hw_ from function names.
The per-driver API calls no longer have a hw_ prefix (e.g. hw_init()
became init() and so on), so drop the 'hw_' from the std versions
for those API callbacks too.
2013-06-02 16:46:18 +02:00
Uwe Hermann fa85f37630 rigol-ds1xx2: Use std_dev_clear(). 2013-06-02 13:52:40 +02:00
Uwe Hermann 6078d2c996 Use consistent API callback function names.
This now matches what the 'new-driver' tool generates.
2013-05-10 20:01:37 +02:00
Uwe Hermann decfe89d4e Drop some lines that are no longer needed. 2013-05-10 18:30:32 +02:00
Uwe Hermann 29a27196a1 s/DRIVER_LOG_DOMAIN/LOG_PREFIX/.
This is more correct anyway, and also a bit shorter and more readable.
2013-05-03 21:59:32 +02:00
Bert Vermeulen e73ffd4238 Enforce open device before config_set()/dev_acquisition_start() 2013-04-24 22:03:50 +02:00
Bert Vermeulen 46a743c1fa Whitespace fixes
Damn editor.
2013-04-24 19:07:46 +02:00
Bert Vermeulen cc9fd2d29c rigol-ds1xx2: Code cleanup 2013-04-24 03:23:11 +02:00
Martin Ling 9bd4c95606 rigol-ds1xx2: Use common serial code. 2013-04-24 02:10:25 +02:00
Martin Ling ca55277ca8 rigol-ds1xx2: Accept SR_CONF_CONN. 2013-04-24 02:10:25 +02:00
Martin Ling e31d410d26 rigol-ds1xx2: fix delay time. 2013-04-21 20:42:22 +01:00
Martin Ling d2e0b1fa71 rigol-ds1xx2: better error handling in hw_scan. 2013-04-21 19:48:34 +01:00
Bert Vermeulen bd6fbf628a drivers: return SR_ERR_NA on unsupported config key
Fixes bug 89.
2013-04-16 11:00:55 +02:00
Bert Vermeulen a7be14ada2 rigol-ds1xx2: Don't assume there's a valid sdi 2013-04-15 18:45:38 +02:00
Martin Ling 6bb192bc05 rigol-ds1xx2: support digital channels. 2013-04-14 16:57:02 +02:00
Martin Ling a789b61087 rigol-ds1xx2: doesn't actually support SR_CONF_LIMIT_SAMPLES 2013-04-14 16:57:01 +02:00
Martin Ling ee7e9bee5d rigol-ds1xx2: fix handling of partial frames. 2013-04-14 16:57:01 +02:00
Bert Vermeulen 8f35be72b4 rigol-ds1xx2: Use g_usleep() for portability 2013-04-12 19:42:44 +02:00
Uwe Hermann 169dbe8577 rigol-ds1xx2: Whitespace, minor fix.
Return SR_ERR_MALLOC for failed malloc, not SR_ERR.
2013-04-12 18:44:28 +02:00
Bert Vermeulen 254dd102e8 rigol-ds1xx2: Support for all channels, proper defaults
Since this driver supports devices with a control panel and display,
we take the defaults from the device -- not a set of sensible
defaults as usual.
2013-04-11 18:32:08 +02:00
Bert Vermeulen 88e429c97f rigol-ds1xx2: fix channel numbers
Copyright bump, too.
2013-04-11 18:32:08 +02:00
Bert Vermeulen a3df166f02 rigol-ds1xx2: better debugging 2013-04-11 18:32:08 +02:00
Bert Vermeulen 75d8a4e576 rigol-ds1xx2: properly send frame begin/end packets 2013-04-11 18:32:08 +02:00
Bert Vermeulen d62d7ad151 rigol-ds1xx2: Support SR_CONF_NUM_TIMEBASE/SR_CONF_NUM_VDIV 2013-04-11 18:32:08 +02:00
Bert Vermeulen 861c447bfb rigol-ds1xx2: SR_CONF_TIMEBASE and _VDIVS lists are now an array of tuples 2013-04-11 18:32:08 +02:00
Bert Vermeulen f6a0ac9f62 rigol-ds1xx2: Adjust to GVariant-based sr_config_* functions 2013-04-11 18:32:07 +02:00
Uwe Hermann 333bf022e3 rigol-ds1xx2: Use ARRAY_SIZE. 2013-03-23 14:14:58 +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 4afdfd4628 Add and use std_session_send_df_header().
This is a small helper function which sends the SR_DF_HEADER packet that
drivers usually emit in their hw_dev_acquisition_start() API callback.
It simplifies and shortens the hw_dev_acquisition_start() functions
quite a bit.

It also simplifies the input modules which send an SR_DF_HEADER packet, too.

This patch also automatically removes some unneeded malloc/free in some
drivers for the 'packet' and 'header' structs used for SR_DF_HEADER.
2013-02-07 10:46:28 +01:00
Uwe Hermann 0e94d524c1 Shorten/simplify hw_dev_list() implementations. 2013-02-05 18:27:05 +01:00
Uwe Hermann 063e7aef6d Factor out common hw_init() driver code.
Most drivers do pretty much the same things in their hw_init()
right now, so factor out that code to std_hw_init() in std.c.
2013-01-29 12:56:02 +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
Bert Vermeulen 6a4710fac2 drivers: Trim unused config_get() calls
None of the driver config_get/set/list calls are required.
2013-01-25 16:05:48 +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