Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bma42x: add new BMA421/BMA425 driver #587

Merged
merged 1 commit into from
Aug 8, 2023
Merged

bma42x: add new BMA421/BMA425 driver #587

merged 1 commit into from
Aug 8, 2023

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented Jul 14, 2023

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.

@deadprogram
Copy link
Member

@aykevl smoke test?

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 BMA423
driver 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.
@aykevl
Copy link
Member Author

aykevl commented Jul 31, 2023

I forgot, I added a minimal smoke test.

The problem with that smoke test is that I don't really have a way to actually test it. The PineTime doesn't really have a serial output and I have no other separate BMA421/BMA425 to test with. Therefore, it really is just a smoke test, to make sure the code keeps compiling.

(But of course, I do know the driver works because I'm actually using it in my PineTime).

@deadprogram
Copy link
Member

Thanks for the addition @aykevl now merging.

@deadprogram deadprogram merged commit eef0391 into dev Aug 8, 2023
1 check passed
@deadprogram deadprogram deleted the driver-bma421 branch August 8, 2023 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants