Part 1
요약·해설
ADC, DMA, EEPROM, flash, GPIO, I2C, RTC, SPI, MSPI, UART emulator를 나열합니다.
ADC · DMA · EEPROM · GPIO · RTC
I2C · SPI · MSPI · UART
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
E7187677A95BAFFB41D692E90277D66DFCF7E5F09DA93C2C8B8483E0CFEA48D3
.. _emulators:
Zephyr's device emulators/simulators
####################################
Overview
========
Zephyr includes in its codebase a set of device emulators/simulators.
With this we refer to SW components which are built together with the embedded SW
and present themselves as devices of a given class to the rest of the system.
These device emulators/simulators can be built for any target which has sufficient RAM and flash,
even if some may have extra functionality which is only available in some targets.
.. note::
| Zephyr also includes and uses many other types of simulators/emulators, including CPU and
platform simulators, radio simulators, and several build targets which allow running the
embedded code in the development host.
| Some of Zephyr communication controllers/drivers include also either loopback modes or loopback
devices.
| This page does not cover any of these.
.. note::
Drivers which are specific to some platform, like for example the
:ref:`native_sim specific drivers <native_sim_peripherals>` which
emulate a peripheral class by connecting to host APIs are not covered by this page.
Available Emulators
===================
**ADC emulator**
* A fake driver which pretends to be actual ADC, and can be used for testing higher-level API
for ADC devices.
* Main Kconfig option: :kconfig:option:`CONFIG_ADC_EMUL`
* DT binding: :dtcompatible:`zephyr,adc-emul`
**DMA emulator**
* Emulated DMA controller
* Main Kconfig option: :kconfig:option:`CONFIG_DMA_EMUL`
* DT binding: :dtcompatible:`zephyr,dma-emul`
**EEPROM emulator**
* Emulate an EEPROM on a flash partition
* Main Kconfig option: :kconfig:option:`CONFIG_EEPROM_EMULATOR`
* DT binding: :dtcompatible:`zephyr,emu-eeprom`
.. _emul_eeprom_simu_brief:
**EEPROM simulator**
* Emulate an EEPROM on RAM
* Main Kconfig option: :kconfig:option:`CONFIG_EEPROM_SIMULATOR`
* DT binding: :dtcompatible:`zephyr,sim-eeprom`
* Note: For :ref:`native targets <native_sim>` it is also possible to keep the content
as a file on the host filesystem.
**External bus and bus connected peripheral emulators**
* :ref:`Documentation <bus_emul>`
* Allow emulating external buses like I2C or SPI and peripherals connected to them.
.. _emul_flash_simu_brief:
**Flash simulator**
* Emulate a flash on RAM
* Main Kconfig option: :kconfig:option:`CONFIG_FLASH_SIMULATOR`
* DT binding: :dtcompatible:`zephyr,sim-flash`
* Note: For native targets it is also possible to keep the content as a file on the host
filesystem. Check :ref:`the native_sim flash simulator section <nsim_per_flash_simu>`.
**GPIO emulator**
* Emulated GPIO controllers which can be driven from SW
* Main Kconfig option: :kconfig:option:`CONFIG_GPIO_EMUL`
* DT binding: :dtcompatible:`zephyr,gpio-emul`
**I2C emulator**
* Emulated I2C bus. See :ref:`bus emulators <bus_emul>`.
* Main Kconfig option: :kconfig:option:`CONFIG_I2C_EMUL`
* DT binding: :dtcompatible:`zephyr,i2c-emul-controller`
**RTC emulator**
* Emulated RTC peripheral. See :ref:`RTC emulated device section <rtc_api_emul_dev>`
* Main Kconfig option: :kconfig:option:`CONFIG_RTC_EMUL`
* DT binding: :dtcompatible:`zephyr,rtc-emul`
**SPI emulator**
* Emulated SPI bus. See :ref:`bus emulators <bus_emul>`.
* Main Kconfig option: :kconfig:option:`CONFIG_SPI_EMUL`
* DT binding: :dtcompatible:`zephyr,spi-emul-controller`
**MSPI emulator**
* Emulated MSPI bus. See :ref:`bus emulators <bus_emul>`.
* Main Kconfig option: :kconfig:option:`CONFIG_MSPI_EMUL`
* DT binding: :dtcompatible:`zephyr,mspi-emul-controller`
**UART emulator**
* Emulated UART bus. See :ref:`bus emulators <bus_emul>`.
* Main Kconfig option: :kconfig:option:`CONFIG_UART_EMUL`
* DT binding: :dtcompatible:`zephyr,uart-emul`
Part 3
한국어 전문 번역
개요
Zephyr codebase에는 device emulator/simulator 집합이 포함됩니다. 여기서 emulator/simulator란 embedded software와 함께 build되어 system의 나머지 부분에 특정 class의 device처럼 나타나는 software component를 뜻합니다.
충분한 RAM과 flash가 있는 target이라면 어느 target에나 build할 수 있지만, 일부 추가 기능은 특정 target에서만 사용할 수 있습니다.
Zephyr에는 CPU·platform·radio simulator, embedded code를 development host에서 실행하는 여러 build target, communication controller/driver의 loopback mode·device 등 다른 종류의 simulator/emulator도 있습니다. 이 페이지는 그것들을 다루지 않습니다.
Host API에 연결해 peripheral class를 흉내 내는 native_sim 전용 driver처럼 특정 platform 전용 driver도 이 페이지 범위에서 제외합니다.
사용 가능한 emulator
- ADC emulator
- 실제 ADC처럼 동작하는 fake driver로 상위 ADC API 시험에 사용합니다.
CONFIG_ADC_EMUL,zephyr,adc-emul. - DMA emulator
- Emulated DMA controller입니다.
CONFIG_DMA_EMUL,zephyr,dma-emul. - EEPROM emulator
- Flash partition 위에 EEPROM을 emulation합니다.
CONFIG_EEPROM_EMULATOR,zephyr,emu-eeprom. - EEPROM simulator
- RAM 위에 EEPROM을 emulation합니다.
CONFIG_EEPROM_SIMULATOR,zephyr,sim-eeprom. Native target에서는 내용을 host filesystem file로 유지할 수도 있습니다. - External bus와 bus-connected peripheral emulator
- Bus emulator 문서에서 설명하며 I2C·SPI 같은 외부 bus와 연결 peripheral을 emulation합니다.
- Flash simulator
- RAM 위에 flash를 emulation합니다.
CONFIG_FLASH_SIMULATOR,zephyr,sim-flash. Native target에서는 host filesystem file로 내용을 유지할 수도 있습니다. - GPIO emulator
- Software로 구동할 수 있는 GPIO controller입니다.
CONFIG_GPIO_EMUL,zephyr,gpio-emul. - I2C emulator
- Emulated I2C bus입니다.
CONFIG_I2C_EMUL,zephyr,i2c-emul-controller. - RTC emulator
- Emulated RTC peripheral입니다.
CONFIG_RTC_EMUL,zephyr,rtc-emul. - SPI emulator
- Emulated SPI bus입니다.
CONFIG_SPI_EMUL,zephyr,spi-emul-controller. - MSPI emulator
- Emulated MSPI bus입니다.
CONFIG_MSPI_EMUL,zephyr,mspi-emul-controller. - UART emulator
- Emulated UART bus입니다.
CONFIG_UART_EMUL,zephyr,uart-emul.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.