Skip to content
Commit a6cbc326 authored by Armando Visconti's avatar Armando Visconti Committed by Anas Nashif
Browse files

drivers/sensor: lis2dux12: fix odr and range



The current implementation assumes that sensor odr and range are
always configured in the Device Tree at compile time which might
not be the case.

Instead, application can set odr and range either at compile time
through the DT or using SENSOR_ATTR_SAMPLING_FREQUENCY and
SENSOR_ATTR_FULL_SCALE attributes at runtime, so each driver instance
must keep trace of the latest values set and use them in the sensor
APIs which require them (e.g. lis2dux12_mode_set).

Signed-off-by: default avatarArmando Visconti <armando.visconti@st.com>
(cherry picked from commit cf20aa05)
parent 81e8c6dc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment