]> git.zarvox.org Git - libtouchmouse.git/log
libtouchmouse.git
13 years agoMake the timeouts behave as they ought.
Drew Fisher [Mon, 31 Oct 2011 06:24:34 +0000 (23:24 -0700)]
Make the timeouts behave as they ought.

Each platform has its own API for high resolution timers, so I added an
abstraction function that returns a monotonically increasing number in
nanoseconds.

On Windows, we use QueryPerformanceCounter()
On OSX, we use mach_absolute_time()
On Linux, we use clock_gettime() with CLOCK_MONOTONIC

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
13 years agoFix build on OSX.
Drew Fisher [Sun, 30 Oct 2011 22:42:05 +0000 (15:42 -0700)]
Fix build on OSX.

Add LDFLAGS for the shared library via CMAKE_SHARED_LINKER_FLAGS.
Also actually link against the library we build.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
13 years agoWindows is annoying.
Drew Fisher [Sat, 29 Oct 2011 20:14:03 +0000 (13:14 -0700)]
Windows is annoying.

Declare all the things in libtouchmouse.h with dllexport.
Also put output library in a lib folder

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
13 years agoPull apart library and example.
Drew Fisher [Sat, 29 Oct 2011 19:44:06 +0000 (12:44 -0700)]
Pull apart library and example.

An API now exists, as does a separate program that performs the same
demonstration task for a limited number of updates.  A shared library will be
built.  Timeout behavior needs to be implemented.

Forward progress.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
13 years agoMake git ignore the build folder
Drew Fisher [Tue, 25 Oct 2011 17:22:44 +0000 (10:22 -0700)]
Make git ignore the build folder

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
13 years agoFirst pass at a CMakeLists.txt to support building on Windows, OSX, and Linux.
Drew Fisher [Tue, 25 Oct 2011 07:14:38 +0000 (00:14 -0700)]
First pass at a CMakeLists.txt to support building on Windows, OSX, and Linux.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
13 years agoMake OSX actually find the mouse.
Drew Fisher [Tue, 25 Oct 2011 05:42:01 +0000 (22:42 -0700)]
Make OSX actually find the mouse.

HIDAPI on OSX always returns -1 as the interface_number for all devices,
so we use usage_page and usage to pick the right device.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
13 years agoOnly enumerate devices that match the right VendorID/ProductID.
Drew Fisher [Tue, 25 Oct 2011 05:41:25 +0000 (22:41 -0700)]
Only enumerate devices that match the right VendorID/ProductID.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
13 years agoPrint errors to stderr.
Drew Fisher [Tue, 25 Oct 2011 05:39:55 +0000 (22:39 -0700)]
Print errors to stderr.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
13 years agoSwitch from libusb-1.0 to HIDAPI. origin/master
Drew Fisher [Mon, 24 Oct 2011 08:48:49 +0000 (01:48 -0700)]
Switch from libusb-1.0 to HIDAPI.

HIDAPI ( http://www.signal11.us/oss/hidapi/ ) has a very permissive
license, which makes it very convenient to embed into our project.
It features separate backends to support HID on different platforms.

Right now, the only platform the Makefile will build on is Linux,
but we can fix that in due time.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
13 years agoInitial commit of a proof-of-concept TouchMouse driver built on libusb.
Drew Fisher [Mon, 24 Oct 2011 02:23:24 +0000 (19:23 -0700)]
Initial commit of a proof-of-concept TouchMouse driver built on libusb.

I'll want to give this an actual API, rework it atop libhid instead of libusb
for other platforms (libusb on OSX can't unbind the HID driver), and do lots
of cleanup, but first let's get this in git.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>