qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] Elo touchpad 10 bytes emulator v2


From: Juan Quintela
Subject: [Qemu-devel] Re: [PATCH] Elo touchpad 10 bytes emulator v2
Date: Tue, 30 Mar 2010 10:39:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Ricardo Ribalda Delgado <address@hidden> 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 <stdlib.h>
> +#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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]