[sigrok-devel] [PATCH 4/5] sr: session: Add session source

2012-07-06 Thread Lars-Peter Clausen
Currently the only method of running a session is to call sr_session_run(). sr_session_run() will block internally, which means it wont return until the session has finished sampling. This is in particular annoying for GUI applications, because the whole GUI will be come inaccessible during this ti

[sigrok-devel] [PATCH 3/5] sr: session: Moves sources to session struct

2012-07-06 Thread Lars-Peter Clausen
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 --g

[sigrok-devel] [PATCH 5/5] gtk: Add support for asynchronous sampling

2012-07-06 Thread Lars-Peter Clausen
Add support for asynchronous sampling to the application by attaching the session to the applications mainloop. This keeps the gui accessible while sampling is in progress and for example allows to abort a transfer. The "sample" button is changed into a toggle button and will be kept active during

[sigrok-devel] [PATCH 2/5] sr: demodevice: Make read channel non-blocking

2012-07-06 Thread Lars-Peter Clausen
Both pipe channels are currently configured as blocking. We read from the pipe in receive_data. Since the channel is configured as blocking we'll block in receive_data until all data has been received. receive_data will be called from the mainloop, so as consequence the mainloop will be blocked unt

[sigrok-devel] [PATCH 1/5] sr: session: Realloc correct array for pollfds in _sr_session_source_remove

2012-07-06 Thread Lars-Peter Clausen
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/session.c index 15

Re: [sigrok-devel] Protocol decoder and dumps for 1-Wire

2012-07-06 Thread Iztok Jeras
Hi, I found one example device not supporting the 'network layer' is DS1821, so it makes sense to split the PD into the link and network layer. I will duplicate the related overdrive code, and use the overdrive decoder option to disable overdrive detection by the protocol. This way all devices sho