요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Kernel driver w1_ds2423
=======================
Supported chips:
* Maxim DS2423 based counter devices.
supported family codes:
=============== ====
W1_THERM_DS2423 0x1D
=============== ====
Author: Mika Laitio <[email protected]>
Description
-----------
Support is provided through the sysfs w1_slave file. Each opening and
read sequence of w1_slave file initiates the read of counters and ram
available in DS2423 pages 12 - 15.
Result of each page is provided as an ASCII output where each counter
value and associated ram buffer is outpputed to own line.
Each lines will contain the values of 42 bytes read from the counter and
memory page along the crc=YES or NO for indicating whether the read operation
was successful and CRC matched.
If the operation was successful, there is also in the end of each line
a counter value expressed as an integer after c=
Meaning of 42 bytes represented is following:
- 1 byte from ram page
- 4 bytes for the counter value
- 4 zero bytes
- 2 bytes for crc16 which was calculated from the data read since the previous crc bytes
- 31 remaining bytes from the ram page
- crc=YES/NO indicating whether read was ok and crc matched
- c=<int> current counter value
example from the successful read::
00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
00 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
00 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761
00 05 00 00 00 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=YES c=5
example from the read with crc errors::
00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
00 02 00 00 22 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO
00 e1 61 5d 19 00 00 00 00 df 0b 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO
00 05 00 00 20 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=NO
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
지원 장치와 읽기 범위
1-18`w1_ds2423`은 Maxim DS2423 기반 카운터 장치를 지원합니다. family symbol은 원문 표의 `W1_THERM_DS2423`, 코드는 `0x1D`이며 작성자는 Mika Laitio입니다.
지원 인터페이스는 sysfs의 `w1_slave`입니다. 파일을 열어 읽을 때마다 DS2423의 12~15 페이지에 있는 카운터와 RAM을 읽습니다.
한 번의 w1_slave 읽기가 가져오는 대상입니다.
Kernel driver w1_ds2423
=======================
Supported chips:
* Maxim DS2423 based counter devices.
supported family codes:
=============== ====
W1_THERM_DS2423 0x1D
=============== ====
Author: Mika Laitio <[email protected]>
Description
-----------
42바이트 출력 형식
19-38각 페이지 결과는 ASCII 한 줄로 출력됩니다. 카운터 값과 연관 RAM 버퍼가 페이지별로 한 줄씩 나타납니다.
각 줄에는 카운터·메모리 페이지에서 읽은 42바이트와 `crc=YES` 또는 `crc=NO`가 포함됩니다. 읽기와 CRC가 모두 성공한 경우 끝에 정수 카운터 값 `c=<int>`도 붙습니다.
42바이트는 RAM 페이지의 첫 1바이트, 4바이트 카운터, 4개의 0 바이트, 앞선 CRC 이후 데이터로 계산한 CRC16 2바이트, RAM 페이지의 나머지 31바이트 순서입니다.
42바이트와 상태 필드의 순서입니다.
Support is provided through the sysfs w1_slave file. Each opening and
read sequence of w1_slave file initiates the read of counters and ram
available in DS2423 pages 12 - 15.
Result of each page is provided as an ASCII output where each counter
value and associated ram buffer is outpputed to own line.
Each lines will contain the values of 42 bytes read from the counter and
memory page along the crc=YES or NO for indicating whether the read operation
was successful and CRC matched.
If the operation was successful, there is also in the end of each line
a counter value expressed as an integer after c=
Meaning of 42 bytes represented is following:
- 1 byte from ram page
- 4 bytes for the counter value
- 4 zero bytes
- 2 bytes for crc16 which was calculated from the data read since the previous crc bytes
- 31 remaining bytes from the ram page
정상 및 CRC 오류 예시
39-54정상 예시에서는 네 페이지 모두 `crc=YES`이며 각 줄 끝에 `c=2`, `c=408798761`, `c=5` 같은 카운터 값이 표시됩니다.
CRC 오류 예시에서는 정상인 첫 줄만 카운터가 표시되고, 손상된 줄은 `crc=NO`로 끝나며 `c=` 필드가 없습니다. 원문의 모든 42바이트 예시는 아래 영어 원문 블록에 그대로 보존됩니다.
페이지별 CRC 결과에 따라 카운터 필드가 달라집니다.
- crc=YES/NO indicating whether read was ok and crc matched
- c=<int> current counter value
example from the successful read::
00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
00 02 00 00 00 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
00 29 c6 5d 18 00 00 00 00 04 37 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=408798761
00 05 00 00 00 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=YES c=5
example from the read with crc errors::
00 02 00 00 00 00 00 00 00 6d 38 00 ff ff 00 00 fe ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=YES c=2
00 02 00 00 22 00 00 00 00 e0 1f 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO
00 e1 61 5d 19 00 00 00 00 df 0b 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff 00 00 ff ff crc=NO
00 05 00 00 20 00 00 00 00 8d 39 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff crc=NO
요약·해설
w1_ds2423.rst:1-54DS2423 페이지 12~15의 RAM·카운터와 CRC 출력 형식을 설명합니다.