summaryrefslogtreecommitdiff
path: root/board/host/board.c
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-07-11 16:06:18 +0800
committerChromeBot <chrome-bot@google.com>2013-07-11 22:32:52 -0700
commit786437229728ffeeda19d533941d813f74ba9441 (patch)
tree0e16373408829ea410467a87fd04628fb12c14d3 /board/host/board.c
parent2475cce9ad0e505a45562189e5427683d4ebd65c (diff)
downloadchrome-ec-786437229728ffeeda19d533941d813f74ba9441.tar.gz
Add extpower-gpio unit test
This tests host event and hook are triggered when AC status changes. BUG=chrome-os-partner:19236 TEST=Pass the test. BRANCH=None Change-Id: I9e4263f3f6e273bfb0b24671a4e5c56b20a04e1a Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/61554 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board/host/board.c')
-rw-r--r--board/host/board.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/board/host/board.c b/board/host/board.c
index bb3f3a1821..609d29bb84 100644
--- a/board/host/board.c
+++ b/board/host/board.c
@@ -8,12 +8,15 @@
#include "gpio.h"
#include "temp_sensor.h"
+#define MOCK_GPIO(x) {#x, 0, 0, 0, 0}
+
const struct gpio_info gpio_list[GPIO_COUNT] = {
- {"EC_INT", 0, 0, 0, 0},
- {"LID_OPEN", 0, 0, 0, 0},
- {"POWER_BUTTON_L", 0, 0, 0, 0},
- {"WP", 0, 0, 0, 0},
- {"ENTERING_RW", 0, 0, 0, 0},
+ MOCK_GPIO(EC_INT),
+ MOCK_GPIO(LID_OPEN),
+ MOCK_GPIO(POWER_BUTTON_L),
+ MOCK_GPIO(WP),
+ MOCK_GPIO(ENTERING_RW),
+ MOCK_GPIO(AC_PRESENT),
};
static int dummy_temp_get_val(int idx, int *temp_ptr)