-
Notifications
You must be signed in to change notification settings - Fork 2.1k
drivers/lsm6dsxx: refactoring Lsm6dsl into common driver Lsm6dsxx #20170
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
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.
Hmmm I think there is a lot of code duplication here.
Maybe it would be better to just make one module lsm6dsxx
and ust use PSEUDOMODULES
for the specific devices.
Just browsing around I found the lpsxxx
a good example.
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.
Much better, still a few things to note, I would suggest breaking it up into the following commits:
- Rename all files and dirs
- Replace all
lsm6dsl
withlsm6dsxx
in the files - Add the
lsm6ds33
ifdefs, register splitting, and makefile changes - Adapt the
feather-nrf52840-sense
params and add the saul device to themakefile.dep
- Adapt the test
Remember to keep the credit of others and add your own.
*/ | ||
#define LSM6DSXX_PARAM_I2C I2C_DEV(0) | ||
#define LSM6DSXX_PARAM_ADDR (0x6A) | ||
#define LSM6DSXX_WHO_AM_I (0b01101001) |
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.
I guess we don't need that now.
d8ba167
to
5ae9e1f
Compare
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.
Still a few minor things but looking good!
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.
Very nice, just a few more nit-picks!
975d584
to
61201b8
Compare
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.
Look's good, I saw the tests being run, maybe it would be good to paste the logs. ACK.
I have added the last few fixups, please go through them and if you are happy you may squash
The murdock failure looks unrelated. |
Even though it is removed just to get this through
hmmm something didn't work out right... I am just adding the commits directly |
51b4445
to
dcd9760
Compare
dcd9760
to
ab84f23
Compare
Hmmm native timer tests failing again... This PR should not touch anything in native. |
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.
I did not look deeply into the code, but from what I can see it looks good. Much more important: I ran the test on a feather-nrf52840-sense
and I was able to confirm that the readouts were correct.
Contribution description
RIOT already offers support for the Gyro-Accelerometer sensor LSM6DSL found in the b-l475e-iot01a board. There is a very similar sensor (LSM6DS33) in the feather-nrf52840-sense board that shares its characteristics. This PR intends to merge both drivers.
Testing procedure
feather-nrf52840-sense
Input:Output:
b-l475e-iot01a
InputOutput:
Issues/PRs references