-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Labels
area: SensorsSensorsSensorsbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
Describe the bug
ST LIS2DUX12 accelerometer driver makes unnecessary "little-endian to CPU endian" conversion. This will lead to incorrect readings on big-endian HW.
I believe these sys_le16_to_cpu()
conversions are not needed: three here and one there.
That's because values are converted to CPU endianness in the hal_st code: here and there correspondingly.
I can't reproduce/check this in practice as I don't have a big-endian HW with this sensor.
To Reproduce
Read any sensor channel (e.g., SENSOR_CHAN_DIE_TEMP) on big-endian HW.
Environment
- Zephyr 3.7.0-rc2
Metadata
Metadata
Assignees
Labels
area: SensorsSensorsSensorsbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug