-
Notifications
You must be signed in to change notification settings - Fork 8.2k
sensor: adxl345: fix Streaming mode #88393
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
Merged
kartben
merged 8 commits into
zephyrproject-rtos:main
from
croxel:fix/adxl345-streaming
May 16, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
cd12454
sensor: adxl345: Fix conditional instantiation of RTIO ctx and IODEV
ubieda 9ecaca7
sensor: adxl345: Prevent clearing SQE flags set while prepping SQEs
ubieda 51e60ce
sensor: adxl345: fix: Overriding of ODR setting in DTS property
ubieda bce2d15
sensor: adxl345: rename ADXL345_ODR_12HZ to ADXL345_ODR_12_5HZ
ubieda a9c0a0d
sensor: adxl345: Allow fifo-watermark configurable through dts
ubieda 1f5e990
sensor: adxl345: Optimize RTIO SQE/CQE pool based on fifo-watermark
ubieda ebd4680
sensor: adxl345: Formatting improvements on macrobatics
ubieda 873b090
shields: pmod_acl: Set default ODR and watermark values
ubieda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,5 +12,7 @@ | |
| reg = <0x0>; | ||
| spi-max-frequency = <DT_FREQ_M(1)>; | ||
| status = "okay"; | ||
| odr = <25>; | ||
| fifo-watermark = <31>; | ||
| }; | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /* | ||
| * Copyright (c) 2025 Croxel Inc. | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
| #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ADI_ADX345_H_ | ||
| #define ZEPHYR_INCLUDE_DT_BINDINGS_ADI_ADX345_H_ | ||
|
|
||
| /** | ||
| * @defgroup ADXL345 ADI DT Options | ||
| * @ingroup sensor_interface | ||
| * @{ | ||
| */ | ||
|
|
||
| /** | ||
| * @defgroup ADXL345_ODR Output Rate options | ||
| * @{ | ||
| */ | ||
| #define ADXL345_DT_ODR_12_5 7 | ||
| #define ADXL345_DT_ODR_25 8 | ||
| #define ADXL345_DT_ODR_50 9 | ||
| #define ADXL345_DT_ODR_100 10 | ||
| #define ADXL345_DT_ODR_200 11 | ||
| #define ADXL345_DT_ODR_400 12 | ||
| /** @} */ | ||
|
|
||
| /** @} */ | ||
|
|
||
| #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_ADI_ADX345_H_ */ |
Oops, something went wrong.
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.
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.
We should pick a direction and go with it. Most applications I've worked with (usually in AR/VR and Android) expect that the scheduling of the processing thread is predictable. So I much prefer to use SENSOR_ATTR_BATCH_DURATION or in DT some form of
batch-duration-us. This way you can expect to get samples at the same time interval regardless of the ODR.Whatever direction we go we should be consistent.
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.
Friendly reminder @yperess: please let me know if there's anything else required for removing the NACK.
Thanks in advance!