mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-13 03:15:06 +00:00
540601885f0cd3c7be6d55c29b9f2eb22458079d
If the base ADC value does not clearly indicate attach, reverse
attach, or disconnect, read the ADC value again in 500ms.
This time should be long enough that even if the ADC value is
wrong, it would not use an inconsiderate amount of power.
BRANCH=none
BUG=b:67970530
TEST=Connect 6K and 30K resistors in parallel between DET and GND
pin, EC detects an unclear 27 mV ADC value, and retries
every 500ms until the 6K resistor is removed and a clear
attach value is read (154 mV).
TEST=Connect base in reverse, ADC value is around 475 mV, and
ADC is not polled again.
TEST=Disconnect base, ADC value is at maximum (2816 mV), and ADC
is not polled again.
Change-Id: I616114afc683608b853c18d0a081c6cd1e150c75
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/727790
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
For an overview of the Embedded Controller firmware, refer to http://www.chromium.org/chromium-os/2014-firmware-summit For instructions on building from source, refer to http://www.chromium.org/chromium-os/ec-development/getting-started-building-ec-images-quickly
Description
Languages
C
64.7%
Lasso
20.7%
ASL
3.6%
JavaScript
3.2%
C#
2.9%
Other
4.6%