Commit Graph

184 Commits

Author SHA1 Message Date
Matt Ranostay 6ebe003985 ols: fixed demux mode disable noise filter
Demux flag wasn't getting set off if one non-demux sample was ran
beforehand.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-09-07 20:17:16 +02:00
Matt Ranostay 6a53bde671 ols: Moved FLAG_FILTER to demux check
Demux mode was having filter mode set which it doesn't
support per FPGA demon core docs.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-09-06 11:42:25 +02:00
Matt Ranostay b1de040700 ols: fixed channel limit check
For demux mode we half the channels. Previous check method broke
the OLS randomly and but it in a bad state.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-30 13:58:36 +02:00
Matt Ranostay f51acd69d7 ols: combine demux samples
demux mode allows DDR sampling which disables group 2 & 3
and thus samples group 0 & 1 to sample on rising and falling of
the clock.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-28 10:21:59 +02:00
Matt Ranostay 7b0a57fd1c ols: add swap channels feature
Allow channel groups to be swapped. This is useful
for demux at 200mhz with the unbuffered channels.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-28 10:21:59 +02:00
Matt Ranostay de52409982 ols: Display noise filter flag
Show if noise filter is on. This is important to be
sure is off for demux mode.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-28 10:21:59 +02:00
Bert Vermeulen 00d04d3b0e ols: Fix RLE count handling
The high bit of the sample, denoting this is a count, was not getting
properly cleared. This resulted in an inevitably negative count, and
corruption of the sample buffer before it was transferred to the
frontend.
2013-08-27 00:33:20 +02:00
Bert Vermeulen abb39e6b8c ols: Properly initialize entire single-sample buffer before start
The single sample buffer, up to 4 bytes long, was not getting initialized
on (every) acquisition start, only after the first full sample was in.
This caused the first sample to potentially hold garbage.
2013-08-26 23:42:09 +02:00
Matt Ranostay eb1b610b12 ols: add external clock support
Add external clock support that allows you to use the tracing
targets bus clock line for sampling.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-26 10:28:45 +02:00
Matt Ranostay 967760a893 ols: add test mode support
ols allows both external and internal test patterns at ~20khz
which are helpful for unit tests and demos.

pattern=internal -> route pattern internally to all 32 pins
                      (input otherwise disabled)

pattern=external -> generates pattern on unbuffered pins 16:31
                      (which can be looped back to the buffered pins 0:15)

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-26 09:52:24 +02:00
Matt Ranostay 503133bb5f ols: fixed parallel stage triggers
Stage count was always getting incremented one more than
actual stages, and this caused a extra stage with zero'ed data
probe lines to have the start bit field.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-26 09:48:41 +02:00
Bert Vermeulen faf720246a ols: Workaround for mac os X stray events 2013-08-01 19:48:07 +02:00
Uwe Hermann eea49cf10d ols/link-mso19: Consistency fixes.
Use the same setup/ordering/naming for the cleanup/dev_clear functions
as all other drivers do.
2013-06-02 17:03:40 +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 decfe89d4e Drop some lines that are no longer needed. 2013-05-10 18:30:32 +02:00
Uwe Hermann 2a052cc4d6 Use consistent naming for internal libtool helper libs.
This now also matches what the 'new-driver' tool generates.
2013-05-10 17:44:01 +02:00
Uwe Hermann 9e165e742f Use consistent HW_ name prefixes everywhere.
Older drivers used LA_* previously, we now use HW_* everywhere though.
2013-05-10 17:18:42 +02:00
Bert Vermeulen 03f4de8cf2 ols: Code cleanup
This also fixes a memory leak.
2013-05-06 00:42:18 +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 0f75d6f5a9 ols: Don't close serial port after acquisition is done 2013-04-29 12:39:26 +02:00
Bert Vermeulen e73ffd4238 Enforce open device before config_set()/dev_acquisition_start() 2013-04-24 22:03:50 +02:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Bert Vermeulen 459a0f2623 ols: Use sr_dev_inst to store connection handle 2013-04-22 13:40:40 +02:00
Bert Vermeulen 2e5b73c00c ols: Fix stack clobbering at start of acquisition
This off-by-one was clobbering the stack since introduced in a803c0db4d.
However it only set one bit, and that generally appears to have been set
already, so this rarely affected anything. But when it did, it affected
a pointer, causing a segfault.
2013-04-22 13:33:31 +02: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 72cd99b876 ols: Report when a device doesn't support metadata
Not an error, but it does mean it's either a really old or really
basic device, and will help us to debug people's problems with
these.

Fixes bug 92.
2013-04-16 00:23:34 +02:00
Bert Vermeulen e5d15bd2a2 ols: Allow configuration before the device is opened 2013-04-15 20:05:43 +02:00
Bert Vermeulen bf25678359 ols: Properly initialize operational state before start 2013-04-15 18:28:43 +02:00
Bert Vermeulen 0c05591abf ols: Support get/set/list on all device options
Where it makes sense: _LOGIC_ANALYZER and _TRIGGER_TYPE don't have much
use for all of them.
2013-04-14 00:36:05 +02:00
Bert Vermeulen fe9ac25250 ols: Get rid of gcc warnings 2013-04-11 18:32:08 +02:00
Bert Vermeulen aeea057220 ols: allow for disabling of RLE as well 2013-04-11 18:32:06 +02:00
Bert Vermeulen e46aa4f611 ols: Adjust to GVariant-based sr_config_* functions 2013-04-11 18:32:06 +02:00
Bert Vermeulen 13d8e03c4f Bump copyright year 2013-04-11 18:32:06 +02:00
Bert Vermeulen 9857276261 ols: use ptr to int dereference for SR_T_BOOL
This mad ptr to int casting has to go.
2013-03-11 16:37:02 +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 d3b38ad389 Drivers: Explicitly list sr_samplerates fields.
This makes it a bit easier to understand which value means what, just
from looking at the driver code.
2013-01-29 12:56:02 +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 0d485e30c6 Deprecate SR_DI_HWOPTS.
This is replaced by SR_CONF_SCAN_OPTIONS.
2013-01-25 15:09:20 +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 c50277a6ec Deprecate SR_DI_TRIGGER_TYPES.
This is replaced by SR_CONF_TRIGGER_TYPE.
2013-01-25 11:52:27 +01:00
Bert Vermeulen 123e131383 Deprecate SR_DI_CUR_SAMPLERATE.
This is replaced by SR_CONF_SAMPLERATE.
2013-01-25 03:17:36 +01:00
Bert Vermeulen fbec8bd2f3 deprecate SR_DI_SAMPLERATES
This is replaced by a call to config_list() with id SR_CONF_SAMPLERATE.
2013-01-25 02:39:58 +01:00
Bert Vermeulen a1c743fc51 drivers: implement config_list() 2013-01-25 02:37:26 +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 1987b8d63e drivers: use new sr_config struct
Sending an SR_DF_META packet at the start of every stream is not
mandatory; the frontend should ask for what it needs, and any extra
information the driver wants to send will come in due time.
2013-01-21 23:32:49 +01:00
Bert Vermeulen 6b8d6f93bb Get rid of obsolete SR_DI_NUM_PROBES and SR_DI_PROBE_NAMES.
Frontends should use the probe list in the device's sr_dev_inst
to get this information.
2013-01-15 17:42:23 +01:00