-
Notifications
You must be signed in to change notification settings - Fork 7.3k
boards: shields: Add EVAL-ADXL367-ARDZ accelerometer shield and streaming configuration #88644
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
boards: shields: Add EVAL-ADXL367-ARDZ accelerometer shield and streaming configuration #88644
Conversation
aliases { | ||
accel0 = &adxl367_eval_adxl367_ardz; | ||
}; |
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.
just move this to the shield's overlay so that "everyone" just benefits from this alias when using the shield.
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.
Is it ok now?
49d9682
to
2e6312f
Compare
I'm wondering whether this should be a device-tree property. That way multiple instances can be configured differently |
285527c
to
9230a08
Compare
drivers/sensor/adi/adxl367/adxl367.h
Outdated
@@ -232,6 +232,16 @@ | |||
#define ADXL367_ACCEL_4G_LSB_PER_G 2000 | |||
#define ADXL367_ACCEL_8G_LSB_PER_G 1000 | |||
|
|||
#if CONFIG_ADXL367_FIFO_DISABLED | |||
# define ADXL367_DEFAULT_FIFO_MODE ADXL367_FIFO_DISABLED |
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.
can we not do this weird indent and just do #define normally
Add a new shield definition for the Analog Devices EVAL-ADXL367-ARDZ accelerometer shield. This shield provides support for an ADI ADXL367 accelerometer over an Arduino SPI connector. Signed-off-by: Vladislav Pejic <[email protected]>
5dfd2b5
to
2217b9b
Compare
Done! |
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.
Thanks @vladislav-pejic !
Accelerometer FIFO Mode. If not set, default value is ADXL367_FIFO_MODE_DISABLED. | ||
enum: | ||
- 0 # ADXL367_FIFO_MODE_DISABLED | ||
- 1 # ADXL367_FIFO_MODE_OLDEST_SAVED | ||
- 2 # ADXL367_FIFO_MODE_STREAM | ||
- 3 # ADXL367_FIFO_MODE_TRIGGERED |
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.
Need to explain in the description why the default value was selected
https://docs.zephyrproject.org/latest/build/dts/bindings-upstream.html#dt-bindings-default-rules
The enumeration decoding needs to be moved from comments to the description so it will be included in the rendered documentation.
2217b9b
to
2173a49
Compare
2173a49
to
8c796fd
Compare
c3780f1
to
2b4af5d
Compare
drivers/sensor/adi/adxl367/adxl367.c
Outdated
.fifo_config.fifo_mode = \ | ||
DT_INST_PROP_OR(inst, fifo_mode, ADXL367_FIFO_DISABLED), \ |
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.
end of line alignment seems off?
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.
Fixed
Add support for setting FIFO mode using DT property. Signed-off-by: Vladislav Pejic <[email protected]>
Adds adxl367 streaming configuration to accelerometer samples. Signed-off-by: Vladislav Pejic <[email protected]>
2b4af5d
to
f09dc4e
Compare
Add a new shield definition for the Analog Devices EVAL-ADXL367-ARDZ
accelerometer shield. This shield provides support for an ADI ADXL367
accelerometer over an Arduino SPI connector.
Also adds adxl367 streaming configuration to accelerometer samples.
Signed-off-by: Vladislav Pejic [email protected]