[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aDPjiVNuQyn1_zXc@archie.me>
Date: Mon, 26 May 2025 10:44:09 +0700
From: Bagas Sanjaya <bagasdotme@...il.com>
To: Lothar Rubusch <l.rubusch@...il.com>, jic23@...nel.org,
dlechner@...libre.com, nuno.sa@...log.com, andy@...nel.org,
corbet@....net, lucas.p.stankus@...il.com, lars@...afoo.de,
Michael.Hennerich@...log.com
Cc: linux-iio@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 12/12] docs: iio: add ADXL313 accelerometer
On Fri, May 23, 2025 at 10:35:23PM +0000, Lothar Rubusch wrote:
> +A channel value can be read from its _raw attribute. The value returned is the
> +raw value as reported by the devices. To get the processed value of the channel,
> +apply the following formula:
> +
> +.. code-block:: bash
> +
> + processed value = (_raw + _offset) * _scale
No syntax highlighting should be appropriate for this block.
> +Show accelerometer channels value:
> +
> +.. code-block:: bash
> +
> + root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_raw
> + 2
> + root:/sys/bus/iio/devices/iio:device0> cat in_accel_y_raw
> + -57
> + root:/sys/bus/iio/devices/iio:device0> cat in_accel_z_raw
> + 2
> + root:/sys/bus/iio/devices/iio:device0> cat in_accel_scale
> + 0.009576806
> +
The accelerometer values will be:
> +- X-axis acceleration = in_accel_x_raw * in_accel_scale = 0.0191536 m/s^2
> +- Y-axis acceleration = in_accel_y_raw * in_accel_scale = -0.5458779 m/s^2
> +- Z-axis acceleration = in_accel_z_raw * in_accel_scale = 0.0191536 m/s^2
> +
> +Set calibration offset for accelerometer channels. Note, the calibration will be
> +rounded according to the graduation of LSB units:
"Note that the calibration ..."
> +See ``Documentation/iio/iio_devbuf.rst`` for more information about how buffered
> +data is structured.
> +
> +4. IIO Interfacing Tools
> +========================
> +
> +See ``Documentation/iio/iio_tools.rst`` for the description of the available IIO
Do not inline docs cross-references to make them internal links.
Thanks.
--
An old man doll... just what I always wanted! - Clara
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists