Part 1
요약·해설
Experimental API의 single/batch property operation과 no-cache 계약을 다룹니다.
temperature · current · voltage
ship · shelf · sleep
explicitly none
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
B43D91446662E2870CDF727187E5D1ECF2F81E2714D5193F9D7E14F057486CE4
.. _fuel_gauge_api:
Fuel Gauge
##########
The fuel gauge subsystem exposes an API to uniformly access battery fuel gauge devices. Currently,
only reading data is supported.
Note: This API is currently experimental and this doc will be significantly changed as new features
are added to the API.
Basic Operation
***************
Properties
==========
Fundamentally, a property is a quantity that a fuel gauge device can measure.
Fuel gauges typically support multiple properties, such as temperature readings of the battery-pack
or present-time current/voltage.
Properties are fetched by the client one at a time using :c:func:`fuel_gauge_get_prop`, or fetched
in a batch using :c:func:`fuel_gauge_get_props`.
Properties are set by the client one at a time using :c:func:`fuel_gauge_set_prop`, or set in a
batch using :c:func:`fuel_gauge_set_props`.
Battery Cutoff
==============
Many fuel gauges embedded within battery packs expose a register address that when written to with a
specific payload will do a battery cutoff. This battery cutoff is often referred to as ship, shelf,
or sleep mode due to its utility in reducing battery drain while devices are stored or shipped.
The fuel gauge API exposes battery cutoff with the :c:func:`fuel_gauge_battery_cutoff` function.
Caching
=======
The Fuel Gauge API explicitly provides no caching for its clients.
.. _fuel_gauge_api_reference:
API Reference
*************
.. doxygengroup:: fuel_gauge_interface
.. doxygengroup:: fuel_gauge_emulator_backend
Part 3
한국어 전문 번역
Fuel gauge subsystem은 battery fuel gauge device에 일관된 방식으로 접근하는 API를 제공합니다. 현재는 data 읽기만 지원합니다.
이 API는 현재 experimental 상태이며 새 기능이 추가되면 이 문서도 크게 바뀔 예정입니다.
기본 동작
Property
Property는 fuel gauge device가 측정할 수 있는 quantity입니다. Fuel gauge는 보통 battery-pack temperature, 현재 current·voltage 같은 여러 property를 지원합니다.
fuel_gauge_get_prop()으로 한 번에 하나를 가져오거나 fuel_gauge_get_props()로 batch 조회할 수 있습니다.
fuel_gauge_set_prop()으로 한 번에 하나를 설정하거나 fuel_gauge_set_props()로 batch 설정합니다.
Battery cutoff
Battery pack 내부의 많은 fuel gauge는 특정 payload를 register address에 쓰면 battery cutoff를 수행합니다. 보관·운송 중 battery drain을 줄이는 데 쓰이므로 ship, shelf, sleep mode라고도 부릅니다.
fuel_gauge_battery_cutoff() 함수가 battery cutoff를 노출합니다.
Caching
Fuel Gauge API는 client를 위한 caching을 명시적으로 제공하지 않습니다.
API reference
fuel_gauge_interface와 fuel_gauge_emulator_backend Doxygen group이 fuel gauge interface와 emulator backend의 공식 API reference를 제공합니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.