This is inspired by [skeeto]'s recent post on [minimalist C libraries]
and allows the caller to decide how to allocate or free memory needed by
libx52. A future addition could let the caller allocate a big enough
buffer up front, and let libx52 manage it.
[skeeto]: https://github.com/skeeto
[minimalist C libraries]: http://nullprogram.com/blog/2018/06/10/
[skip-ci]
These new error codes correspond to similar ones returned by libusb, but
abstract away the usage of libusb underneath libx52. This lets the
application rely solely on libx52 error codes to perform error handling.
- libx52_init returns the libx52_device in an output parameter and
returns a libx52_error_code
- Make all functions return libx52_error_code
- Update package version to indicate incompatible API change
The raw time and date APIs bypass the timezone calculation and update
the internal data structures with the requested time in hh:mm and date
in dd/mm/yy formats.
This is unlikely to be used often, but it is useful during testing.