bma42x: add new BMA421/BMA425 driver #587
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wrote this for the PineTime, and all available sensors (accelerometer, step counter, temperature sensor) do work.
This commit also includes two "configuration files", that actually appear to be firmware files to run on the accelerometer for special features like step counting.
I'm not sure where they originally came for, and I don't know the copyright status of them. However, Bosch has open-sourced the driver for the very similar BMA423 which includes a similar binary blob and the InfiniTime and Wasp-OS projects have been shipping these blobs without issues, so I think it's reasonably safe to include these binary blobs directly in the source.
The chip is configured by default for high efficiency: it only consumes 14µA when enabled. There is also a performance mode, which can be supported by the driver if needed in the future.