-
Notifications
You must be signed in to change notification settings - Fork 44
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
adxl345: I²C support #67
Conversation
- Moved the Sensitivity constants to a dedicated section. - SpiFrequency is set to 2Mz ( ADXL345 supports up to 5Mz ) - Removed the TurnOnOnStart options, we start measuring on instantiation. - Minor typo and example.go fix.
…ch to automatically recognize the device or enable to test one by declaring its expected value.
- Removed useless ReadRaw - Changed the scope of ReadAndCombine to private readAndCombine
@maruel using mmr.Dev16 was not convenient. The adxl345 returns positive and negative int16 values. So i decided to keep the infamous :) conversion |
Thanks for the change! Can you rebase it onto origin/main first? |
- Moved the Sensitivity constants to a dedicated section. - SpiFrequency is set to 2Mz ( ADXL345 supports up to 5Mz ) - Removed the TurnOnOnStart options, we start measuring on instantiation. - Minor typo and example.go fix.
…ch to automatically recognize the device or enable to test one by declaring its expected value.
- Removed useless ReadRaw - Changed the scope of ReadAndCombine to private readAndCombine
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #67 +/- ##
=======================================
- Coverage 62.5% 61.7% -0.8%
=======================================
Files 64 65 +1
Lines 7337 7442 +105
=======================================
+ Hits 4583 4589 +6
- Misses 2600 2701 +101
+ Partials 154 152 -2 ☔ View full report in Codecov by Sentry. |
…Exposed an I2CAddr for those who may need it.
// Use of this source code is governed under the Apache License, Version 2.0 | ||
// that can be found in the LICENSE file. | ||
|
||
package adxl345 |
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.
Optional: if you use package adxl345_test
, the example in the documentation becomes copy-pastable as-is.
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'll resolve to commit, this can be done in a follow up and is optional.
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've been pushing the change.
if this PR fixes periph.io/x/devices/v3/cap1xxx, prefix the PR title with "cap1xxx:".
adxl345: support both SPI and I²C.
Mention the issue number it fixes or add the details of the changes if it
doesn't have a specific issue. Examples:
Once integrated, send a PR to https://github.com/periph/cmd to leverage the
new functionality (if relevant).