Skip to content

Conversation

@vladislav-pejic
Copy link
Contributor

Updated ADXL362 driver with RTIO stream functionality. RTIO stream is using both FIFO threshold and FIFO full triggers. Together with RTIO stream, RTIO async read is also implemented.

Signed-off-by: Vladislav Pejic vladislav.pejic@orioninc.com

Updated ADXL362 driver with RTIO stream functionality.
RTIO stream is using both FIFO threshold and FIFO full triggers.
Together with RTIO stream, RTIO async read is also implemented.

Signed-off-by: Vladislav Pejic <vladislav.pejic@orioninc.com>
@vladislav-pejic vladislav-pejic force-pushed the adi_adxl362_rtio_stream branch from aa22363 to 0d8e361 Compare October 18, 2024 11:54
Copy link
Contributor

@teburd teburd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks quite good to me, there's some minor things here and there that might be worth cleaning up, the 6 vs 8 byte stride in the fifo data could be #define'ed out perhaps rather than comments inline. The conversion from the sensors fifo format I do think warrants a second look or at least a comment as to why the math used here is needed.


int64_t micro_ms2 = data_in * SENSOR_G / range_to_scale[range];

*out = CLAMP((micro_ms2 + (micro_ms2 % 1000000)), INT32_MIN, INT32_MAX);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the modulo and division above are going to be pretty costly I'd think? I again wonder if this can't be a simple scale multiplier to convert from what is likely already a fixed point adc reading to another scale and numerical container size

See #76968

@aescolar aescolar merged commit 6d8ace9 into zephyrproject-rtos:main Oct 22, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Sensors Sensors platform: ADI Analog Devices, Inc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants