This maintains `direction` and `value` `File`s for each DigitalPin
implementation. Instead of Open/Read/Close we now only do Seek/Read,
this speeds up Read/Write operations a bit.
A silly benchmark on the mock FS gives:
benchmark old ns/op new ns/op delta
BenchmarkDigitalRead-8 647 7.36 -98.86%
benchmark old allocs new allocs delta
BenchmarkDigitalRead-8 5 0 -100.00%
benchmark old bytes new bytes delta
BenchmarkDigitalRead-8 96 0 -100.00%
In the sysfs i2cDevice implementation, use an ioctl to get the adapter
functionality mask. Prefer SMBus block I/O but if it's not available,
perform read/write calls directly on the file descriptor.
Improve Wiichuck error handling. Add a 1 ms delay between I/O operations
to the Wiichuck; this dramatically improves reliability.
Signed-off-by: Hrishikesh Tapaswi <hrishikesh195@yahoo.com>