summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBen Chen <ben.chen2@quanta.corp-partner.google.com>2020-09-25 16:54:54 +0800
committerCommit Bot <commit-bot@chromium.org>2020-09-29 22:58:54 +0000
commit133c6096ffd81cf5e7d62334ccc12d67e14e7830 (patch)
treebcba788b4c644fd9ed2125edb337bfaf70089319 /include
parentf366710eb8076fb45609ca4a3878cf6f7796c1e5 (diff)
downloadchrome-ec-133c6096ffd81cf5e7d62334ccc12d67e14e7830.tar.gz
button: presss volume button detected by adc
supports volume up/dwon pressed by adc buttons config BUG=b:167319238 BRANCH=master TEST=make buildall pass Change-Id: Ide3522b4af3c92df906bafb1f944f138a822280a Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431310 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/button.h14
-rw-r--r--include/config.h6
2 files changed, 20 insertions, 0 deletions
diff --git a/include/button.h b/include/button.h
index 381e650550..ec0a7afdc2 100644
--- a/include/button.h
+++ b/include/button.h
@@ -87,4 +87,18 @@ int button_disable_gpio(enum button button_type);
*/
void button_interrupt(enum gpio_signal signal);
+/*
+ * determined which buttons connected ADC
+ *
+ * @param signal Signal which triggered the interrupt.
+ */
+int button_is_adc_detected(enum gpio_signal gpio);
+
+/*
+ * distinct which buttons determined by ADC voltage
+ *
+ * @param signal Signal which triggered the interrupt.
+ */
+int adc_to_physical_value(enum gpio_signal gpio);
+
#endif /* __CROS_EC_BUTTON_H */
diff --git a/include/config.h b/include/config.h
index c80636f33d..0d5d10ac90 100644
--- a/include/config.h
+++ b/include/config.h
@@ -771,6 +771,12 @@
#undef CONFIG_VOLUME_BUTTONS
/*
+ * The board has volume up and volume down buttons, that are connected to ADC
+ * pins which pressed and released values are determined by the analog voltage
+ */
+#undef CONFIG_ADC_BUTTONS
+
+/*
* Allow runtime configuration of the buttons[] array
*/
#undef CONFIG_BUTTONS_RUNTIME_CONFIG