Drew Fisher [Sun, 13 Nov 2011 03:26:23 +0000 (19:26 -0800)]
Move timestamps into device struct.
Before this, if an image update was multiple packets, and one of the
packets was dropped, then we didn't correctly reset the decoder when we
received a packet with a different timestamp if the packets were handled
in different calls to touchmouse_process_events_timeout().
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
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.
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.
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.