Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f84e6db54 |
No files matched your search
@@ -34,3 +34,6 @@
|
|||||||
1.2.3
|
1.2.3
|
||||||
* Add support for the newer G15 keyboards which have amber backlights and
|
* Add support for the newer G15 keyboards which have amber backlights and
|
||||||
six 'G' keys.
|
six 'G' keys.
|
||||||
|
1.2.4
|
||||||
|
* Turns out that the newer G15's have a different (5 byte) keyboard protocol.
|
||||||
|
* Optimise dumpPixmapIntoLCDFormat routine - Thanks to Adam Nielsen
|
||||||
@@ -1 +1,8 @@
|
|||||||
This is a library to handle the LCD and extra keys on the Logitech G15 Gaming Keyboard. This library requires libusb.
|
This is a library to handle the LCD and extra keys on the Logitech G15 Gaming
|
||||||
|
Keyboard and similar devices.
|
||||||
|
This library requires libusb.
|
||||||
|
LibG15 currently supports LCD & keys on the following devices:
|
||||||
|
- Original G15 keyboard
|
||||||
|
- G11 keyboard
|
||||||
|
- Z10 speakers
|
||||||
|
- 2nd revision of the G15 (amber backlight, 6 'G' keys, LCD)
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.61 for libg15 1.2.3.
|
# Generated by GNU Autoconf 2.61 for libg15 1.2.4.
|
||||||
#
|
#
|
||||||
# Report bugs to <mlampard@users.sourceforge.net>.
|
# Report bugs to <mlampard@users.sourceforge.net>.
|
||||||
#
|
#
|
||||||
@@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='libg15'
|
PACKAGE_NAME='libg15'
|
||||||
PACKAGE_TARNAME='libg15'
|
PACKAGE_TARNAME='libg15'
|
||||||
PACKAGE_VERSION='1.2.3'
|
PACKAGE_VERSION='1.2.4'
|
||||||
PACKAGE_STRING='libg15 1.2.3'
|
PACKAGE_STRING='libg15 1.2.4'
|
||||||
PACKAGE_BUGREPORT='mlampard@users.sourceforge.net'
|
PACKAGE_BUGREPORT='mlampard@users.sourceforge.net'
|
||||||
|
|
||||||
ac_default_prefix=/usr
|
ac_default_prefix=/usr
|
||||||
@@ -1392,7 +1392,7 @@ if test "$ac_init_help" = "long"; then
|
|||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures libg15 1.2.3 to adapt to many kinds of systems.
|
\`configure' configures libg15 1.2.4 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@@ -1462,7 +1462,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of libg15 1.2.3:";;
|
short | recursive ) echo "Configuration of libg15 1.2.4:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@@ -1564,7 +1564,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
libg15 configure 1.2.3
|
libg15 configure 1.2.4
|
||||||
generated by GNU Autoconf 2.61
|
generated by GNU Autoconf 2.61
|
||||||
|
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||||
@@ -1578,7 +1578,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by libg15 $as_me 1.2.3, which was
|
It was created by libg15 $as_me 1.2.4, which was
|
||||||
generated by GNU Autoconf 2.61. Invocation command line was
|
generated by GNU Autoconf 2.61. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
@@ -2269,7 +2269,7 @@ fi
|
|||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='libg15'
|
PACKAGE='libg15'
|
||||||
VERSION='1.2.3'
|
VERSION='1.2.4'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
@@ -20586,7 +20586,7 @@ exec 6>&1
|
|||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by libg15 $as_me 1.2.3, which was
|
This file was extended by libg15 $as_me 1.2.4, which was
|
||||||
generated by GNU Autoconf 2.61. Invocation command line was
|
generated by GNU Autoconf 2.61. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
@@ -20639,7 +20639,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
|||||||
_ACEOF
|
_ACEOF
|
||||||
cat >>$CONFIG_STATUS <<_ACEOF
|
cat >>$CONFIG_STATUS <<_ACEOF
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
libg15 config.status 1.2.3
|
libg15 config.status 1.2.4
|
||||||
configured by $0, generated by GNU Autoconf 2.61,
|
configured by $0, generated by GNU Autoconf 2.61,
|
||||||
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
AC_INIT(libg15, 1.2.3, mlampard@users.sourceforge.net)
|
AC_INIT(libg15, 1.2.4, mlampard@users.sourceforge.net)
|
||||||
AC_PREFIX_DEFAULT(/usr)
|
AC_PREFIX_DEFAULT(/usr)
|
||||||
AC_CONFIG_AUX_DIR(config)
|
AC_CONFIG_AUX_DIR(config)
|
||||||
AM_INIT_AUTOMAKE()
|
AM_INIT_AUTOMAKE()
|
||||||
|
|||||||
Vendored
-10
@@ -1,10 +0,0 @@
|
|||||||
libg15 for Debian
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
Notes about hardware
|
|
||||||
|
|
||||||
Notes about configuration of other packages
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Giacomo Catenazzi <cate@debian.org> Mon, 27 Aug 2007 07:56:10 +0200
|
|
||||||
Vendored
+27
-5
@@ -1,12 +1,34 @@
|
|||||||
libg15 (1.2.3-1) unstable; urgency=low
|
libg15 (1.2.1) edgy; urgency=low
|
||||||
|
* Add debugging function to enable/disable extra output
|
||||||
|
* All debugging output is now prefixed with libg15 to aid localising
|
||||||
|
problems.
|
||||||
|
* debugging function now also controls libusb debugging output.
|
||||||
|
* Try to claim usb interface up to 10 times before failing
|
||||||
|
* Slow down initialisation, to allow keyboard to come out of usb
|
||||||
|
auto-suspend on newer kernels.
|
||||||
|
* Attempt to combat ENOSPC by slowing down writes to the lcd if ENOSPC is
|
||||||
|
received. Unless that error occurs at least once, transfers are sent as normal.
|
||||||
|
* Add function to change keyboard backlight (independant of lcd backlight).
|
||||||
|
* Add re-initialising function, which will attempt to reconnect a keyboard
|
||||||
|
that was previously removed and replugged.
|
||||||
|
* libg15 now uses pthread mutexes to force sequential access to the bus via
|
||||||
|
libusb. Control message URBs are no longer being lost if sent by a different
|
||||||
|
thread in the middle of a screen transfer etc.
|
||||||
|
* Reset the keyboard before init to ensure correct initialisation on
|
||||||
|
kernels > 2.6.19
|
||||||
|
|
||||||
* New upstrem version: add support of new g15 keyboards
|
libg15 (1.1.1-1) edgy; urgency=low
|
||||||
|
|
||||||
-- Giacomo Catenazzi <cate@debian.org> Thu, 15 Nov 2007 07:44:43 +0100
|
* Add basic support for the G11 keyboard
|
||||||
|
* revert all bulk transfers - bulk transfers are illegal for low-speed
|
||||||
|
devices, and cause -22 (EINVAL) warnings on new kernels.
|
||||||
|
* pass most errors to the client app.
|
||||||
|
|
||||||
libg15 (1.2.2-1) unstable; urgency=low
|
-- Anthony J. Mirabella <mirabeaj@gmail.com> Fri, 15 Dec 2006 05:17:49 -0500
|
||||||
|
|
||||||
|
libg15 (1.0-1) breezy; urgency=low
|
||||||
|
|
||||||
* Initial release
|
* Initial release
|
||||||
|
|
||||||
-- Giacomo Catenazzi <cate@debian.org> Mon, 27 Aug 2007 07:56:10 +0200
|
-- Anthony J. Mirabella <mirabeaj@gmail.com> Sun, 24 Sep 2006 22:57:06 -0400
|
||||||
|
|
||||||
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
5
|
4
|
||||||
Vendored
+13
-19
@@ -1,27 +1,21 @@
|
|||||||
Source: libg15
|
Source: libg15
|
||||||
Section: libs
|
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Giacomo Catenazzi <cate@debian.org>
|
Maintainer: Anthony J. Mirabella <mirabeaj@gmail.com>
|
||||||
Build-Depends: cdbs, debhelper (>= 5), autotools-dev, libusb-dev
|
Build-Depends: debhelper (>= 4.0.0), autotools-dev, libusb-dev
|
||||||
Standards-Version: 3.7.2
|
Standards-Version: 3.6.2
|
||||||
|
|
||||||
Package: libg15-1
|
|
||||||
Section: libs
|
Section: libs
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
|
||||||
Description: Library for interfacing with the Logitech G15 keyboards
|
|
||||||
libg15 provides an API for low level control of the LCD display and
|
|
||||||
the extra keys on some Logitech keyboards (G11, G15)
|
|
||||||
.
|
|
||||||
This package contains the shared library and the runtime data.
|
|
||||||
|
|
||||||
Package: libg15-dev
|
Package: libg15-dev
|
||||||
Section: libdevel
|
Section: libdevel
|
||||||
Depends: libg15-1 (= ${binary:Version})
|
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Description: Library for interfacing with the Logitech G15 keyboards
|
Depends: libg15 (= ${Source-Version})
|
||||||
libg15 provides an API for low level control of the LCD display and
|
Description: Development packages for libg15
|
||||||
the extra keys on some Logitech keyboards (G11, G15).
|
Includes the files needed for developing software that uses libg15.
|
||||||
.
|
|
||||||
This package contains the header files and the static library.
|
|
||||||
|
|
||||||
|
Package: libg15
|
||||||
|
Section: libs
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
|
Description: Library for interfacing with the Logitech G15 Keyboard
|
||||||
|
Provides for low-level control of the lcd and extra keys on the
|
||||||
|
Logitech G15 keyboard.
|
||||||
Vendored
+6
-24
@@ -1,30 +1,12 @@
|
|||||||
This package was debianized by Giacomo A. Catenazzi <cate@debian.org> on
|
This package was debianized by Anthony J. Mirabella <mirabeaj@gmail.com> on
|
||||||
Mon, 27 Aug 2007 07:56:10 +0200.
|
Sun, 24 Sep 2006 22:57:06 -0400.
|
||||||
|
|
||||||
It was downloaded from http://g15tools.sourceforge.net/
|
It was downloaded from sourceforge.net
|
||||||
|
|
||||||
Upstream Authors:
|
Copyright Holders: Philip Lawatsch <philip@lawatsch.at>
|
||||||
|
|
||||||
Philip Lawatsch <philip@lawatsch.at>
|
|
||||||
Alex Ibrado <alex@ibrado.org>
|
Alex Ibrado <alex@ibrado.org>
|
||||||
Anthony J. Mirabella <mirabeaj@gmail.com>
|
Autotools support added by Anthony J. Mirabella <mirabeaj@gmail.com>
|
||||||
|
|
||||||
Copyright:
|
|
||||||
|
|
||||||
Copyright (C) 2006,2007 Philip Lawatsch <philip@lawatsch.at>
|
|
||||||
Alex Ibrado <alex@ibrado.org>
|
|
||||||
Anthony J. Mirabella <mirabeaj@gmail.com>
|
|
||||||
|
|
||||||
License:
|
License:
|
||||||
|
|
||||||
g15tools is free software; you can redistribute it and/or modify
|
GPL
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
License can be found in the file `/usr/share/common-licenses/GPL-2'.
|
|
||||||
|
|
||||||
|
|
||||||
The Debian packaging is (C) 2007, Giacomo A. Catenazzi <cate@debian.org> and
|
|
||||||
is licensed under the GPL v2 (or later), see `/usr/share/common-licenses/GPL-2'.
|
|
||||||
|
|
||||||
Vendored
-1
@@ -1 +0,0 @@
|
|||||||
debian/tmp/usr/lib/lib*.so.* usr/lib/
|
|
||||||
Vendored
+6
-5
@@ -1,5 +1,6 @@
|
|||||||
debian/tmp/usr/include/* usr/include/
|
usr/include/*
|
||||||
debian/tmp/usr/lib/lib*.a usr/lib/
|
usr/lib/lib*.a
|
||||||
debian/tmp/usr/lib/lib*.so usr/lib/
|
usr/lib/lib*.so
|
||||||
debian/tmp/usr/lib/*.la usr/lib/
|
usr/lib/pkgconfig/*
|
||||||
|
usr/lib/*.la
|
||||||
|
usr/share/pkgconfig/*
|
||||||
Vendored
+111
-4
@@ -1,8 +1,115 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
# -*- makefile -*-
|
||||||
|
# Sample debian/rules that uses debhelper.
|
||||||
|
# This file was originally written by Joey Hess and Craig Small.
|
||||||
|
# As a special exception, when this file is copied by dh-make into a
|
||||||
|
# dh-make output file, you may use that output file without restriction.
|
||||||
|
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||||
|
|
||||||
DEB_DH_MAKESHLIBS_ARGS_libg15 := --version-info
|
# Uncomment this to turn on verbose mode.
|
||||||
|
#export DH_VERBOSE=1
|
||||||
include /usr/share/cdbs/1/rules/debhelper.mk
|
|
||||||
include /usr/share/cdbs/1/class/autotools.mk
|
|
||||||
|
|
||||||
|
|
||||||
|
# These are used for cross-compiling and for saving the configure script
|
||||||
|
# from having to guess our platform (since we know it already)
|
||||||
|
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||||
|
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||||
|
|
||||||
|
|
||||||
|
CFLAGS = -Wall -g
|
||||||
|
|
||||||
|
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||||
|
CFLAGS += -O0
|
||||||
|
else
|
||||||
|
CFLAGS += -O2
|
||||||
|
endif
|
||||||
|
|
||||||
|
# shared library versions, option 1
|
||||||
|
version=1.0.0
|
||||||
|
major=1
|
||||||
|
# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
|
||||||
|
#version=`ls src/.libs/lib*.so.* | \
|
||||||
|
# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
|
||||||
|
#major=`ls src/.libs/lib*.so.* | \
|
||||||
|
# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
|
||||||
|
|
||||||
|
config.status: configure
|
||||||
|
dh_testdir
|
||||||
|
# Add here commands to configure the package.
|
||||||
|
CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
|
||||||
|
|
||||||
|
|
||||||
|
build: build-stamp
|
||||||
|
build-stamp: config.status
|
||||||
|
dh_testdir
|
||||||
|
|
||||||
|
# Add here commands to compile the package.
|
||||||
|
$(MAKE)
|
||||||
|
|
||||||
|
touch build-stamp
|
||||||
|
|
||||||
|
clean:
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
rm -f build-stamp
|
||||||
|
|
||||||
|
# Add here commands to clean up after the build process.
|
||||||
|
-$(MAKE) distclean
|
||||||
|
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
||||||
|
cp -f /usr/share/misc/config.sub config.sub
|
||||||
|
endif
|
||||||
|
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
|
||||||
|
cp -f /usr/share/misc/config.guess config.guess
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
dh_clean
|
||||||
|
|
||||||
|
install: build
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_clean -k
|
||||||
|
dh_installdirs -plibg15
|
||||||
|
dh_installdirs -plibg15-dev
|
||||||
|
|
||||||
|
# Add here commands to install the package into debian/tmp
|
||||||
|
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
|
||||||
|
|
||||||
|
|
||||||
|
# Build architecture-independent files here.
|
||||||
|
binary-indep: build install
|
||||||
|
# We have nothing to do by default.
|
||||||
|
|
||||||
|
# Build architecture-dependent files here.
|
||||||
|
binary-arch: build install
|
||||||
|
dh_testdir -a
|
||||||
|
dh_testroot -a
|
||||||
|
dh_installchangelogs ChangeLog -a
|
||||||
|
dh_installdocs -a
|
||||||
|
dh_installexamples -a
|
||||||
|
dh_install -a --sourcedir=debian/tmp
|
||||||
|
dh_installmenu -a
|
||||||
|
dh_installdebconf -a
|
||||||
|
dh_installlogrotate -a
|
||||||
|
dh_installemacsen -a
|
||||||
|
dh_installpam -a
|
||||||
|
dh_installmime -a
|
||||||
|
dh_installinit -a
|
||||||
|
dh_installcron -a
|
||||||
|
dh_installinfo -a
|
||||||
|
dh_installman -a
|
||||||
|
dh_link -a
|
||||||
|
dh_strip -a
|
||||||
|
dh_compress -a
|
||||||
|
dh_fixperms -a
|
||||||
|
# dh_perl -a
|
||||||
|
# dh_python -a
|
||||||
|
dh_makeshlibs -a
|
||||||
|
dh_installdeb -a
|
||||||
|
dh_shlibdeps -a
|
||||||
|
dh_gencontrol -a
|
||||||
|
dh_md5sums -a
|
||||||
|
dh_builddeb -a
|
||||||
|
|
||||||
|
binary: binary-indep binary-arch
|
||||||
|
.PHONY: build clean binary-indep binary-arch binary install
|
||||||
Vendored
-7
@@ -1,7 +0,0 @@
|
|||||||
# See uscan(1) for format
|
|
||||||
|
|
||||||
# Compulsory line, this is a version 3 file
|
|
||||||
version=3
|
|
||||||
|
|
||||||
http://sf.net/g15tools libg15-(.*)\.tar\.bz2
|
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
(c) 2006 - 2007 The G15tools Project - g15tools.sf.net
|
(c) 2006 - 2007 The G15tools Project - g15tools.sf.net
|
||||||
|
|
||||||
$Revision: 260 $ - $Date: 2007-10-18 12:17:48 +0930 (Thu, 18 Oct 2007) $ $Author: mlampard $
|
$Revision: 270 $ - $Date: 2007-11-25 15:32:03 +1030 (Sun, 25 Nov 2007) $ $Author: mlampard $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
@@ -45,7 +45,7 @@ const libg15_devices_t g15_devices[] = {
|
|||||||
DEVICE("Logitech G15",0x46d,0xc222,G15_LCD|G15_KEYS),
|
DEVICE("Logitech G15",0x46d,0xc222,G15_LCD|G15_KEYS),
|
||||||
DEVICE("Logitech G11",0x46d,0xc225,G15_KEYS),
|
DEVICE("Logitech G11",0x46d,0xc225,G15_KEYS),
|
||||||
DEVICE("Logitech Z-10",0x46d,0x0a07,G15_LCD|G15_KEYS|G15_DEVICE_IS_SHARED),
|
DEVICE("Logitech Z-10",0x46d,0x0a07,G15_LCD|G15_KEYS|G15_DEVICE_IS_SHARED),
|
||||||
DEVICE("Logitech G15 v2",0x46d,0xc227,G15_LCD|G15_KEYS),
|
DEVICE("Logitech G15 v2",0x46d,0xc227,G15_LCD|G15_KEYS|G15_DEVICE_5BYTE_RETURN),
|
||||||
DEVICE(NULL,0,0,0)
|
DEVICE(NULL,0,0,0)
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ static usb_dev_handle * findAndOpenDevice(libg15_devices_t handled_device, int d
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g15_log(stderr,G15_LOG_INFO,"Sorry, I could not detached the driver, giving up\n");
|
g15_log(stderr,G15_LOG_INFO,"Sorry, I could not detach the driver, giving up\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -334,32 +334,79 @@ int exitLibG15()
|
|||||||
|
|
||||||
static void dumpPixmapIntoLCDFormat(unsigned char *lcd_buffer, unsigned char const *data)
|
static void dumpPixmapIntoLCDFormat(unsigned char *lcd_buffer, unsigned char const *data)
|
||||||
{
|
{
|
||||||
unsigned int offset_from_start = G15_LCD_OFFSET;
|
/*
|
||||||
|
|
||||||
|
For a set of bytes (A, B, C, etc.) the bits representing pixels will appear on the LCD like this:
|
||||||
|
|
||||||
|
A0 B0 C0
|
||||||
|
A1 B1 C1
|
||||||
|
A2 B2 C2
|
||||||
|
A3 B3 C3 ... and across for G15_LCD_WIDTH bytes
|
||||||
|
A4 B4 C4
|
||||||
|
A5 B5 C5
|
||||||
|
A6 B6 C6
|
||||||
|
A7 B7 C7
|
||||||
|
|
||||||
|
A0
|
||||||
|
A1 <- second 8-pixel-high row starts straight after the last byte on
|
||||||
|
A2 the previous row
|
||||||
|
A3
|
||||||
|
A4
|
||||||
|
A5
|
||||||
|
A6
|
||||||
|
A7
|
||||||
|
A8
|
||||||
|
|
||||||
|
A0
|
||||||
|
...
|
||||||
|
A0
|
||||||
|
...
|
||||||
|
A0
|
||||||
|
...
|
||||||
|
A0
|
||||||
|
A1 <- only the first three bits are shown on the bottom row (the last three
|
||||||
|
A2 pixels of the 43-pixel high display.)
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
unsigned int output_offset = G15_LCD_OFFSET;
|
||||||
|
unsigned int base_offset = 0;
|
||||||
unsigned int curr_row = 0;
|
unsigned int curr_row = 0;
|
||||||
unsigned int curr_col = 0;
|
unsigned int curr_col = 0;
|
||||||
|
|
||||||
for (curr_row=0;curr_row<G15_LCD_HEIGHT;++curr_row)
|
/* Five 8-pixel rows + a little 3-pixel row. This formula will calculate
|
||||||
|
the minimum number of bytes required to hold a complete column. (It
|
||||||
|
basically divides by eight and rounds up the result to the nearest byte,
|
||||||
|
but at compile time.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define G15_LCD_HEIGHT_IN_BYTES ((G15_LCD_HEIGHT + ((8 - (G15_LCD_HEIGHT % 8)) % 8)) / 8)
|
||||||
|
|
||||||
|
for (curr_row = 0; curr_row < G15_LCD_HEIGHT_IN_BYTES; ++curr_row)
|
||||||
{
|
{
|
||||||
for (curr_col = 0; curr_col < G15_LCD_WIDTH; ++curr_col)
|
for (curr_col = 0; curr_col < G15_LCD_WIDTH; ++curr_col)
|
||||||
{
|
{
|
||||||
unsigned int pixel_offset = curr_row*G15_LCD_WIDTH + curr_col;
|
unsigned int bit = curr_col % 8;
|
||||||
unsigned int byte_offset = pixel_offset / 8;
|
/* Copy a 1x8 column of pixels across from the source image to the LCD buffer. */
|
||||||
unsigned int bit_offset = pixel_offset % 8;
|
|
||||||
unsigned int val = data[byte_offset] & 1<<(7-bit_offset);
|
|
||||||
|
|
||||||
unsigned int row = curr_row / 8;
|
lcd_buffer[output_offset] =
|
||||||
unsigned int offset = G15_LCD_WIDTH*row + curr_col;
|
(((data[base_offset ] << bit) & 0x80) >> 7) |
|
||||||
unsigned int bit = curr_row % 8;
|
(((data[base_offset + G15_LCD_WIDTH/8 ] << bit) & 0x80) >> 6) |
|
||||||
|
(((data[base_offset + (G15_LCD_WIDTH/8 * 2)] << bit) & 0x80) >> 5) |
|
||||||
/*
|
(((data[base_offset + (G15_LCD_WIDTH/8 * 3)] << bit) & 0x80) >> 4) |
|
||||||
if (val)
|
(((data[base_offset + (G15_LCD_WIDTH/8 * 4)] << bit) & 0x80) >> 3) |
|
||||||
printf("Setting pixel at row %d col %d to %d offset %d bit %d\n",curr_row,curr_col, val, offset, bit);
|
(((data[base_offset + (G15_LCD_WIDTH/8 * 5)] << bit) & 0x80) >> 2) |
|
||||||
*/
|
(((data[base_offset + (G15_LCD_WIDTH/8 * 6)] << bit) & 0x80) >> 1) |
|
||||||
if (val)
|
(((data[base_offset + (G15_LCD_WIDTH/8 * 7)] << bit) & 0x80) >> 0);
|
||||||
lcd_buffer[offset_from_start + offset] = lcd_buffer[offset_from_start + offset] | 1 << bit;
|
++output_offset;
|
||||||
else
|
if (bit == 7)
|
||||||
lcd_buffer[offset_from_start + offset] = lcd_buffer[offset_from_start + offset] & ~(1 << bit);
|
base_offset++;
|
||||||
}
|
}
|
||||||
|
/* Jump down seven pixel-rows in the source image, since we've just
|
||||||
|
done a row of eight pixels in one pass (and we counted one pixel-row
|
||||||
|
while we were going, so now we skip the next seven pixel-rows.) */
|
||||||
|
base_offset += G15_LCD_WIDTH - (G15_LCD_WIDTH / 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,7 +444,10 @@ int writePixmapToLCD(unsigned char const *data)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
int transfercount=0;
|
int transfercount=0;
|
||||||
unsigned char lcd_buffer[G15_BUFFER_LEN];
|
unsigned char lcd_buffer[G15_BUFFER_LEN];
|
||||||
memset(lcd_buffer,0,G15_BUFFER_LEN);
|
/* The pixmap conversion function will overwrite everything after G15_LCD_OFFSET, so we only need to blank
|
||||||
|
the buffer up to this point. (Even though the keyboard only cares about bytes 0-23.) */
|
||||||
|
memset(lcd_buffer, 0, G15_LCD_OFFSET); /* G15_BUFFER_LEN); */
|
||||||
|
|
||||||
dumpPixmapIntoLCDFormat(lcd_buffer, data);
|
dumpPixmapIntoLCDFormat(lcd_buffer, data);
|
||||||
|
|
||||||
if(!(g15_devices[found_devicetype].caps & G15_LCD))
|
if(!(g15_devices[found_devicetype].caps & G15_LCD))
|
||||||
@@ -543,7 +593,7 @@ static unsigned char g15KeyToLogitechKeyCode(int key)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void processKeyEvent(unsigned int *pressed_keys, unsigned char *buffer)
|
static void processKeyEvent8Byte(unsigned int *pressed_keys, unsigned char *buffer)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -634,6 +684,67 @@ static void processKeyEvent(unsigned int *pressed_keys, unsigned char *buffer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void processKeyEvent5Byte(unsigned int *pressed_keys, unsigned char *buffer)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
*pressed_keys = 0;
|
||||||
|
|
||||||
|
g15_log(stderr,G15_LOG_WARN,"Keyboard: %x, %x, %x, %x, %x\n",buffer[0],buffer[1],buffer[2],buffer[3],buffer[4]);
|
||||||
|
|
||||||
|
if (buffer[0] == 0x02)
|
||||||
|
{
|
||||||
|
if (buffer[1]&0x01)
|
||||||
|
*pressed_keys |= G15_KEY_G1;
|
||||||
|
|
||||||
|
if (buffer[1]&0x02)
|
||||||
|
*pressed_keys |= G15_KEY_G2;
|
||||||
|
|
||||||
|
if (buffer[1]&0x04)
|
||||||
|
*pressed_keys |= G15_KEY_G3;
|
||||||
|
|
||||||
|
if (buffer[1]&0x08)
|
||||||
|
*pressed_keys |= G15_KEY_G4;
|
||||||
|
|
||||||
|
if (buffer[1]&0x10)
|
||||||
|
*pressed_keys |= G15_KEY_G5;
|
||||||
|
|
||||||
|
if (buffer[1]&0x20)
|
||||||
|
*pressed_keys |= G15_KEY_G6;
|
||||||
|
|
||||||
|
if (buffer[1]&0x40)
|
||||||
|
*pressed_keys |= G15_KEY_M1;
|
||||||
|
|
||||||
|
if (buffer[1]&0x80)
|
||||||
|
*pressed_keys |= G15_KEY_M2;
|
||||||
|
|
||||||
|
if (buffer[2]&0x20)
|
||||||
|
*pressed_keys |= G15_KEY_M3;
|
||||||
|
|
||||||
|
if (buffer[2]&0x40)
|
||||||
|
*pressed_keys |= G15_KEY_MR;
|
||||||
|
|
||||||
|
if (buffer[2]&0x80)
|
||||||
|
*pressed_keys |= G15_KEY_L1;
|
||||||
|
|
||||||
|
if (buffer[2]&0x2)
|
||||||
|
*pressed_keys |= G15_KEY_L2;
|
||||||
|
|
||||||
|
if (buffer[2]&0x4)
|
||||||
|
*pressed_keys |= G15_KEY_L3;
|
||||||
|
|
||||||
|
if (buffer[2]&0x8)
|
||||||
|
*pressed_keys |= G15_KEY_L4;
|
||||||
|
|
||||||
|
if (buffer[2]&0x10)
|
||||||
|
*pressed_keys |= G15_KEY_L5;
|
||||||
|
|
||||||
|
if (buffer[2]&0x1)
|
||||||
|
*pressed_keys |= G15_KEY_LIGHT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int getPressedKeys(unsigned int *pressed_keys, unsigned int timeout)
|
int getPressedKeys(unsigned int *pressed_keys, unsigned int timeout)
|
||||||
{
|
{
|
||||||
unsigned char buffer[9];
|
unsigned char buffer[9];
|
||||||
@@ -642,14 +753,27 @@ int getPressedKeys(unsigned int *pressed_keys, unsigned int timeout)
|
|||||||
ret = usb_interrupt_read(keyboard_device, g15_keys_endpoint, (char*)buffer, 9, timeout);
|
ret = usb_interrupt_read(keyboard_device, g15_keys_endpoint, (char*)buffer, 9, timeout);
|
||||||
pthread_mutex_unlock(&libusb_mutex);
|
pthread_mutex_unlock(&libusb_mutex);
|
||||||
|
|
||||||
|
if(g15DeviceCapabilities() & G15_DEVICE_5BYTE_RETURN) { /* new 5byte protocol */
|
||||||
|
if (buffer[0] == 1)
|
||||||
|
return G15_ERROR_TRY_AGAIN;
|
||||||
|
if (ret == 5) {
|
||||||
|
|
||||||
|
processKeyEvent5Byte(pressed_keys, buffer);
|
||||||
|
|
||||||
|
return G15_NO_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (ret == 9)
|
if (ret == 9)
|
||||||
{
|
{
|
||||||
if (buffer[0] == 1)
|
if (buffer[0] == 1)
|
||||||
return G15_ERROR_TRY_AGAIN;
|
return G15_ERROR_TRY_AGAIN;
|
||||||
|
|
||||||
processKeyEvent(pressed_keys, buffer);
|
processKeyEvent8Byte(pressed_keys, buffer);
|
||||||
|
|
||||||
return G15_NO_ERROR;
|
return G15_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return handle_usb_errors("Keyboard Read", ret); /* allow the app to deal with errors */
|
return handle_usb_errors("Keyboard Read", ret); /* allow the app to deal with errors */
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
(c) 2006 - 2007 The G15tools Project - g15tools.sf.net
|
(c) 2006 - 2007 The G15tools Project - g15tools.sf.net
|
||||||
|
|
||||||
$Revision: 263 $ - $Date: 2007-10-18 12:23:30 +0930 (Thu, 18 Oct 2007) $ $Author: mlampard $
|
$Revision: 266 $ - $Date: 2007-11-25 13:32:23 +1030 (Sun, 25 Nov 2007) $ $Author: mlampard $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _LIBG15_H_
|
#ifndef _LIBG15_H_
|
||||||
@@ -31,6 +31,7 @@ extern "C"
|
|||||||
#define G15_LCD 1
|
#define G15_LCD 1
|
||||||
#define G15_KEYS 2
|
#define G15_KEYS 2
|
||||||
#define G15_DEVICE_IS_SHARED 4
|
#define G15_DEVICE_IS_SHARED 4
|
||||||
|
#define G15_DEVICE_5BYTE_RETURN 8
|
||||||
|
|
||||||
typedef struct libg15_devices_t libg15_devices_t;
|
typedef struct libg15_devices_t libg15_devices_t;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -3,11 +3,11 @@
|
|||||||
%define prefix /usr
|
%define prefix /usr
|
||||||
Summary: library to control logitech G15 keyboards
|
Summary: library to control logitech G15 keyboards
|
||||||
Name: libg15
|
Name: libg15
|
||||||
Version: 1.2.3
|
Version: 1.2.4
|
||||||
Release: 1
|
Release: 1
|
||||||
Copyright: GPL
|
Copyright: GPL
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Source: http://prdownloads.sourceforge.net/g15tools/libg15-1.2.3.tar.bz2
|
Source: http://prdownloads.sourceforge.net/g15tools/libg15-1.2.4.tar.bz2
|
||||||
URL: http://sourceforge.net/projects/g15tools
|
URL: http://sourceforge.net/projects/g15tools
|
||||||
Distribution: Linux
|
Distribution: Linux
|
||||||
Vendor: NONE
|
Vendor: NONE
|
||||||
|
|||||||
Reference in new issue
Block a user