Elo touchpad 10 bytes emulator v3
PATCH 1/1 Elo touchpad 10 bytes emulator v3
From: Ricardo Ribalda Delgado <[email protected]>
New char device emulating an Elo serial touchpad.
v2: -Emulate id packages (linux recognizes the hw)
-Limit output to 96-4000 (thanks to Dmitry Zhurikhin)
v3: -Output buffer (thanks to Juan Quintela)
-Code Style
--- Makefile.objs | 2 +- hw/elo.c | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/elo.h | 2 + qemu-char.c | 3 + qemu-options.hx | 5 +- 5 files changed, 199 insertions(+), 2 deletions(-) create mode 100644 hw/elo.c create mode 100644 hw/elo.h
Makefile.objs +1 -1
@@ -75,7 +75,7 @@ common-obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o u common-obj-y += bt-hci-csr.o common-obj-y += buffered_file.o migration.o migration-tcp.o qemu-sockets.o common-obj-y += qemu-char.o savevm.o #aio.o -common-obj-y += msmouse.o ps2.o +common-obj-y += msmouse.o ps2.o elo.o common-obj-y += qdev.o qdev-properties.o common-obj-y += qemu-config.o block-migration.o
hw/elo.c new file +189 -0
189 lines not on this page · raw message
hw/elo.h new file +2 -0
@@ -0,0 +1,2 @@ +/* elo.c */ +CharDriverState *qemu_chr_open_elo (QemuOpts *opts);
qemu-char.c +3 -0
@@ -32,6 +32,7 @@#include "hw/usb.h" #include "hw/baum.h" #include "hw/msmouse.h" +#include "hw/elo.h" #include "qemu-objects.h" #include <unistd.h>
@@ -2278,6 +2279,7 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)if (strcmp (filename,"null" ) ==0 ||strcmp (filename,"pty" ) ==0 ||strcmp (filename,"msmouse" ) ==0 || +strcmp (filename,"elo" ) ==0 ||strcmp (filename,"braille" ) ==0 ||strcmp (filename,"stdio" ) ==0 ) {qemu_opt_set (opts,"backend" , filename);
@@ -2391,6 +2393,7 @@ static const struct { { .name = "socket", .open = qemu_chr_open_socket }, { .name = "udp", .open = qemu_chr_open_udp }, { .name = "msmouse", .open = qemu_chr_open_msmouse }, + { .name = "elo", .open = qemu_chr_open_elo }, { .name = "vc", .open = text_console_init }, #ifdef _WIN32 { .name = "file", .open = qemu_chr_open_win_file_out },
qemu-options.hx +4 -1
@@ -1183,7 +1183,7 @@ DEF("chardev", HAS_ARG, QEMU_OPTION_chardev, "-chardev socket,id=id,path=path[,server][,nowait][,telnet] (unix)\n" "-chardev udp,id=id[,host=host],port=port[,localaddr=localaddr]\n" " [,localport=localport][,ipv4][,ipv6]\n" - "-chardev msmouse,id=id\n" + "-chardev elo,id=id\n" "-chardev vc,id=id[[,width=width][,height=height]][[,cols=cols][,rows=rows]]\n" "-chardev file,id=id,path=path\n" "-chardev pipe,id=id,path=path\n"
@@ -1650,6 +1650,9 @@ or fake device. @item msmouse Three button serial mouse. Configure the guest to use Microsoft protocol. + +@item elo +Elo Touchpad 10bytes emulator. @end table ETEXI
Signature · 1 line
1.7.0.3