Commit Graph

4307 Commits

Author SHA1 Message Date
Uwe Hermann 7962b129c3 dreamsourcelab-dslogic: Drop an unneeded dslogic_ prefix. 2017-06-20 23:33:29 +02:00
Uwe Hermann 44b46d7036 dreamsourcelab-dslogic: Naming and other consistency fixes. 2017-06-20 23:33:29 +02:00
Joel Holdsworth f74485b608 dslogic: Recast samples into sigrok-compatible sample words 2017-06-20 00:18:16 +02:00
Joel Holdsworth 03a0002ed4 dslogic: Fixed buffer size calculation 2017-06-20 00:18:16 +02:00
Joel Holdsworth 6dfa2c39bf dslogic: Factored out enabled_channel_count, enabled_channel_mask 2017-06-20 00:18:16 +02:00
Joel Holdsworth 5e23d42f07 dslogic: Don't leak the trigger transfers array 2017-06-20 00:18:16 +02:00
Joel Holdsworth 5e7e327ac8 dslogic: Removed trigger_fired option 2017-06-20 00:18:16 +02:00
Joel Holdsworth 658caaf0d1 dslogic: Merged trigger_request into dslogic_acquisition_start 2017-06-20 00:18:16 +02:00
Joel Holdsworth 4bd770f56b dslogic: Moved all protocol handling to protocol.c
Previously the USB communication code was split between api.ci,
dslogic.c and protocol.c, with protocol internals split between
both. This patch puts all the protocol handling code into one
source file reducing the number of internal interfaces and making
the code more readable.
2017-06-20 00:18:16 +02:00
Joel Holdsworth b0acb693f9 fx2lafw: Moved all protocol handling to protocol.c
Previously the USB communication code was split between api.c
and protocol.c, with protocol internals split between both. This
patch puts all the protocol handling code into one source file
reducing the number of internal interfaces and making the code
more readable.
2017-06-20 00:18:16 +02:00
Joel Holdsworth 2f3cf5c21d dslogic: Fixed FPGA setting code 2017-06-20 00:18:16 +02:00
Joel Holdsworth 731fcfb456 dslogic: Declare memory depths 2017-06-20 00:18:16 +02:00
Joel Holdsworth 1ee7074616 dslogic: Fixed voltage selection 2017-06-20 00:18:16 +02:00
Joel Holdsworth 3c749da174 dslogic: Updated matching of device with loaded firmware 2017-06-20 00:18:16 +02:00
Joel Holdsworth 84f6d40a11 dslogic: Renamed D0-16 channels to 0-16 2017-06-20 00:18:16 +02:00
Joel Holdsworth 780c5e2466 dslogic: Added half and quater-mode flags 2017-06-20 00:18:16 +02:00
Joel Holdsworth 6c317a8d75 dslogic: Simplified supported_device table 2017-06-20 00:18:16 +02:00
Joel Holdsworth 3566348b92 dslogic: Refactored firmware selection into dslogic_fpga_firmware_upload 2017-06-20 00:18:16 +02:00
Joel Holdsworth adcb9951f8 fx2lafw/dslogic: Split DSLogic into a separate driver 2017-06-20 00:18:16 +02:00
Joel Holdsworth 69f7d9b4a9 usb.c: Moved in usb_match_manuf_product 2017-06-20 00:18:16 +02:00
Joel Holdsworth e40ee26b45 fx2lafw/dslogic: Updated dslogic_fpga_config structure to reflect v0.97 firmware 2017-06-20 00:18:16 +02:00
Joel Holdsworth cf398cc058 fx2lafw/dslogic: Imported FPGA config mode flags 2017-06-20 00:18:16 +02:00
Joel Holdsworth cd189a44f8 fx2lafw/dslogic: Use const buffer instead of memset 2017-06-20 00:18:16 +02:00
Joel Holdsworth c2f35321b3 fx2lafw/dslogic: Fixed dslogic_set_vth package structure 2017-06-20 00:18:16 +02:00
Joel Holdsworth ac0facf4e0 fx2lafw/dslogic: Added register address #defines 2017-06-20 00:18:16 +02:00
Joel Holdsworth 9d71f81532 fx2lafw/dslogic: Updated bRequest #defines to reflect libsigrok4DSL 2017-06-20 00:18:16 +02:00
Joel Holdsworth 9082b5ccf7 fx2lafw: Call dslogic_get_number_of_transfers into fx2lafw_get_number_of_transfers 2017-06-20 00:18:16 +02:00
Joel Holdsworth c33f32a922 fx2lafw/dslogic: Added DSLogic Plus and Basic variants 2017-06-20 00:18:16 +02:00
Uwe Hermann a7600dc5c7 Makefile.am: Install MIME info file in $(datadir)/mime/packages.
This fixes bug #983.
2017-06-15 18:46:14 +02:00
Uwe Hermann 33b20ce872 configure.ac: Bump package version to 0.6.0.
0.6.0 will be the next major release. Bump now, so that
there is no confusion of tarball 0.5.0 and 0.6.0-git snapshots.
2017-06-15 16:15:24 +02:00
Uwe Hermann 9b355aa12d Bump libtool version (not package version) to 4:0:0.
The last release (0.4.0) had the libtool version (current:revision:age)
set to 3:0:0. Since this release adds, removes, and changes interfaces,
the new version is 4:0:0.

http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info

This changes the library filename (e.g. on Linux) from libsigrok.so.3.0.0
to libsigrok.so.4.0.0, the SONAME (+symlink) becomes libsigrok.so.4.
2017-06-12 03:03:21 +02:00
Uwe Hermann 95723b1e17 NEWS: Add list of user-visible changes so far. 2017-06-12 03:01:06 +02:00
Uwe Hermann f200d59ee2 Various Doxygen fixes. 2017-06-12 02:44:28 +02:00
Uwe Hermann 567d1feae8 Add a MIME info file (and icons) for sigrok session files.
File template by Stefan Brüns, thanks!

This fixes bug #857.

(the XML file is moved from PulseView to libsigrok since this is not
PulseView-specific)

Add a 48x48 PNG and a scalable SVG for the MIME type as well.

Install the XML file and in the icons in the respective standard paths.
2017-06-11 23:28:52 +02:00
Uwe Hermann 6b21d9a77e Rename sigrok-logo-notext.png to libsigrok_112x112.png.
This is more specific and prevents any potential issues e.g. when
multiple distro packages might ship with a generic file like
sigrok-logo-notext.png that's supposed to be installed in the same place.
2017-06-11 23:03:09 +02:00
Uwe Hermann 6324805018 ruby bindings: Fix a compiler warning.
bindings/ruby/classes_wrap.cpp:10481:1: warning: control may reach end
  of non-void function [-Wreturn-type]
2017-06-09 23:54:41 +02:00
Uwe Hermann 35334baa90 Fix various -Wundefined-var-template clang warnings.
This fixes bug #915.
2017-06-09 23:50:44 +02:00
Gerhard Sittig e3e1f20c7f C++ binding: Fixup memory leak in input module receive() calls
The Input::send() method allocated glib strings and copied input data,
but only released the glib string container and leaked the actual string
content. This led to leaks in the size of the verbatim input file, which
is especially wasteful for uncompressed textual representations.

This fixes bug #976.
2017-06-09 23:21:03 +02:00
Gerhard Sittig 2355d22919 input/csv: Eliminate remaining memory leaks in error paths
When the processing of columns of text lines detected errors, the loop
was aborted and the routine was left, but allocated resources were not
freed. Fix the remaining memory leaks in the error code paths.
2017-06-09 23:21:03 +02:00
Gerhard Sittig f027208ea7 input/csv: Fixup datafeed chunk size calculation
The constant at the top of the source file is the number of samples in a
datafeed submission chunk. The previous implementation erroneously made
it the size in bytes. There is no need to round down the buffer size
according to the unit size.
2017-06-09 23:21:03 +02:00
Gerhard Sittig d05b1a8606 output/csv: Nit, remove an unused loop iteration variable
The i variable is not used in the bottom loop in gen_header(). Remove it
to not obfuscate the purpose of the iteration.
2017-06-09 23:20:36 +02:00
Gerhard Sittig cd59e6eca1 input/csv: Send larger datafeed chunks, to speedup import
The previous implementation sent one sigrok session datafeed packet per
processed CSV line. This is rather inefficient for the CSV input module,
and triggers a dramatic performance loss in the srzip output format.

Communicate up to 128K samples within one datafeed packet. This fixes
bug #695.

Factor out repeated calculation of the unit size which is derived from
the channel count. Fix a minor memory leak in an error path while we are
here. (Other memory leaks in rare error paths remain with this commit.)

Suggested-By: Elias Oenal <sigrok@eliasoenal.com>
2017-06-08 23:26:47 +02:00
Gerhard Sittig de788af410 input/csv: Update developer comment (fix for last EOL marker) 2017-06-06 23:28:15 +02:00
Gerhard Sittig 7f4c3a6224 input/csv: Accept absence of last end-of-line termination sequence
On the Windows platform it appears to be popular to _not_ terminate the
very last line in a text file. Which results in an unmet constraint in
the CSV input module and an internal exception in PulseView which aborts
program execution.

Cope with the absence of the text line termination sequence at the very
end of the input stream. Keep all other checks in place, such that only
completely received text lines get processed.

This fixes bug #635.
2017-06-06 23:28:09 +02:00
Gerhard Sittig 4439363aa0 input/csv: Skip leading UTF-8 BOM in the input stream
This fixes bug #756.
2017-06-06 23:28:05 +02:00
Gerhard Sittig ccff468b5e input/csv: Add developer comment with TODO items
"Document" the current state of the implementation in the CSV input
module's source code. Discuss how text handling is non-trivial, which
approaches are available and how they have drawbacks.

Mention the lack of support for the import of analog data as well.
2017-06-06 23:28:05 +02:00
Gerhard Sittig 241c386a4f input/csv: Correctly skip over last processed end-of-line sequence
The CSV input module supports variable length end-of-line encodings
(either CRLF, or CR, or LF). When a bunch of accumulated text lines got
processed, do skip the corresponding number of characters after the end
of the last processed line.

This fixes one of the issues discussed in bug #635.
2017-06-06 23:28:00 +02:00
Gerhard Sittig 4555d3bda0 input/csv: Fix a false negative after successful import
The input module runs receive() and end() invocations which end up
calling process_buffer(). It's perfectly legal to call the process
routine with an empty accumulation buffer, especially when the process
routine was called from end().

This fixes a condition where PulseView raised a fatal error at the end
of a completed successful import.

Reported-By: Sergey Alirzaev <zl29ah@gmail.com>
2017-06-06 23:27:52 +02:00
Gerhard Sittig f9b7486154 input/csv: Re-order processing steps (column mode vs text line split)
Move an independent test for single/multi column operation out of a code
path that checked for and then processed text lines. This commit does
not change behaviour, but prepares a subsequent commit.
2017-06-06 19:00:14 +02:00
Gerhard Sittig 492dfa9025 input/csv: Concentrate text line encoding in a single spot
Factor out a magic string literal which held a delimiter set yet could
be mistaken for an (assumed) fixed termination string. Concentrate the
determination of the end-of-line text encoding as well as the resulting
set of possible deliminters in one nearby location. The symbolic name
for the delimiter set eliminates the doubt on its purpose.
2017-06-06 19:00:14 +02:00