Commit 2e4d9fb1 authored by aurel32's avatar aurel32

Braille device support

(Samuel Thibault)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4173 c046a42c-6fe2-441c-8c8c-71466251a162
parent 88cb0a02
......@@ -57,6 +57,11 @@ OBJS+=scsi-generic.o
OBJS+=usb.o usb-hub.o usb-linux.o usb-hid.o usb-msd.o usb-wacom.o usb-serial.o
OBJS+=sd.o ssi-sd.o
ifdef CONFIG_BRLAPI
OBJS+= baum.o
LIBS+=-lbrlapi
endif
ifdef CONFIG_WIN32
OBJS+=tap-win32.o
endif
......
......@@ -658,7 +658,7 @@ main.o: CFLAGS+=-p
endif
$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS)
endif # !CONFIG_USER_ONLY
......
......@@ -286,6 +286,8 @@ for opt do
;;
--disable-kqemu) kqemu="no"
;;
--disable-brlapi) brlapi="no"
;;
--enable-profiler) profiler="yes"
;;
--enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no"
......@@ -416,6 +418,7 @@ echo " --enable-alsa enable ALSA audio driver"
echo " --enable-esd enable EsoundD audio driver"
echo " --enable-fmod enable FMOD audio driver"
echo " --enable-dsound enable DirectSound audio driver"
echo " --disable-brlapi disable BrlAPI"
echo " --disable-vnc-tls disable TLS encryption for VNC server"
echo " --disable-curses disable curses output"
echo " --enable-system enable all system emulation targets"
......@@ -673,6 +676,20 @@ EOF
fi
fi
##########################################
# BrlAPI probe
if test -z "$brlapi" ; then
brlapi=no
cat > $TMPC << EOF
#include <brlapi.h>
int main( void ) { return brlapi__openConnection (NULL, NULL, NULL); }
EOF
if $cc -o $TMPE ${OS_CFLAGS} $TMPC -lbrlapi 2> /tmp/qemu-$$-brlapi.log ; then
brlapi=yes
fi # brlapi compile test
fi # -z $brlapi
##########################################
# curses probe
......@@ -770,6 +787,7 @@ if test -n "$sparc_cpu"; then
echo "Target Sparc Arch $sparc_cpu"
fi
echo "kqemu support $kqemu"
echo "brlapi support $brlapi"
echo "Documentation $build_docs"
[ ! -z "$uname_release" ] && \
echo "uname -r $uname_release"
......@@ -1001,6 +1019,11 @@ if test "$curses" = "yes" ; then
echo "CONFIG_CURSES=yes" >> $config_mak
echo "CURSES_LIBS=-lcurses" >> $config_mak
fi
if test "$brlapi" = "yes" ; then
echo "CONFIG_BRLAPI=yes" >> $config_mak
echo "#define CONFIG_BRLAPI 1" >> $config_h
echo "BRLAPI_LIBS=-lbrlapi" >> $config_mak
fi
# XXX: suppress that
if [ "$bsd" = "yes" ] ; then
......
This diff is collapsed.
/*
* QEMU Baum
*
* Copyright (c) 2008 Samuel Thibault
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
/* usb device */
USBDevice *usb_baum_init(void);
/* char device */
CharDriverState *chr_baum_init(void);
......@@ -546,6 +546,10 @@ Pass through the host device identified by vendor_id:product_id (Linux only).
Serial converter to host character device @var{dev}, see @code{-serial} for the
available devices.
@item braille
Braille device. This will use BrlAPI to display the braille output on a real
or fake device.
@end table
@end table
......@@ -859,6 +863,10 @@ listening on port 4444 would be:
@item -serial mon:telnet::4444,server,nowait
@end table
@item braille
Braille device. This will use BrlAPI to display the braille output on a real
or fake device.
@end table
@item -parallel @var{dev}
......@@ -1614,6 +1622,9 @@ usb_add serial:productid=FA00:tcp:192.168.0.2:4444
@end example
will connect to tcp port 4444 of ip 192.168.0.2, and plug that to the virtual
serial converter, faking a Matrix Orbital LCD Display (USB ID 0403:FA00).
@item braille
Braille device. This will use BrlAPI to display the braille output on a real
or fake device.
@end table
@node host_usb_devices
......
......@@ -28,6 +28,7 @@
#include "hw/pc.h"
#include "hw/audiodev.h"
#include "hw/isa.h"
#include "hw/baum.h"
#include "net.h"
#include "console.h"
#include "sysemu.h"
......@@ -3473,7 +3474,12 @@ CharDriverState *qemu_chr_open(const char *filename)
} else
if (strstart(filename, "file:", &p)) {
return qemu_chr_open_win_file_out(p);
}
} else
#endif
#ifdef CONFIG_BRLAPI
if (!strcmp(filename, "braille")) {
return chr_baum_init();
} else
#endif
{
return NULL;
......@@ -5281,6 +5287,10 @@ static int usb_device_add(const char *devname)
dev = usb_wacom_init();
} else if (strstart(devname, "serial:", &p)) {
dev = usb_serial_init(p);
#ifdef CONFIG_BRLAPI
} else if (!strcmp(devname, "braille")) {
dev = usb_baum_init();
#endif
} else {
return -1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment