Commit Graph

4659 Commits

Author SHA1 Message Date
Soeren Apel f55bea7626 Demo: Implement multi-frame development feature 2017-10-03 17:31:48 +02:00
Soeren Apel b7602846fd Add std_session_send_frame_begin/end helpers 2017-10-03 17:31:48 +02:00
Joel Holdsworth 55584d38dd dreamsourcelab-dslogic: Fixed deinterleaving when non-contiguous set of channels are enabled 2017-09-26 21:48:04 +02:00
Uwe Hermann cb17f580b9 beaglelogic: Inline beaglelogic_devc_alloc(). 2017-09-26 19:51:55 +02:00
Uwe Hermann f82525e60d beaglelogic: Minor whitespace and consistency fixes. 2017-09-26 19:51:55 +02:00
Uwe Hermann 00f2e9bc6b beaglelogic: No need to check g_free() argument.
glib's g_free() function will gracefully handle NULL as input.
2017-09-26 19:51:55 +02:00
Kumar Abhishek a31010b3e4 beaglelogic: Coding style fixes
In beaglelogic_native.c and beaglelogic_tcp.c

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:46 +02:00
Kumar Abhishek ca0d1a21af beaglelogic: Fix regression in continuous sampling
Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:46 +02:00
Kumar Abhishek 3124d3bc48 beaglelogic: Update copyright notices in all files
Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:46 +02:00
Kumar Abhishek f154b40ddd beaglelogic: Fix compiler warnings in beaglelogic_tcp.c
Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:46 +02:00
Kumar Abhishek a486fca9e2 beaglelogic: Close device after detection, and reopen upon open
Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:46 +02:00
Kumar Abhishek f955ffe83f beaglelogic: Changes for proper operation in PulseView
Set samplelimit to a sane value (was causing PulseView to
crash earlier), as well as advertise samplerate using SR_CONF_LIST
so that PulseView can show the sample rates.

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:46 +02:00
Kumar Abhishek d6f20d0366 beaglelogic: Fix PulseView crash on close
Use dev_clear instead of std_dev_clear to clean up our private
data structure.

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:46 +02:00
Kumar Abhishek f7d7ee82dd beaglelogic: Add beaglelogic_tcp_drain function
The function drains off all the remaining data in the receive socket
and is triggered before starting a capture and after a capture is
completed. In the absence of this function, there is a possibility of
data corruption and also the NodeJS TCP server throws an error if the
buffer is not completely read out before the socket is closed.

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:46 +02:00
Kumar Abhishek 9b2b3ef93e beaglelogic: Implement TCP protocol
BeagleLogic now supports two modes of interface - one being the
native mode running on an ARM system like the BeagleBone Black
and the other mode acting like a TCP client for the BeagleLogic
server running off a BeagleBone compatible system. This makes it
convenient for desktop users to retrieve samples from BeagleLogic,
no more copying files and SSHing into the BeagleBone hardware in
order to use BeagleLogic.

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:46 +02:00
Kumar Abhishek 0bca2e75f5 beaglelogic: Re-organize to prepare for TCP support
Organize driver functions into an ops structure (there will be
separate structures for both native and TCP mode of operation).

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:46 +02:00
Kumar Abhishek 88d2037bca beaglelogic: Split beaglelogic code into .h and .c file
The code earlier was in a single .h file, so it's now separated into a C file
and H file

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:46 +02:00
Kumar Abhishek e71062d99b beaglelogic: Flexible sampleunit depending on enabled channels
If a channel in the higher-than-8-bit group is enabled then use
16-bit captures. Otherwise just do 8-bit captures.

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:46 +02:00
Kumar Abhishek 55f26c42de beaglelogic: Remove 'as root' from warning message
Starting with Linux kernel version 4.9, BeagleLogic attributes
setting does not require root permissions.

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:14:31 +02:00
Kumar Abhishek 713f3f8480 beaglelogic: Enable seamless continuous capturing
This is done by setting triggerflags to 1 unless SR_CONF_LIMIT_SAMPLES is set

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:06:34 +02:00
Kumar Abhishek 6eab3021ec beaglelogic: Update scan() to return all 14 channels by default
This is unlike the previous behavior to return 8 channels and then
use logic_channels to get all the 14 channels

Signed-off-by: Kumar Abhishek <abhishek@theembeddedkitchen.net>
2017-09-26 18:06:34 +02:00
Uwe Hermann 1f488f50b9 sr_parse_rational(): Make is_negative a bool. 2017-09-24 21:17:51 +02:00
Stefan Brüns 41c47f2c6a strutil: Fix sr_parse_rational for integral parts between -0 and -1
Values like '-0.1' would be parsed as being positive, as the integral
type does not discern +0 and -0. Also allow values without leading
integral value, to match behaviour of strtod/sr_atof.
2017-09-24 21:04:46 +02:00
Joel Holdsworth f05600f4be dreamsourcelab-dslogic: Fixed enabling of triggers 2017-09-19 00:31:11 +02:00
Joel Holdsworth 16d4c982a3 dreamsourcelab-dslogic: Moved devc and usb assignment into initializers 2017-09-19 00:31:11 +02:00
Joel Holdsworth 9f58023066 dreamsourcelab-dslogic: Improved naming of variables in fpga_configure 2017-09-19 00:31:11 +02:00
Joel Holdsworth b7a3d79e46 dreamsourcelab-dslogic: Fixed trigger-stages field in trig_glb 2017-09-19 00:31:11 +02:00
Joel Holdsworth b23ecd6ce7 dreamsourcelab-dslogic: Simplified trigger population 2017-09-19 00:31:06 +02:00
Uwe Hermann 689749b741 Drop libftdi 0.x support, require libftdi 1.x.
There were some issues when using libftdi 0.x recently that are fixed
when switching to libftdi 1.x (not really worth the effort to investigate).

libftdi 1.x has been around several years now and should be available
in most recent distros and OSes. For the rare cases where it is not,
it's easy enough to get it via backport packages, or build from source,
or sigrok users can just use our binary installers for most OSes.

This also "fixes"/obsoletes bug #959.
2017-09-17 17:01:07 +02:00
Uwe Hermann 19c9b17648 serial-dmm: Add PeakTech 4390A alias.
This is a rebadged Metex M-3860M.
2017-09-15 22:03:32 +02:00
Uwe Hermann 86a1571135 dreamsourcelab-dslogic: Fix incorrect default threshold setting.
This was leading to an invalid threshold config value and indirectly
to frontend issues.

Slightly modified patch from James Churchill <pelrun@gmail.com>, thanks!
2017-09-14 11:15:06 +02:00
Frank Stettner 57837aeda5 conrad-digi-35-cpu: Fix key names for setting voltage and current 2017-09-13 14:11:07 +02:00
Frank Stettner fcc73918b0 serial-dmm: Add Metex M-3860M 2017-09-13 14:03:40 +02:00
Frank Stettner eea576077b conrad-digi-35-cpu: Add and use missing dev_context structure 2017-09-13 14:03:40 +02:00
Uwe Hermann bc98407b8f dreamsourcelab-dslogic: config_list: Handle SR_CONF_TRIGGER_MATCH.
This fixes bug #1032.
2017-09-13 13:05:42 +02:00
Uwe Hermann 7bf81cb7a9 chronovu-la: Silence overly verbose log message.
This triggered all kinds of unrelated / confusing log messages
for unrelated hardware devices, e.g.:

  sr: [00:00.613080] chronovu-la: Unknown iProduct string 'USB-based Instrument'.
  sr: [00:00.614374] chronovu-la: Unknown iProduct string 'GL3220      '.
  sr: [00:00.614907] chronovu-la: Unknown iProduct string 'USB 3.0 HUB      '.
  sr: [00:00.615558] chronovu-la: Unknown iProduct string 'USB 2.0 HUB      '.
  sr: [00:00.619846] chronovu-la: Unknown iProduct string 'Bluetooth USB Host Controller'.
  sr: [00:00.620411] chronovu-la: Unknown iProduct string 'USB 3.0 HUB      '.
  sr: [00:00.624293] chronovu-la: Unknown iProduct string 'UAC1 DAC'.
  sr: [00:00.627849] chronovu-la: Unknown iProduct string 'BRCM20702 Hub'.
  sr: [00:00.628640] chronovu-la: Unknown iProduct string 'USB 2.0 HUB      '.
  sr: [00:00.674777] chronovu-la: Unknown iProduct string 'USB2223'.
  sr: [00:00.675034] chronovu-la: Unknown iProduct string ''.
  sr: [00:00.675180] chronovu-la: Unknown iProduct string ''.
  sr: [00:00.675205] hwdriver: Scan found 0 devices (chronovu-la).
2017-09-12 22:15:32 +02:00
Marcus Comstedt 393375e1fe drivers: Remove dependency on linker implementation specific behaviour 2017-09-02 17:06:37 +02:00
Uwe Hermann 9014d45968 z60_libsigrok.rules: Add Brymen BU-86X adapter IDs. 2017-08-21 18:24:42 +02:00
turboaffe 9520fd4134 manson-hcs-3xxx: enabled output guaranteed write 2017-08-19 19:21:54 +02:00
turboaffe 6508294dca manson-hcs-3xxx: added new name for 3304, adjustment to new manson fw 2017-08-19 19:21:54 +02:00
Gerhard Sittig 5753d2e84b brymen-bm86x: support channel selection (enable/disable channels)
The previous implementation unconditionally submitted analog data
whenever values could get extracted out of received serial packets.
This commit checks the channels' enabled state before submission. Care
is taken to obey the user's acquisition limits, exclusively counting
submitted not received values.
2017-08-19 19:21:54 +02:00
Gerhard Sittig 503519b70a lsr/es51919: support channel selection (enable/disable P1/P2)
Upon reception of serial data from the ES51919 LCR chipset, the data for
channels P1 and P2 was extracted from the packet, and unconditionally got
sent to the sigrok session.

Do check the channels' enabled state before submission. This fixes for
serial-lcr what recently got reported for a Brymen DMM. Tested with

  $ sigrok-cli -d peaktech-2170:conn=/dev/ttyUSB0 --channels P2

and other --channels specifications.
2017-08-19 19:21:53 +02:00
Gerhard Sittig 12788e7e40 lcr/es51919: clean but don't free dev context in cleanup callback
The es51919_serial_clean() routine is called by std_dev_clear_with_callback().
Common code unconditionally frees the 'priv' part. The cleanup callback only
shall release descending resources which are local to the callee and opaque
to the caller.

This fixes a double free error. Tested with PeakTech 2170.

  $ sigrok-cli -d peaktech-2170:conn=/dev/ttyUSB0 --show
2017-08-19 19:21:51 +02:00
Uwe Hermann 1503d4571b resource: Also check $SIGROK_FIRMWARE_DIR for firmware files.
If the SIGROK_FIRMWARE_DIR environment variable is specified, look there
first for firmware files.
2017-08-15 22:15:47 +02:00
Gerhard Sittig dde0175d19 asix-sigma: download sample data upon user initiated stop, too
When the acquisition was stopped before a configured limit was reached,
no sample data was retrieved. This is because the api.c stop routine did
unregister the receive callback.

Pass the stop request to the receive routine instead when stop is called
while the acquisition is still running. Have sample data downloaded very
much like it's done for reached limits, and existing logic will run the
stop routine again after state was advanced to "idle".

Extend the 'state' tracking while we are here, mark sample download as
well (that was omitted in the previous implementation). Though the
omission was non-fatal. Move the release of 'dram_line' to some earlier
location (as soon as the resource is not needed any longer), before some
rather complex calls to other routines will execute.

Reported-By: Michael Kaplan <M.KAPLAN@evva.com>
2017-08-11 18:52:23 +02:00
Uwe Hermann 379e95c587 drivers: Use serial_write_blocking() everywhere.
This fixes bug #962.
2017-08-07 14:22:52 +02:00
Uwe Hermann b5df922e4f sr_voltage_string(): Add a space before the unit.
This makes the output consistent with most of the other functions
in libsigrok.
2017-08-06 19:45:45 +02:00
Uwe Hermann c911599da7 Add sr_voltage_string() unit tests. 2017-08-06 19:38:31 +02:00
Uwe Hermann d2391b5453 drivers: Use g_strdup_printf() where possible. 2017-08-06 19:38:31 +02:00
Uwe Hermann 8ebad34370 drivers: Random whitespace fixes. 2017-08-06 17:31:46 +02:00