samples/subsys/usb/hid-keyboard/README.html · samples/subsys/usb/hid-keyboard/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · USB HID

USB HID Keyboard

최대 네 key와 세 keyboard LED를 Devicetree input으로 연결합니다.

Official pathsamples/subsys/usb/hid-keyboard/README.html
Source filesamples/subsys/usb/hid-keyboard/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

Lock key mapping, 복합 HID report와 nRF52840 DK build를 설명합니다.

Stack

Experimental UDC

Input

gpio-keys

Keys

1 to 4

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 C6D19B45E406E5CB3746C799BC631C302B0190A262BF93F6D2F1B5D0E99D0315
.. zephyr:code-sample:: usb-hid-keyboard
   :name: USB HID keyboard
   :relevant-api: usbd_api usbd_hid_device input_interface

   Implement a basic HID keyboard device.

Overview
********

This sample application demonstrates the HID keyboard implementation using the
new experimental USB device stack.

Requirements
************

This project requires an experimental USB device driver (UDC API) and uses the
:ref:`input` API. There must be a :dtcompatible:`gpio-keys` group of buttons
or keys defined at the board level that can generate input events.
At least one key is required and up to four can be used. The first three keys
are used for Num Lock, Caps Lock and Scroll Lock. The fourth key is used to
report HID keys 1, 2, 3 and the right Alt modifier at once.

The example can use up to three LEDs, configured via the devicetree alias such
as ``led0``, to indicate the state of the keyboard LEDs.

Building and Running
********************

This sample can be built for multiple boards, in this example we will build it
for the nRF52840DK board:

.. zephyr-app-commands::
   :zephyr-app: samples/subsys/usb/hid-keyboard
   :board: nrf52840dk/nrf52840
   :goals: build flash
   :compact:

Part 3

한국어 전문 번역

개요

새 experimental USB device stack을 사용해 기본 HID keyboard를 구현하는 sample application입니다.

요구 사항

Experimental USB device driver인 UDC API와 input API가 필요합니다. Board level Devicetree에는 input event를 생성할 수 있는 gpio-keys compatible button 또는 key group이 정의되어 있어야 합니다.

Key는 최소 한 개, 최대 네 개를 사용할 수 있습니다. 첫 세 key는 각각 Num Lock, Caps Lock, Scroll Lock에 사용됩니다. 네 번째 key는 HID key 1·2·3과 right Alt modifier를 한 번에 report합니다.

Keyboard LED 상태를 표시하도록 led0 같은 Devicetree alias로 구성된 LED를 최대 세 개까지 사용할 수 있습니다.

빌드 및 실행

여러 board용으로 build할 수 있습니다. 다음 example은 nRF52840 DK용 image를 build하고 flash합니다.

west build -b nrf52840dk/nrf52840 samples/subsys/usb/hid-keyboard
west flash

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.