Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwWyx-0006FX-Qx for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:39:31 -0400 Received: from [140.186.70.92] (port=58591 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwWyv-0006ES-GY for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:39:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwWyt-0005zV-1X for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:39:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24364) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwWys-0005zK-El for qemu-devel@nongnu.org; Tue, 30 Mar 2010 04:39:26 -0400 From: Juan Quintela In-Reply-To: <1269888491-845-1-git-send-email-ricardo.ribalda@gmail.com> (Ricardo Ribalda Delgado's message of "Mon, 29 Mar 2010 20:48:11 +0200") References: <1269888491-845-1-git-send-email-ricardo.ribalda@gmail.com> Date: Tue, 30 Mar 2010 10:39:00 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH] Elo touchpad 10 bytes emulator v2 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ricardo Ribalda Delgado Cc: qemu-devel@nongnu.org, zhur@ispras.ru, paul@codesourcery.com Ricardo Ribalda Delgado wrote: > New char device emulating an Elo serial touchpad. > > -Emulate id and touch packets > -Absolute Output limited to 96-4000 It misses a SOB line. > diff --git a/hw/elo.c b/hw/elo.c > new file mode 100644 > index 0000000..359333d > --- /dev/null > +++ b/hw/elo.c > +#include > +#include "../qemu-common.h" > +#include "../qemu-char.h" > +#include "../console.h" You can remove the "../" from those, Makefile sets correct include paths for this to work. > + /*Move event*/ > + if (is_down&&buttons_state){ > + bytes[2]=0x2; Can we use some constant from that bytes[2] values? 0x1, 0x2 and 0x4 don't look specially descriptive. > +static void elo_chr_close (struct CharDriverState *chr) > +{ > + qemu_free (chr); > +} Use coherent indentation. You are ussing here function (args) and in the rest of the file function(args) without space. > diff --git a/hw/serial.c b/hw/serial.c > index f3ec36a..39c708f 100644 > --- a/hw/serial.c > +++ b/hw/serial.c > @@ -92,7 +92,7 @@ > #define UART_FCR_RFR 0x02 /* RCVR Fifo Reset */ > #define UART_FCR_FE 0x01 /* FIFO Enable */ > > -#define UART_FIFO_LENGTH 16 /* 16550A Fifo Length */ > +#define UART_FIFO_LENGTH 32 /* 16550A Fifo Length */ > > #define XMIT_FIFO 0 > #define RECV_FIFO 1 Why does the lenght of the FIFO changes here? I think this change in independent of the rest of the patch (no knowledge about the 16550A to know if it should be 16 or 32). Later, Juan.