diff options
author | David Hendricks <dhendrix@chromium.org> | 2013-03-08 14:33:47 -0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-03-11 22:08:56 -0700 |
commit | f5f30a22c676f1450052cd7d9451ff650818ba3f (patch) | |
tree | 20486d927ca57bf0000e132d976fb49a9657e8a7 | |
parent | 0631409955501ac58bb1d039448247da72332238 (diff) | |
download | chrome-ec-f5f30a22c676f1450052cd7d9451ff650818ba3f.tar.gz |
stm32: Move KB_INPUTS to board.h
This moves KB_INPUTS from keyboard_scan.c to board.h where KB_OUTPUTS
is #defined. Although we use the same 13x8 keyboard matrix on all
platforms, KB_OUTPUTS is defined on a per-board basis due to its usage
in keyboard_test.
BUG=none
BRANCH=none
TEST=locally compiled
Change-Id: I0d66705d2959c7824b96cc8aae55368eca39a21a
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/44970
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | board/daisy/board.h | 3 | ||||
-rw-r--r-- | board/snow/board.h | 3 | ||||
-rw-r--r-- | board/spring/board.h | 3 | ||||
-rw-r--r-- | chip/stm32/keyboard_scan.c | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/board/daisy/board.h b/board/daisy/board.h index da85579d7d..3194a2de70 100644 --- a/board/daisy/board.h +++ b/board/daisy/board.h @@ -35,7 +35,8 @@ #define USB_CHARGE_PORT_COUNT 0 -/* EC drives 13 outputs to keyboard matrix */ +/* EC drives 13 outputs to the keyboard matrix and reads 8 inputs/interrupts */ +#define KB_INPUTS 8 #define KB_OUTPUTS 13 /* Charging */ diff --git a/board/snow/board.h b/board/snow/board.h index 072b5ec40e..27837b665a 100644 --- a/board/snow/board.h +++ b/board/snow/board.h @@ -38,7 +38,8 @@ #define USB_CHARGE_PORT_COUNT 0 -/* EC drives 13 outputs to keyboard matrix */ +/* EC drives 13 outputs to the keyboard matrix and reads 8 inputs/interrupts */ +#define KB_INPUTS 8 #define KB_OUTPUTS 13 /* Charging */ diff --git a/board/spring/board.h b/board/spring/board.h index 836e175e5a..cc1b675141 100644 --- a/board/spring/board.h +++ b/board/spring/board.h @@ -41,7 +41,8 @@ /* By default, enable all console messages except keyboard */ #define CC_DEFAULT (CC_ALL & ~CC_MASK(CC_KEYSCAN)) -/* EC drives 13 outputs to keyboard matrix */ +/* EC drives 13 outputs to the keyboard matrix and reads 8 inputs/interrupts */ +#define KB_INPUTS 8 #define KB_OUTPUTS 13 /* Charging */ diff --git a/chip/stm32/keyboard_scan.c b/chip/stm32/keyboard_scan.c index 9b9b4f0bc0..8fc92edfb8 100644 --- a/chip/stm32/keyboard_scan.c +++ b/chip/stm32/keyboard_scan.c @@ -32,8 +32,6 @@ enum { /* 0 ~ 12 for the corresponding output */ }; -#define KB_INPUTS 8 - /* Mask of external interrupts on input lines */ static unsigned int irq_mask; |