Part 1
요약·해설
기본 mutex protection과 ISR 사용 제한, 전역 disable 시 사용자 책임을 구분합니다.
powered state · low-power caveat
mutex by default
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
BA4AD1ACF582DB7C5BD19B025C53F2F2E94EE927BD76FB5E1C2F6153B76DEC80
.. _retained_mem_api:
Retained Memory
###############
Overview
********
The retained memory driver API provides a way of reading from/writing to memory
areas whereby the contents of the memory is retained whilst the device is
powered (data may be lost in low power modes).
Configuration Options
*********************
Related configuration options:
* :kconfig:option:`CONFIG_RETAINED_MEM`
* :kconfig:option:`CONFIG_RETAINED_MEM_INIT_PRIORITY`
* :kconfig:option:`CONFIG_RETAINED_MEM_MUTEX_FORCE_DISABLE`
Mutex protection
****************
Mutex protection of retained memory drivers is enabled by default when
applications are compiled with multithreading support. This means that
different threads can safely call the retained memory functions without
clashing with other concurrent thread function usage, but means that retained
memory functions cannot be used from ISRs. It is possible to disable mutex
protection globally on all retained memory drivers by enabling
:kconfig:option:`CONFIG_RETAINED_MEM_MUTEX_FORCE_DISABLE` - users are then
responsible for ensuring that the function calls do not conflict with each
other.
API Reference
*************
.. doxygengroup:: retained_mem_interface
Part 3
한국어 전문 번역
Overview
Retained memory driver API는 device에 power가 공급되는 동안 내용이 유지되는 memory area를 읽고 쓰는 방법을 제공합니다. 다만 low-power mode에서는 data가 손실될 수 있습니다.
Configuration Options
관련 configuration option은 다음과 같습니다.
CONFIG_RETAINED_MEMCONFIG_RETAINED_MEM_INIT_PRIORITYCONFIG_RETAINED_MEM_MUTEX_FORCE_DISABLE
Mutex protection
Application을 multithreading support와 함께 compile하면 retained memory driver의 mutex protection이 기본으로 enable됩니다. 따라서 서로 다른 thread가 retained memory function을 동시에 호출해도 충돌하지 않지만, ISR에서는 이 function을 사용할 수 없습니다.
CONFIG_RETAINED_MEM_MUTEX_FORCE_DISABLE을 enable하면 모든 retained memory driver의 mutex protection을 전역으로 disable할 수 있습니다. 이 경우 function call이 서로 충돌하지 않도록 보장할 책임은 사용자에게 있습니다.
API Reference
retained_mem_interface Doxygen group이 retained memory interface의 공식 API reference를 제공합니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.