Patch 2 needed a small fix. fixed.
Alex
On 10/15/2012 01:28 AM, Alex G. wrote:
> The weekend is over, and so is my little endeavour to make my 22-812
> work with sigrok.
>
> It works. Well, everything except LOGIC functionality. This one's a
> doozie, as the DMM outputs LO if the voltage is < 1V, HI if the voltage
> is > 2V, and the actual voltage if the voltage is between 1 and 2 volts.
>
> The rest of the stuff works, and that's what really matters; unless you
> guys have specific objections on how the coding was done.
>
> Alex
>
>From 599df33412f7684250f57fa9a05548549aa2fb13 Mon Sep 17 00:00:00 2001
From: Alexandru Gagniuc <[email protected]>
Date: Mon, 15 Oct 2012 01:12:53 -0500
Subject: [PATCH 2/4] serial: (Trivial) add support for 4800 baud
Signed-off-by: Alexandru Gagniuc <[email protected]>
---
libsigrok/hardware/common/serial.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libsigrok/hardware/common/serial.c b/libsigrok/hardware/common/serial.c
index ad88958..7a89af6 100644
--- a/libsigrok/hardware/common/serial.c
+++ b/libsigrok/hardware/common/serial.c
@@ -218,6 +218,9 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
case 9600:
dcb.BaudRate = CBR_9600;
break;
+ case 4800:
+ dcb.BaudRate = CBR_4800;
+ break;
default:
/* TODO: Error handling. */
break;
@@ -238,6 +241,9 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
return SR_ERR;
switch (baudrate) {
+ case 4800:
+ baud = B4800;
+ break;
case 9600:
baud = B9600;
break;
--
1.7.11.4
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel