summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@google.com>2017-01-14 17:33:02 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-01-20 00:05:06 -0800
commit90ae18655c01e880563add1c761193316a633034 (patch)
tree9860d1d35c8122406291eec6e479adb5be5bbb63 /test
parenta1064d997902b567303e1eb6be5780baa4c0d4ae (diff)
downloadchrome-ec-90ae18655c01e880563add1c761193316a633034.tar.gz
button: Check volume up/down status and set recovery mode
Add support for entering recovery mode using volume up/down keys. BRANCH=none BUG=chrome-os-partner:61930 TEST=Press Power+Volume Up+Volume Down, poppy enters recovery Change-Id: Id40a144e9b430cfb9dfd47048e9e96d598bc3db8 Reviewed-on: https://chromium-review.googlesource.com/428530 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/button.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/button.c b/test/button.c
index 5f18effb0c..2e8511df98 100644
--- a/test/button.c
+++ b/test/button.c
@@ -140,7 +140,7 @@ static int test_button_press_both(void)
return EC_SUCCESS;
}
-static void button_init(void)
+static void button_test_init(void)
{
int i;
@@ -159,21 +159,23 @@ void run_test(void)
test_reset();
button_init();
+
+ button_test_init();
RUN_TEST(test_button_press);
- button_init();
+ button_test_init();
RUN_TEST(test_button_release);
- button_init();
+ button_test_init();
RUN_TEST(test_button_debounce_short_press);
- button_init();
+ button_test_init();
RUN_TEST(test_button_debounce_short_bounce);
- button_init();
+ button_test_init();
RUN_TEST(test_button_debounce_stability);
- button_init();
+ button_test_init();
RUN_TEST(test_button_press_both);
test_print_result();