- Change DefaultOpts to be a struct instead of a function. This makes the godoc
much more descriptive.
- Change InputStatus() to accept a slice, so that the driver will be able to
eventually support the flavors cap1155 and cap1166.
The idea is to enable navigating across the code more easily by using similar
layout amongs the drivers.
Similar to gofmt, it's not about making a stylistic choice, but having a single
style.
Use the following layout for drivers:
- exported support types
- Opts struct
- New func
- Dev struct and methods
- Private support code
No functional change.
A lot of code moved around, so it will likely break any pending PR or fork. :/
- Make errors consistents.
- Standardize comments.
- Make unit test much faster by not sleeping.
- Reduce the number of properties of Dev.
- Do not export Opts.
- Commented out I/O for unused data.
- Slightly reduce memory usage.
- Comment out NewSPI() since it is not implemented.
- Remove verbosity by default.
- Ran github.com/kisielk/errcheck on the code base, and either trapped errors or
marked them as ignored explicitly. The stats was calculated via:
errcheck ./... | grep -v defer | wc -l
- Stop registering gpio.INVALID, it can't be registered.
- Fix a go vet issue in cap1188.