Hi Joel,
On 03/13/2017 10:56 PM, Joel Holdsworth wrote:
> Dear Paul, Alexndra, Dan and Adrian,
>
> I recently discovered your work on the scopy software oscilloscope, and
> its usage of code derived from PulseView. As the founding author of the
> PulseView project, I wanted to reach out to you
On 06/10/2016 11:40 AM, Neil Armstrong wrote:
> Hi Lars,
> Thanks for your quick reply
>
> On 06/09/2016 06:13 PM, Lars-Peter Clausen wrote:
>> Hi,
>>
>> Thanks for the update. I also did some work on the what Hubert released this
>> year.
>>
>>
On 06/09/2016 05:27 PM, Neil Armstrong wrote:
> Hi Sigrok community,
>
> This is a follow-up from the first draft of a Generic IIO driver for Sigrok
> posted at [1].
>
> Since, I made a backport for the 0.3.0 release and PPA packages to run it on
> current Ubuntu distributions.
>
> The 0.4.0 v
Hi,
Thanks for the update. I also did some work on the what Hubert released this
year.
Part of this I created a generic software event based session source. It's
cross platform and even works on Windows. You can find it here:
https://github.com/analogdevicesinc/libsigrok/tree/sr_event
The other
On 05/30/2016 10:00 PM, david.dou...@sdfa3.org wrote:
> From: David Douard
>
> This patch in libsigrok removes the drivers.c completely, so new-driver
> should not try to modify it any more. It has been replaced by a register
> mechanism to add driver pointer in a new special section.
> So drv-ap
Now that the signature of std_init() matches that of the driver init()
callback we can remove all wrapper functions around std_init() and use it
directly as the init() callback.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/agilent-dmm/api.c | 7 +--
src/hardware/appa
than having to swap them around. It also allow to eventually use the
std_init() function directly as the init() callback.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/agilent-dmm/api.c | 2 +-
src/hardware/appa-55ii/api.c | 2 +-
src/hardware/arachnid-labs-re
init() callback signature which will allow to directly use it as such.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/agilent-dmm/api.c | 2 +-
src/hardware/appa-55ii/api.c | 2 +-
src/hardware/arachnid-labs-re-load-pro/api.c | 2 +-
src/hardware/asix-sigma/api.c
)
... when != libusb_free_device_list(devlist, ...)
*return ...;
//
Signed-off-by: Lars-Peter Clausen
---
src/hardware/testo/api.c | 24 +---
1 file changed, 5 insertions(+), 19 deletions(-)
diff --git a/src/hardware/testo/api.c b/src/hardware/testo/api.c
index d22edc2..d83
)
... when != libusb_free_device_list(devlist, ...)
*return ...;
//
Signed-off-by: Lars-Peter Clausen
---
src/hardware/lascar-el-usb/protocol.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/hardware/lascar-el-usb/protocol.c
b/src/hardware/lascar-el-usb/protocol.c
index e4fae68..f7b
)
... when != libusb_free_device_list(devlist, ...)
*return ...;
//
Signed-off-by: Lars-Peter Clausen
---
src/hardware/victor-dmm/api.c | 23 ---
1 file changed, 4 insertions(+), 19 deletions(-)
diff --git a/src/hardware/victor-dmm/api.c b/src/hardware/victor-dmm/api.c
index 8f20f59..96f
)
... when != libusb_free_device_list(devlist, ...)
*return ...;
//
Signed-off-by: Lars-Peter Clausen
---
src/hardware/zeroplus-logic-cube/api.c | 36 +-
1 file changed, 5 insertions(+), 31 deletions(-)
diff --git a/src/hardware/zeroplus-logic-cube/api.c
b/s
these checks are not necessary since they never evaluate to
true and can be dropped. If they should ever become necessary they should
be done in the sigrok core so all drivers and all callbacks are equally
handled.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/ikalogic-scanalogic2/api.c | 13
f the drivers which set SR_CONF_SET for SR_CONF_CONTINUOUS handle it
in their config_set() callback and return an error if an application tried
to perform a config_set() operation for SR_CONF_CONTINUOUS.
Simply remove the SR_CONF_SET flag from all SR_CONF_CONTINUOUS options.
Signed-off-by: Lars-
the additional data. This will cause memory leaks when sr_dev_clear()
is called for this driver.
To fix this provide a dev_clear() implementation that frees the additional
data.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/deree-de5000/api.c | 9 +++--
1 file changed, 7 insertions
callback for all existing drivers, which
reduces the amount of boiler-plate code quite a bit.
All drivers are updated to use the new helper function.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/agilent-dmm/api.c | 7 +--
src/hardware/appa-55ii/api.c | 7
Every single hardware driver has the very same implementation of the
dev_list() callback. Put this into a helper function in the standard helper
library and use it throughout the drivers. This reduces boiler-plate code
by quite a bit.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/agilent
last two patches in this series remove additional boiler-plate code by
removing all dev_clear() implementation that implement the default behavior
and by introducing a new standard helper function for retrieving the
drivers device list.
- Lars
Lars-Peter Clausen (9):
ftdi-la: Properly cleanup in
The beaglelogic has an open-coded version of std_dev_clear(), replace it
with std_dev_clear().
Signed-off-by: Lars-Peter Clausen
---
src/hardware/beaglelogic/api.c | 20 +---
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/src/hardware/beaglelogic/api.c b/src
.
To fix this let the dev_clear() free the additional data.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/scpi-pps/api.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/hardware/scpi-pps/api.c b/src/hardware/scpi-pps/api.c
index a29744e..dbe8dcb 100644
--- a
If a driver does not implement a dev_clear() callback the core will
automatically call std_dev_clear(di, NULL). Remove all driver dev_clear()
implementations that are identical to default. This reduces the amount of
boiler-plate code.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/arachnid
additional data. This will cause memory leaks when sr_dev_clear() is called
for this driver.
To fix this provide a dev_clear() implementation that frees the additional
data.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/demo/demo.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions
found.
Add the missing g_error_free() invocations to fix the issue.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/baylibre-acme/protocol.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/hardware/baylibre-acme/protocol.c
b/src/hardware/baylibre-acme/protocol.c
index 0bef0b2..fdc16c8
Make sure to free the FTDI device list and the FTDI context in scan_all()
otherwise memory leaks can be observed. Also make sure to free the FTDI
context in scan_device() on the error path.
Signed-off-by: Lars-Peter Clausen
---
src/hardware/ftdi-la/api.c | 4
1 file changed, 4 insertions
session
file.
Instead use -1, which is not a valid channel index, as
the terminating entry value.
Signed-off-by: Lars-Peter Clausen
---
src/output/srzip.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/output/srzip.c b/src/output/srzip.c
index 8d01e5f..bfc42b2 100644
.
Signed-off-by: Lars-Peter Clausen
---
src/output/srzip.c | 39 +--
1 file changed, 25 insertions(+), 14 deletions(-)
diff --git a/src/output/srzip.c b/src/output/srzip.c
index bfc42b2..b554558 100644
--- a/src/output/srzip.c
+++ b/src/output/srzip.c
For session sources without a file descriptor to poll a negative number
should be passed for the fd parameter. The hung-chang-dso-2100 driver
currently passes 0 instead, which is the stdin stream. Fix it the issue by
passing -1 for the fd parameter.
Signed-off-by: Lars-Peter Clausen
---
src
On 01/04/2016 10:17 AM, Marc Titinger wrote:
> On 03/01/2016 12:44, Lars-Peter Clausen wrote:
>> Hi,
>>
>> On 12/31/2015 02:53 PM, Marc Titinger wrote:
>>>
>>> On behalf of Hubert Chaumette (author)
>>>
>>>
>>> Clarification on usa
Hi,
On 12/31/2015 02:53 PM, Marc Titinger wrote:
>
> On behalf of Hubert Chaumette (author)
>
>
> Clarification on usage:
>
> 'conn' was used for the IP in previous iterations, but the current code
> uses libiio's IIOD_REMOTE variable for that. Instead, conn is now used
> to choose a device, o
Remove the session source once we are done loading the file, otherwise we'll
spin forever in sr_session_run.
Reported-by: Joel Holdsworth
Signed-off-by: Lars-Peter Clausen
---
libsigrok/session_driver.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/libs
blocking and non-blocking
sampling mode.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/libsigrok.h | 13 +---
libsigrok/proto.h |1 +
libsigrok/session.c | 203 -
3 files changed, 169 insertions(+), 48 deletions(-)
diff --git a
The sources really belong to the session, so move them into the session struct.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/libsigrok.h | 11 +++
libsigrok/session.c | 86 +++--
2 files changed, 51 insertions(+), 46 deletions(-)
diff
ept active
during sampling. If the button is deactivated will sampling is still in
progress it will be aborted.
Signed-off-by: Lars-Peter Clausen
---
sigrok-gtk/main.c |3 +++
sigrok-gtk/sigrok-gtk.h |3 +++
sigrok-gtk/toolbar.c| 26 +++---
3 files changed, 25
Lars-Peter Clausen
---
libsigrok/hardware/demo/demo.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/libsigrok/hardware/demo/demo.c b/libsigrok/hardware/demo/demo.c
index 0cd23e3..91f105f 100644
--- a/libsigrok/hardware/demo/demo.c
+++ b/libsigrok/hardware/demo/demo.c
@@ -440,6 +
Commit 7149ad7c ("sr: session: Keep a global pollfd array") contained a small
copy paste error. This patch fixes it.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/session.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libsigrok/session.c b/libsigrok/sessi
Free the USB transfers in the reverse order of which they were submitted. This
will avoid that while transfer 0 is canceld transfer 1 is started by the host
controller, and so on.
Reported-by: Peter Stuge
Signed-off-by: Lars-Peter Clausen
---
Sorry, sent an old version of the patch as v1
Free the USB transfers in the reverse order of which they were submitted. This
will avoid that while transfer 0 is canceld transfer 1 is started by the host
controller, and so on.
Reported-by: Peter Stuge
Signed-off-by: Lars-Peter Clausen
---
libsigrok/hardware/fx2lafw/fx2lafw.c |4
Use sr_session_stop() instead of the deprecated sr_session_halt().
Signed-off-by: Lars-Peter Clausen
---
sigrok-qt/mainwindow.cpp |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sigrok-qt/mainwindow.cpp b/sigrok-qt/mainwindow.cpp
index f0ca848..810228f 100644
--- a
Use sr_session_stop() instead of the deprecated sr_session_halt().
Signed-off-by: Lars-Peter Clausen
---
sigrok-cli/sigrok-cli.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sigrok-cli/sigrok-cli.c b/sigrok-cli/sigrok-cli.c
index bce88e4..3a460bf 100644
--- a
sr_session_stop() and deprecate its
usage.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/session.c | 15 ---
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/libsigrok/session.c b/libsigrok/session.c
index 4ad2dff..a1bf6a7 100644
--- a/libsigrok/session.c
+++ b/libsigrok
Use sr_session_stop() instead of the deprecated sr_session_halt().
Signed-off-by: Lars-Peter Clausen
---
sigrok-gtk/main.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sigrok-gtk/main.c b/sigrok-gtk/main.c
index 5406b04..9546e1a 100644
--- a/sigrok-gtk/main.c
+++ b
calling sr_session_save() after calling sr_session_stop() - which is for example
done by sigrok-cli - will cause a segfault. This patch resolves the issue.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/session.c |2 --
1 file changed, 2 deletions(-)
diff --git a/libsigrok/session.c b
A device is opened when it is added to a session, in the same fashion it should
be closed again when it is removed from a session.
Also remove all still attached devices from a session when the session is
destroyed.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/session.c | 11
On 07/04/2012 01:21 AM, Bert Vermeulen wrote:
> On 07/01/2012 02:37 PM, Lars-Peter Clausen wrote:
>> On 06/30/2012 08:54 PM, Lars-Peter Clausen wrote:
>>> [...]
>>>
>>> - new_sources = g_try_realloc(sources, sizeof(struct source) *
>>> (num_sourc
Only one limit should be active at a time. Make sure that the sample limit is
disabled when a time limit is set and vice versa.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/hardware/demo/demo.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/libsigrok/hardware/demo/demo.c b
d-off-by: Lars-Peter Clausen
---
libsigrok/hardware/fx2lafw/fx2lafw.c |4
1 file changed, 4 insertions(+)
diff --git a/libsigrok/hardware/fx2lafw/fx2lafw.c
b/libsigrok/hardware/fx2lafw/fx2lafw.c
index 2886613..11e41ff 100644
--- a/libsigrok/hardware/fx2lafw/fx2lafw.c
+++ b/libsigrok/har
Call abort_acquisition if starting sampling fails in acquisition_start, this
will ensure that all already allocated resources are being freed again.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/hardware/fx2lafw/fx2lafw.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
freed almost immediately and the
additional delay will disappear.
Also make sure, that if we know, that we just have received the last transfer to
not resubmit this transfer again.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/hardware/fx2lafw/fx2lafw.c | 28
On 06/30/2012 08:54 PM, Lars-Peter Clausen wrote:
>[...]
>
> - new_sources = g_try_realloc(sources, sizeof(struct source) *
> (num_sources - 1));
> + new_pollfds = g_try_realloc(sources, sizeof(GPollFD) * num_sources);
Ok, here is obviously a copy&paste error.
>
constructing and
subsequent freeing of the pollfd array in sr_session_run(), on the other hand it
will allow us to implement support for non-fd based pollfds.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/session.c | 76 +++
1 file changed, 40
A raw file descriptor to poll on is not always available, this patch adds
support for adding a source for a GIOChannel or GPollFD.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/session.c | 164 +-
libsigrok/sigrok-proto.h |6 ++
2 files
no longer required. The patch moves the GIOChannels used by the
demo device to the demo device context and uses sr_session_source_add_channel
to register a source for the channels instead of using the raw pipe fds.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/hardware/demo/demo.c | 29
one element down in
the array. Only after that has been done the array is re-allocated.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/session.c | 43 +++
1 file changed, 19 insertions(+), 24 deletions(-)
diff --git a/libsigrok/session.c b/libsigrok
If one device is failing it should not affect the transfers of other devices.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/hardware/fx2lafw/fx2lafw.c |9 -
libsigrok/hardware/fx2lafw/fx2lafw.h |1 +
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/libsigrok
e the CPU load of
sigrok-cli when sampling at 24Mhz goes down from ~25% to 3-4%.
Signed-off-by: Lars-Peter Clausen
---
Changes since v1:
* Minor code style changes
---
libsigrok/hardware/fx2lafw/fx2lafw.c | 68 +++---
1 file changed, 47 insertions(+
legible as it is right now, but this is just bikeshedding
anyway, so I'll change it.
>
> I'd like to see these things fixed, but otherwise, great stuff. This
> patch was badly needed.
>
Are you OK with patch 1-4? If yes I'd just resend patch 5 and not the whole
ser
: Lars-Peter Clausen
---
libsigrok/hardware/fx2lafw/fx2lafw.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/libsigrok/hardware/fx2lafw/fx2lafw.c
b/libsigrok/hardware/fx2lafw/fx2lafw.c
index 0cfe436..b56f810 100644
--- a/libsigrok/hardware/fx2lafw/fx2lafw.c
The header and packet struct are only used in the scope of this function and
they are freed at the end of it. Also these structs are rather small, so they
can safely be allocate on the stack. By doing so memory leaks on the error paths
are avoided.
Signed-off-by: Lars-Peter Clausen
When freeing a transfer we have to free the transfer buffer as well. We also
have to keep track of the number of allocated transfers and if the freed
transfer was the last one stop acquisition. This patch introduces a helper
function which takes care of all of this.
Signed-off-by: Lars-Peter
e the CPU load of
sigrok-cli when sampling at 24Mhz goes down from ~25% to 3-4%.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/hardware/fx2lafw/fx2lafw.c | 67 +++---
1 file changed, 46 insertions(+), 21 deletions(-)
diff --git a/libsigrok/hardware/fx2lafw/fx2lafw
allocated if
the size of the old one is not 4096 bytes.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/hardware/fx2lafw/fx2lafw.c | 47 +-
1 file changed, 29 insertions(+), 18 deletions(-)
diff --git a/libsigrok/hardware/fx2lafw/fx2lafw.c
b/libsigrok/hardware
Probe assignments are separated by colon and not by comma.
Signed-off-by: Lars-Peter Clausen
---
sigrok-cli/doc/sigrok-cli.1 |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sigrok-cli/doc/sigrok-cli.1 b/sigrok-cli/doc/sigrok-cli.1
index 48f02af..cc13722 100644
--- a
f() of the trigger buffer.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/hardware/fx2lafw/fx2lafw.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libsigrok/hardware/fx2lafw/fx2lafw.c
b/libsigrok/hardware/fx2lafw/fx2lafw.c
index afdd950..76c5019 100644
--- a/libsigro
next stage. In
order for this to work we also make sure that the trigger stage is only reset
if the current sample does not match.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/hardware/fx2lafw/fx2lafw.c | 19 ---
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a
leaks are on the
error paths in that function.
Signed-off-by: Lars-Peter Clausen
---
libsigrok/hardware/fx2lafw/fx2lafw.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libsigrok/hardware/fx2lafw/fx2lafw.c
b/libsigrok/hardware/fx2lafw/fx2lafw.c
index 5d8b49b..afdd950
65 matches
Mail list logo