← Documents Documentation/admin-guide/lcd-panel-cgram.rst GitHub 원문 ↗

Linux 6.18.37 · Administration

Parallel port LCD/Keypad Panel support

Parallel-port LCD에서 8개 custom glyph를 정의하는 escape format과 방향·speaker glyph 예제를 제공합니다.

Source pathDocumentation/admin-guide/lcd-panel-cgram.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

CG-RAM 형식

lcd-panel-cgram.rst:1-15

character number와 pixel row byte encoding을 설명합니다.

Glyph 예제

lcd-panel-cgram.rst:16-27

enter, 방향, IP, speaker glyph 명령을 제공합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 ======================================
2 Parallel port LCD/Keypad Panel support
3 ======================================
4
5 Some LCDs allow you to define up to 8 characters, mapped to ASCII
6 characters 0 to 7. The escape code to define a new character is
7 '\e[LG' followed by one digit from 0 to 7, representing the character
8 number, and up to 8 couples of hex digits terminated by a semi-colon
9 (';'). Each couple of digits represents a line, with 1-bits for each
10 illuminated pixel with LSB on the right. Lines are numbered from the
11 top of the character to the bottom. On a 5x7 matrix, only the 5 lower
12 bits of the 7 first bytes are used for each character. If the string
13 is incomplete, only complete lines will be redefined. Here are some
14 examples::
15
16 printf "\e[LG0010101050D1F0C04;" => 0 = [enter]
17 printf "\e[LG1040E1F0000000000;" => 1 = [up]
18 printf "\e[LG2000000001F0E0400;" => 2 = [down]
19 printf "\e[LG3040E1F001F0E0400;" => 3 = [up-down]
20 printf "\e[LG40002060E1E0E0602;" => 4 = [left]
21 printf "\e[LG500080C0E0F0E0C08;" => 5 = [right]
22 printf "\e[LG60016051516141400;" => 6 = "IP"
23
24 printf "\e[LG00103071F1F070301;" => big speaker
25 printf "\e[LG00002061E1E060200;" => small speaker
26
27 Willy
28

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Custom character escape 형식

1-15

일부 LCD는 ASCII character `0`부터 `7`에 mapping하는 custom character를 최대 8개 정의할 수 있습니다.

새 character escape code는 `\e[LG` 뒤에 character number `0-7` 한 자리, 그리고 semicolon `;`으로 끝나는 최대 8쌍의 hex digit을 붙입니다. 각 digit pair는 character의 한 line이며 bit `1`은 illuminated pixel을 뜻하고 LSB는 오른쪽입니다. line은 위에서 아래로 번호를 매깁니다.

5x7 matrix에서는 처음 7 byte의 하위 5 bit만 사용합니다. string이 불완전하면 complete line만 다시 정의됩니다.

Custom glyph 예제

16-27

enter, 방향, IP, speaker glyph를 정의하는 원문 예제입니다.

printf "\e[LG0010101050D1F0C04;"  => 0 = [enter]
printf "\e[LG1040E1F0000000000;"  => 1 = [up]
printf "\e[LG2000000001F0E0400;"  => 2 = [down]
printf "\e[LG3040E1F001F0E0400;"  => 3 = [up-down]
printf "\e[LG40002060E1E0E0602;"  => 4 = [left]
printf "\e[LG500080C0E0F0E0C08;"  => 5 = [right]
printf "\e[LG60016051516141400;"  => 6 = "IP"

printf "\e[LG00103071F1F070301;"  => big speaker
printf "\e[LG00002061E1E060200;"  => small speaker
LCD custom glyph mapping
slothex row payloadglyph
0010101050D1F0C04enter
1040E1F0000000000up
2000000001F0E0400down
3040E1F001F0E0400up-down
40002060E1E0E0602left
500080C0E0F0E0C08right
60016051516141400IP
00103071F1F070301big speaker
00002061E1E060200small speaker

escape command의 character slot, pixel-row payload와 표시 목적을 구조화했습니다.

문서 서명은 Willy입니다.