-
Notifications
You must be signed in to change notification settings - Fork 2.1k
drivers/lis2dh12: add I2C mode #12290
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
Conversation
I have a thingy52 but I cannot find my jlink to flash it. Ping me after Oct. 1st and hopefully I can test it (vacation). |
Tested with
and it makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
ACK!
Squash please |
2dca61b
to
060eac7
Compare
060eac7
to
96db5c3
Compare
Thank you for the test and review! |
Contribution description
The PR adapts the
lis2dh12
driver to work also in I2C mode, which is the used configuration on thethingy52
.The PR is a rebase of #8419 by @haukepetersen and adapts it to changes in the I2C API during the last two years.
Testing procedure
On a board with lis2dh12 over I2C, run
tests/driver_lis2dh12
and changeDRIVER ?= lis2dh12_spi
toDRIVER ?= lis2dh12_i2c
in the Makefile.@MrKevinWeiss tested the original PR with the thingy52. I don't have the thingy52 but a custom samd51 board with the same chip - here the driver is working as expected.
Issues/PRs references
#8419 rebased & updated to the API changes in master (see fixup)