The conversion makes it simpler to allow cross-compilation, since we
should be using the host Python interpreter to build the generated
character map, rather than relying on the automake infrastructure.
This is used by an application to check if it needs to call
libx52_update. If libx52_set_clock returns 0, it can be assumed that the
clock did change values that require an update, but any other value
indicates that an update is not required.
Compare the stored clock value against the requested value and only
send the USB vendor control messages if necessary. This should reduce
the number of messages from 5 for every clock update to 1-3, depending
on whether the date has changed or not. Only if the timezone of the
default clock changes should the additional 2 messages for the offset
clocks be sent.
This file is parsed during compilation time to generate a static lookup
table which is used to convert UTF-8 text to a character supported by
the X52 MFD.
The vendor command interface allows the user to write a vendor request
packet using the known vendor interface. However, it is not intended for
regular use, since the existing API is better suited to abstract it away
from the user. Rather, the prime goal is for a test harness interface
that can be used to debug problems seen during regular library accesses.
Sometimes the vendor control request failes with LIBUSB_PIPE_ERROR. Most
of the time a retry fixes it right away. To allow for a transient
failure, make the function retry the control transfer up to 3 times
before failing.
Report descriptor can be obtained from
/sys/bus/hid/devices/.../report_descriptor.
Once dumped in hex, the parser at
http://eleccelerator.com/usbdescreqparser/ can convert it to a human
readable format.
This is still a relative work-in-progress, since some of the functions
are being cleaned and enhanced to provide proper functionality similar
to the Windows driver.