diff options
author | David Hendricks <dhendrix@chromium.org> | 2012-02-14 18:41:52 -0800 |
---|---|---|
committer | David Hendricks <dhendrix@chromium.org> | 2012-02-17 20:30:07 -0800 |
commit | a3d621f1b2ae63518ebb1fb273ad0ef9fed6ab09 (patch) | |
tree | e935efa28b18080cd382b821dd3625292a9b8717 /board/discovery/board.h | |
parent | ad7a0d5ae67cd73fe11c92c1964496455490f2c9 (diff) | |
download | chrome-ec-a3d621f1b2ae63518ebb1fb273ad0ef9fed6ab09.tar.gz |
Add keyboard_scan for STM32
This loosely ports the LM4 keyboard_scan code to STM32
Notable differences:
- Keyboard GPIO layout is spread across multiple ports and is not
contiguous in many places. Because of this, bitmasks are mostly
generated on-the-fly instead of hard coded (IO is kept to a minimum)
- Longer timeout when scanning columns (100us versus 20us)
Also, some functions are stubbed out currently since they rely on
other bits being implemented:
- keyboard_state_changed()
- keyboard_has_char()
- keyboard_put_char()
BUG=none
TEST=Tested on STM32L-Discovery (monitoring keystrokes via UART)
Change-Id: I84985879589e70688b2b29b288ab17037f7668b2
Diffstat (limited to 'board/discovery/board.h')
-rw-r--r-- | board/discovery/board.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/board/discovery/board.h b/board/discovery/board.h index 69cc237d62..12eeaf5246 100644 --- a/board/discovery/board.h +++ b/board/discovery/board.h @@ -23,6 +23,15 @@ enum gpio_signal { /* Inputs with interrupt handlers are first for efficiency */ GPIO_USER_BUTTON = 0, /* Blue user button */ + /* Keyboard inputs */ + KB_COL00, + KB_COL01, + KB_COL02, + KB_COL03, + KB_COL04, + KB_COL05, + KB_COL06, + KB_COL07, /* Other inputs */ /* Outputs */ GPIO_BLUE_LED, /* Blue debug LED */ @@ -34,4 +43,6 @@ enum gpio_signal { void configure_board(void); +void matrix_interrupt(enum gpio_signal signal); + #endif /* __BOARD_H */ |