samples/drivers/uart/passthrough/README.html · samples/drivers/uart/passthrough/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Drivers · UART

UART Passthrough

GPS 같은 외부 UART의 data를 가공 없이 console로 전달합니다.

Official pathsamples/drivers/uart/passthrough/README.html
Source filesamples/drivers/uart/passthrough/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

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

Part 1

요약·해설

uart,passthrough 선택, pin·baudrate 요구와 NMEA 출력을 보존합니다.

Interfaces

Console · Other

Direction

Bidirectional

Example

GPS NMEA

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 F28243FEF95129557D317239C9CAF23AA1D733180F2CC241BC81D337D69EE8D0
.. zephyr:code-sample:: uart-passthrough
   :name: UART Passthrough
   :relevant-api: uart_interface

   Pass data directly between the console and another UART interface.

Overview
********

This sample will virtually connect two UART interfaces together, as if Zephyr
and the processor were not present. Data read from the console is transmitted
to the "*other*" interface, and data read from the "*other*" interface is
relayed to the console.

The source code for this sample application can be found at:
:zephyr_file:`samples/drivers/uart/passthrough`.

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

#. One UART interface, identified as Zephyr's console.
#. A second UART connected to something interesting (e.g: GPS), identified as
   the chosen ``uart,passthrough`` device - the pins and baudrate will need to
   be configured correctly.

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

Build and flash the sample as follows, changing ``nucleo_l476rg`` for your
board:

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/uart/passthrough
   :board: nucleo_l476rg
   :goals: build flash
   :compact:

Sample Output
=============

.. code-block:: console

    *** Booting Zephyr OS build zephyr-v3.5.0-2988-gb84bab36b941 ***
    Console Device: 0x8003940
    Other Device:   0x800392c
    $GNGSA,A,3,31,29,25,26,,,,,,,,,11.15,10.66,3.29,1*06
    $GNGSA,A,3,,,,,,,,,,,,,11.15,10.66,3.29,2*0F
    $GNGSA,A,3,,,,,,,,,,,,,11.15,10.66,3.29,3*0E
    $GNGSA,A,3,,,,,,,,,,,,,11.15,10.66,3.29,4*09
    $GNGSA,A,3,,,,,,,,,,,,,11.15,10.66,3.29,5*08

Part 3

한국어 전문 번역

개요

이 sample은 Zephyr와 processor가 없는 것처럼 UART interface 두 개를 가상으로 직접 연결합니다. Console에서 읽은 data는 다른 interface로 전송하고, 다른 interface에서 읽은 data는 console로 relay합니다.

Sample application source code는 samples/drivers/uart/passthrough에 있습니다.

요구 사항

  1. Zephyr console로 식별되는 UART interface 하나
  2. GPS 같은 대상에 연결된 두 번째 UART. 선택된 uart,passthrough device로 식별하며 pin과 baudrate를 올바르게 설정해야 합니다.

Build와 실행

다음과 같이 sample을 build하고 flash합니다. nucleo_l476rg는 사용하는 board 이름으로 바꾸십시오.

west build -b nucleo_l476rg samples/drivers/uart/passthrough
west flash

Sample 출력

*** Booting Zephyr OS build zephyr-v3.5.0-2988-gb84bab36b941 ***
Console Device: 0x8003940
Other Device:   0x800392c
$GNGSA,A,3,31,29,25,26,,,,,,,,,11.15,10.66,3.29,1*06
$GNGSA,A,3,,,,,,,,,,,,,11.15,10.66,3.29,2*0F
$GNGSA,A,3,,,,,,,,,,,,,11.15,10.66,3.29,3*0E
$GNGSA,A,3,,,,,,,,,,,,,11.15,10.66,3.29,4*09
$GNGSA,A,3,,,,,,,,,,,,,11.15,10.66,3.29,5*08

Source

출처

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