요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
===============
ADXL380 driver
===============
This driver supports Analog Device's ADXL380/382 on SPI/I2C bus.
1. Supported devices
====================
* `ADXL380 <https://www.analog.com/ADXL380>`_
* `ADXL382 <https://www.analog.com/ADXL382>`_
The ADXL380/ADXL382 is a low noise density, low power, 3-axis accelerometer with
selectable measurement ranges. The ADXL380 supports the ±4 g, ±8 g, and ±16 g
ranges, and the ADXL382 supports ±15 g, ±30 g, and ±60 g ranges.
2. Device attributes
====================
Accelerometer measurements are always provided.
Temperature data are also provided. This data can be used to monitor the
internal system temperature or to improve the temperature stability of the
device via calibration.
Each IIO device, has a device folder under ``/sys/bus/iio/devices/iio:deviceX``,
where X is the IIO index of the device. Under these folders reside a set of
device files, depending on the characteristics and features of the hardware
device in questions. These files are consistently generalized and documented in
the IIO ABI documentation.
The following tables show the adxl380 related device files, found in the
specific device folder path ``/sys/bus/iio/devices/iio:deviceX``.
+---------------------------------------------------+----------------------------------------------------------+
| 3-Axis Accelerometer related device files | Description |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_scale | Scale for the accelerometer channels. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_filter_high_pass_3db_frequency | Low pass filter bandwidth. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_filter_high_pass_3db_frequency_available | Available low pass filter bandwidth configurations. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_filter_low_pass_3db_frequency | High pass filter bandwidth. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_filter_low_pass_3db_frequency_available | Available high pass filter bandwidth configurations. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_x_calibbias | Calibration offset for the X-axis accelerometer channel. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_x_raw | Raw X-axis accelerometer channel value. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_y_calibbias | y-axis acceleration offset correction |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_y_raw | Raw Y-axis accelerometer channel value. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_z_calibbias | Calibration offset for the Z-axis accelerometer channel. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_z_raw | Raw Z-axis accelerometer channel value. |
+---------------------------------------------------+----------------------------------------------------------+
+----------------------------------+--------------------------------------------+
| Temperature sensor related files | Description |
+----------------------------------+--------------------------------------------+
| in_temp_raw | Raw temperature channel value. |
+----------------------------------+--------------------------------------------+
| in_temp_offset | Offset for the temperature sensor channel. |
+----------------------------------+--------------------------------------------+
| in_temp_scale | Scale for the temperature sensor channel. |
+----------------------------------+--------------------------------------------+
+------------------------------+----------------------------------------------+
| Miscellaneous device files | Description |
+------------------------------+----------------------------------------------+
| name | Name of the IIO device. |
+------------------------------+----------------------------------------------+
| sampling_frequency | Currently selected sample rate. |
+------------------------------+----------------------------------------------+
| sampling_frequency_available | Available sampling frequency configurations. |
+------------------------------+----------------------------------------------+
Channels processed values
-------------------------
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
Where _offset and _scale are device attributes. If no _offset attribute is
present, simply assume its value is 0.
The ADXL380 driver offers data for 2 types of channels, the table below shows
the measurement units for the processed value, which are defined by the IIO
framework:
+-------------------------------------+---------------------------+
| Channel type | Measurement unit |
+-------------------------------------+---------------------------+
| Acceleration on X, Y, and Z axis | Meters per Second squared |
+-------------------------------------+---------------------------+
| Temperature | Millidegrees Celsius |
+-------------------------------------+---------------------------+
Usage examples
--------------
Show device name:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> cat name
adxl382
Show accelerometer channels value:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_raw
-1771
root:/sys/bus/iio/devices/iio:device0> cat in_accel_y_raw
282
root:/sys/bus/iio/devices/iio:device0> cat in_accel_z_raw
-1523
root:/sys/bus/iio/devices/iio:device0> cat in_accel_scale
0.004903325
- X-axis acceleration = in_accel_x_raw * in_accel_scale = −8.683788575 m/s^2
- Y-axis acceleration = in_accel_y_raw * in_accel_scale = 1.38273765 m/s^2
- Z-axis acceleration = in_accel_z_raw * in_accel_scale = -7.467763975 m/s^2
Set calibration offset for accelerometer channels:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
0
root:/sys/bus/iio/devices/iio:device0> echo 50 > in_accel_x_calibbias
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
50
Set sampling frequency:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency
16000
root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency_available
16000 32000 64000
root:/sys/bus/iio/devices/iio:device0> echo 32000 > sampling_frequency
root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency
32000
Set low pass filter bandwidth for accelerometer channels:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency
32000
root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency_available
32000 8000 4000 2000
root:/sys/bus/iio/devices/iio:device0> echo 2000 > in_accel_filter_low_pass_3db_frequency
root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency
2000
3. Device buffers
=================
This driver supports IIO buffers.
All devices support retrieving the raw acceleration and temperature measurements
using buffers.
Usage examples
--------------
Select channels for buffer read:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_accel_x_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_accel_y_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_accel_z_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_temp_en
Set the number of samples to be stored in the buffer:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> echo 10 > buffer/length
Enable buffer readings:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> echo 1 > buffer/enable
Obtain buffered data:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> hexdump -C /dev/iio\:device0
...
002bc300 f7 e7 00 a8 fb c5 24 80 f7 e7 01 04 fb d6 24 80 |......$.......$.|
002bc310 f7 f9 00 ab fb dc 24 80 f7 c3 00 b8 fb e2 24 80 |......$.......$.|
002bc320 f7 fb 00 bb fb d1 24 80 f7 b1 00 5f fb d1 24 80 |......$...._..$.|
002bc330 f7 c4 00 c6 fb a6 24 80 f7 a6 00 68 fb f1 24 80 |......$....h..$.|
002bc340 f7 b8 00 a3 fb e7 24 80 f7 9a 00 b1 fb af 24 80 |......$.......$.|
002bc350 f7 b1 00 67 fb ee 24 80 f7 96 00 be fb 92 24 80 |...g..$.......$.|
002bc360 f7 ab 00 7a fc 1b 24 80 f7 b6 00 ae fb 76 24 80 |...z..$......v$.|
002bc370 f7 ce 00 a3 fc 02 24 80 f7 c0 00 be fb 8b 24 80 |......$.......$.|
002bc380 f7 c3 00 93 fb d0 24 80 f7 ce 00 d8 fb c8 24 80 |......$.......$.|
002bc390 f7 bd 00 c0 fb 82 24 80 f8 00 00 e8 fb db 24 80 |......$.......$.|
002bc3a0 f7 d8 00 d3 fb b4 24 80 f8 0b 00 e5 fb c3 24 80 |......$.......$.|
002bc3b0 f7 eb 00 c8 fb 92 24 80 f7 e7 00 ea fb cb 24 80 |......$.......$.|
002bc3c0 f7 fd 00 cb fb 94 24 80 f7 e3 00 f2 fb b8 24 80 |......$.......$.|
...
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
interfacing tools.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
지원 장치와 IIO 속성 개요
1-35이 문서는 GPL-2.0 라이선스가 적용되는 ADXL380 드라이버 설명서입니다. 드라이버는 SPI 또는 I²C 버스에 연결된 Analog Devices ADXL380과 ADXL382를 지원합니다.
원문이 제시하는 제품 링크와 선택 가능한 가속도 측정 범위입니다.
ADXL380/ADXL382는 측정 범위를 선택할 수 있는 저잡음 밀도·저전력 3축 가속도계입니다. 가속도 측정값은 항상 제공됩니다.
온도 데이터도 제공합니다. 이 데이터는 내부 시스템 온도를 감시하거나 보정을 통해 장치의 온도 안정성을 개선하는 데 사용할 수 있습니다.
각 IIO 장치에는 `/sys/bus/iio/devices/iio:deviceX` 아래에 장치 폴더가 있으며, X는 해당 장치의 IIO 인덱스입니다. 이 폴더에는 하드웨어의 특성과 기능에 따라 여러 장치 파일이 놓입니다. 파일 인터페이스는 일관된 형태로 일반화되어 IIO ABI 문서에 설명되어 있습니다.
이어지는 표는 ADXL380 관련 장치 파일을 장치별 경로 `/sys/bus/iio/devices/iio:deviceX`에서 찾을 수 있음을 보여 줍니다.
하드웨어가 사용자 공간 속성과 측정값으로 노출되는 흐름입니다.
.. SPDX-License-Identifier: GPL-2.0
===============
ADXL380 driver
===============
This driver supports Analog Device's ADXL380/382 on SPI/I2C bus.
1. Supported devices
====================
* `ADXL380 <https://www.analog.com/ADXL380>`_
* `ADXL382 <https://www.analog.com/ADXL382>`_
The ADXL380/ADXL382 is a low noise density, low power, 3-axis accelerometer with
selectable measurement ranges. The ADXL380 supports the ±4 g, ±8 g, and ±16 g
ranges, and the ADXL382 supports ±15 g, ±30 g, and ±60 g ranges.
2. Device attributes
====================
Accelerometer measurements are always provided.
Temperature data are also provided. This data can be used to monitor the
internal system temperature or to improve the temperature stability of the
device via calibration.
Each IIO device, has a device folder under ``/sys/bus/iio/devices/iio:deviceX``,
where X is the IIO index of the device. Under these folders reside a set of
device files, depending on the characteristics and features of the hardware
device in questions. These files are consistently generalized and documented in
the IIO ABI documentation.
The following tables show the adxl380 related device files, found in the
specific device folder path ``/sys/bus/iio/devices/iio:deviceX``.
가속도·온도 속성과 처리값 계산
36-108속성 이름과 원문 설명을 구조화했습니다. high-pass와 low-pass 항목의 대역폭 설명은 원문의 대응을 그대로 보존합니다.
온도 원시 값과 처리값 계산에 쓰이는 속성입니다.
장치 식별과 샘플 속도 선택에 쓰이는 공통 속성입니다.
채널 값은 `_raw` 속성에서 읽을 수 있으며, 반환값은 장치가 보고한 원시 값입니다. 처리된 채널 값을 얻으려면 다음 공식을 적용합니다.
processed value = (_raw + _offset) * _scale
여기서 `_offset`과 `_scale`은 장치 속성입니다. `_offset` 속성이 없으면 그 값은 0이라고 가정합니다.
ADXL380 드라이버는 두 종류의 채널 데이터를 제공합니다. 처리값의 측정 단위는 IIO 프레임워크가 정의합니다.
가속도와 온도 처리값에 적용되는 측정 단위입니다.
sysfs 원시 값을 물리 단위로 변환하는 계산 순서입니다.
+---------------------------------------------------+----------------------------------------------------------+
| 3-Axis Accelerometer related device files | Description |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_scale | Scale for the accelerometer channels. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_filter_high_pass_3db_frequency | Low pass filter bandwidth. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_filter_high_pass_3db_frequency_available | Available low pass filter bandwidth configurations. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_filter_low_pass_3db_frequency | High pass filter bandwidth. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_filter_low_pass_3db_frequency_available | Available high pass filter bandwidth configurations. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_x_calibbias | Calibration offset for the X-axis accelerometer channel. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_x_raw | Raw X-axis accelerometer channel value. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_y_calibbias | y-axis acceleration offset correction |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_y_raw | Raw Y-axis accelerometer channel value. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_z_calibbias | Calibration offset for the Z-axis accelerometer channel. |
+---------------------------------------------------+----------------------------------------------------------+
| in_accel_z_raw | Raw Z-axis accelerometer channel value. |
+---------------------------------------------------+----------------------------------------------------------+
+----------------------------------+--------------------------------------------+
| Temperature sensor related files | Description |
+----------------------------------+--------------------------------------------+
| in_temp_raw | Raw temperature channel value. |
+----------------------------------+--------------------------------------------+
| in_temp_offset | Offset for the temperature sensor channel. |
+----------------------------------+--------------------------------------------+
| in_temp_scale | Scale for the temperature sensor channel. |
+----------------------------------+--------------------------------------------+
+------------------------------+----------------------------------------------+
| Miscellaneous device files | Description |
+------------------------------+----------------------------------------------+
| name | Name of the IIO device. |
+------------------------------+----------------------------------------------+
| sampling_frequency | Currently selected sample rate. |
+------------------------------+----------------------------------------------+
| sampling_frequency_available | Available sampling frequency configurations. |
+------------------------------+----------------------------------------------+
Channels processed values
-------------------------
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
Where _offset and _scale are device attributes. If no _offset attribute is
present, simply assume its value is 0.
The ADXL380 driver offers data for 2 types of channels, the table below shows
the measurement units for the processed value, which are defined by the IIO
framework:
+-------------------------------------+---------------------------+
| Channel type | Measurement unit |
+-------------------------------------+---------------------------+
| Acceleration on X, Y, and Z axis | Meters per Second squared |
+-------------------------------------+---------------------------+
| Temperature | Millidegrees Celsius |
+-------------------------------------+---------------------------+
장치 속성 사용 예제
109-172장치 이름을 표시하는 예제에서 `name`은 `adxl382`를 반환합니다.
root:/sys/bus/iio/devices/iio:device0> cat name
adxl382
X·Y·Z 가속도 원시 값은 각각 -1771, 282, -1523이며, `in_accel_scale`은 0.004903325입니다.
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_raw
-1771
root:/sys/bus/iio/devices/iio:device0> cat in_accel_y_raw
282
root:/sys/bus/iio/devices/iio:device0> cat in_accel_z_raw
-1523
root:/sys/bus/iio/devices/iio:device0> cat in_accel_scale
0.004903325
오프셋이 없는 이 예제에서 각 원시 값에 스케일을 곱하면 X축은 −8.683788575 m/s², Y축은 1.38273765 m/s², Z축은 -7.467763975 m/s²입니다.
원시 값과 스케일 0.004903325를 사용한 축별 계산입니다.
가속도 채널의 보정 오프셋은 축별 `calibbias` 속성으로 설정합니다. 예제는 X축 값을 0에서 50으로 바꾸고 다시 읽어 확인합니다.
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
0
root:/sys/bus/iio/devices/iio:device0> echo 50 > in_accel_x_calibbias
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
50
샘플링 주파수는 현재 16000이고 사용 가능한 값은 16000, 32000, 64000입니다. `sampling_frequency`에 32000을 쓰면 이후 조회값도 32000이 됩니다.
root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency
16000
root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency_available
16000 32000 64000
root:/sys/bus/iio/devices/iio:device0> echo 32000 > sampling_frequency
root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency
32000
가속도 채널의 저역 통과 필터 대역폭은 `in_accel_filter_low_pass_3db_frequency`로 설정합니다. 현재 값은 32000이고 사용 가능한 구성은 32000, 8000, 4000, 2000입니다. 예제는 2000을 선택한 뒤 결과를 다시 읽습니다.
root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency
32000
root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency_available
32000 8000 4000 2000
root:/sys/bus/iio/devices/iio:device0> echo 2000 > in_accel_filter_low_pass_3db_frequency
root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency
2000
모든 쓰기 예제가 따르는 공통 검증 순서입니다.
Usage examples
--------------
Show device name:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> cat name
adxl382
Show accelerometer channels value:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_raw
-1771
root:/sys/bus/iio/devices/iio:device0> cat in_accel_y_raw
282
root:/sys/bus/iio/devices/iio:device0> cat in_accel_z_raw
-1523
root:/sys/bus/iio/devices/iio:device0> cat in_accel_scale
0.004903325
- X-axis acceleration = in_accel_x_raw * in_accel_scale = −8.683788575 m/s^2
- Y-axis acceleration = in_accel_y_raw * in_accel_scale = 1.38273765 m/s^2
- Z-axis acceleration = in_accel_z_raw * in_accel_scale = -7.467763975 m/s^2
Set calibration offset for accelerometer channels:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
0
root:/sys/bus/iio/devices/iio:device0> echo 50 > in_accel_x_calibbias
root:/sys/bus/iio/devices/iio:device0> cat in_accel_x_calibbias
50
Set sampling frequency:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency
16000
root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency_available
16000 32000 64000
root:/sys/bus/iio/devices/iio:device0> echo 32000 > sampling_frequency
root:/sys/bus/iio/devices/iio:device0> cat sampling_frequency
32000
Set low pass filter bandwidth for accelerometer channels:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency
32000
root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency_available
32000 8000 4000 2000
root:/sys/bus/iio/devices/iio:device0> echo 2000 > in_accel_filter_low_pass_3db_frequency
root:/sys/bus/iio/devices/iio:device0> cat in_accel_filter_low_pass_3db_frequency
2000
IIO 버퍼 구성과 데이터 읽기
173-228이 드라이버는 IIO 버퍼를 지원합니다. 모든 지원 장치는 버퍼를 사용해 원시 가속도와 온도 측정값을 가져올 수 있습니다.
버퍼 읽기에 포함할 X·Y·Z 가속도 채널과 온도 채널을 각각 scan element에서 활성화합니다.
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_accel_x_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_accel_y_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_accel_z_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_temp_en
버퍼에 저장할 샘플 수는 `buffer/length`에 10을 써서 정합니다. `buffer/enable`에 1을 쓰면 버퍼 읽기가 활성화됩니다.
root:/sys/bus/iio/devices/iio:device0> echo 10 > buffer/length
root:/sys/bus/iio/devices/iio:device0> echo 1 > buffer/enable
버퍼 데이터는 `/dev/iio:device0`을 `hexdump -C`로 읽습니다. 원문은 주소 `002bc300`부터 `002bc3c0`까지의 예시 바이트와 ASCII 열을 보여 주며 앞뒤 데이터가 더 있음을 줄임표로 나타냅니다.
root:/sys/bus/iio/devices/iio:device0> hexdump -C /dev/iio\:device0
...
002bc300 f7 e7 00 a8 fb c5 24 80 f7 e7 01 04 fb d6 24 80 |......$.......$.|
002bc310 f7 f9 00 ab fb dc 24 80 f7 c3 00 b8 fb e2 24 80 |......$.......$.|
002bc320 f7 fb 00 bb fb d1 24 80 f7 b1 00 5f fb d1 24 80 |......$...._..$.|
002bc330 f7 c4 00 c6 fb a6 24 80 f7 a6 00 68 fb f1 24 80 |......$....h..$.|
002bc340 f7 b8 00 a3 fb e7 24 80 f7 9a 00 b1 fb af 24 80 |......$.......$.|
002bc350 f7 b1 00 67 fb ee 24 80 f7 96 00 be fb 92 24 80 |...g..$.......$.|
002bc360 f7 ab 00 7a fc 1b 24 80 f7 b6 00 ae fb 76 24 80 |...z..$......v$.|
002bc370 f7 ce 00 a3 fc 02 24 80 f7 c0 00 be fb 8b 24 80 |......$.......$.|
002bc380 f7 c3 00 93 fb d0 24 80 f7 ce 00 d8 fb c8 24 80 |......$.......$.|
002bc390 f7 bd 00 c0 fb 82 24 80 f8 00 00 e8 fb db 24 80 |......$.......$.|
002bc3a0 f7 d8 00 d3 fb b4 24 80 f8 0b 00 e5 fb c3 24 80 |......$.......$.|
002bc3b0 f7 eb 00 c8 fb 92 24 80 f7 e7 00 ea fb cb 24 80 |......$.......$.|
002bc3c0 f7 fd 00 cb fb 94 24 80 f7 e3 00 f2 fb b8 24 80 |......$.......$.|
...
채널 선택부터 문자 장치 읽기까지의 설정을 정리했습니다.
IIO 채널 선택과 이진 샘플 획득 순서입니다.
버퍼 데이터가 어떻게 구성되는지에 관한 자세한 내용은 `Documentation/iio/iio_devbuf.rst`를 참고합니다.
3. Device buffers
=================
This driver supports IIO buffers.
All devices support retrieving the raw acceleration and temperature measurements
using buffers.
Usage examples
--------------
Select channels for buffer read:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_accel_x_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_accel_y_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_accel_z_en
root:/sys/bus/iio/devices/iio:device0> echo 1 > scan_elements/in_temp_en
Set the number of samples to be stored in the buffer:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> echo 10 > buffer/length
Enable buffer readings:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> echo 1 > buffer/enable
Obtain buffered data:
.. code-block:: bash
root:/sys/bus/iio/devices/iio:device0> hexdump -C /dev/iio\:device0
...
002bc300 f7 e7 00 a8 fb c5 24 80 f7 e7 01 04 fb d6 24 80 |......$.......$.|
002bc310 f7 f9 00 ab fb dc 24 80 f7 c3 00 b8 fb e2 24 80 |......$.......$.|
002bc320 f7 fb 00 bb fb d1 24 80 f7 b1 00 5f fb d1 24 80 |......$...._..$.|
002bc330 f7 c4 00 c6 fb a6 24 80 f7 a6 00 68 fb f1 24 80 |......$....h..$.|
002bc340 f7 b8 00 a3 fb e7 24 80 f7 9a 00 b1 fb af 24 80 |......$.......$.|
002bc350 f7 b1 00 67 fb ee 24 80 f7 96 00 be fb 92 24 80 |...g..$.......$.|
002bc360 f7 ab 00 7a fc 1b 24 80 f7 b6 00 ae fb 76 24 80 |...z..$......v$.|
002bc370 f7 ce 00 a3 fc 02 24 80 f7 c0 00 be fb 8b 24 80 |......$.......$.|
002bc380 f7 c3 00 93 fb d0 24 80 f7 ce 00 d8 fb c8 24 80 |......$.......$.|
002bc390 f7 bd 00 c0 fb 82 24 80 f8 00 00 e8 fb db 24 80 |......$.......$.|
002bc3a0 f7 d8 00 d3 fb b4 24 80 f8 0b 00 e5 fb c3 24 80 |......$.......$.|
002bc3b0 f7 eb 00 c8 fb 92 24 80 f7 e7 00 ea fb cb 24 80 |......$.......$.|
002bc3c0 f7 fd 00 cb fb 94 24 80 f7 e3 00 f2 fb b8 24 80 |......$.......$.|
...
See ``Documentation/iio/iio_devbuf.rst`` for more information about how buffered
data is structured.
IIO 인터페이스 도구
229-233사용 가능한 IIO 인터페이스 도구에 대한 설명은 `Documentation/iio/iio_tools.rst`를 참고합니다.
4. IIO Interfacing Tools
========================
See ``Documentation/iio/iio_tools.rst`` for the description of the available IIO
interfacing tools.
요약·해설
adxl380.rst:1-233ADXL380 드라이버는 SPI·I²C 방식의 ADXL380/382 3축 가속도계를 IIO로 제공합니다. 가속도와 온도 원시 값에 오프셋·스케일을 적용하는 법, 축 보정과 샘플링·필터 대역폭 설정, 네 채널을 묶은 버퍼 수집 절차가 핵심입니다.
지원 장치와 사용자 공간 인터페이스를 요약합니다.
장치 선택부터 처리값과 버퍼 데이터 확인까지의 전체 경로입니다.