summaryrefslogtreecommitdiff
path: root/chip/stm32/keyboard_raw.c
Commit message (Collapse)AuthorAgeFilesLines
* Keyboard: Allow keyboard size to be set at run timeDaisuke Nojiri2018-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Currently, the keyboard size (i.e. number of columns) is static. This patch allows it to be configured at run time. It's required to support a keyboard with/without keypad in a single image. KEYBOARD_COLS_MAX has the build time col size. It's used to allocate exact spaces for arrays. Actual keyboard scanning is done using keyboard_cols, which holds a runtime col size. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b:117126568 BRANCH=none TEST=Verify keyboard functionality on Sona and Veyron. Change-Id: I4b3552be0b4b315c3fe5a6884cf25e10aba8be7c Reviewed-on: https://chromium-review.googlesource.com/1285292 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
* stm32: invert keyboard col2 optionChris Zhong2014-10-021-0/+7
| | | | | | | | | | | | | Silego variant in pinky rev2 require the signal to be inverted. BUG=None TEST=on pinky-rev2: all keys from col2 work correctly BRANCH=None Change-Id: I83a029b4e9c6b4770e83f30b170595d45ea40cca Signed-off-by: Chris Zhong <zyw@rock-chips.com> Signed-off-by: Alexandru M Stan <amstan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/220314
* Remove _OFF from GPIO register macrosRandall Spangler2013-04-161-2/+2
| | | | | | | | | | | | | | | | | | | This is left over from when we had a pair of macros for each GPIO register, one which concatenated its base address name and one which took a base address. Only the latter has survived, but its naming is longer than it needs to be and isn't consistent with other register banks (USART, TIM, etc.). No code changes, just renaming macros. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms Change-Id: I15a282fd01db2a25219970e28ce551d8dc80193f Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/48226 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Fix kb_deghost testVic Yang2013-04-111-2/+2
| | | | | | | | | | BUG=chrome-os-partner:18598 TEST=Run test on Spring BRANCH=none Change-Id: Ia95ba6144dbdac0ffe77f6aef9c4ed948de181d8 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47841
* Move keyboard dimension and key constants to keyboard_config.hRandall Spangler2013-03-221-3/+4
| | | | | | | | | | | | | | These were previously duplicated between multiple keyboard_scan.c and board.c files, and there were a bunch of different constants #defined to be 13. BUG=chrome-os-partner:18360 BRANCH=none TEST=compile all boards; test keyboard on spring and link Change-Id: I91bf9d56d2a56ff25ff307ff10883ca87b6937e5 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/46165
* Add keyboard_raw interfaceRandall Spangler2013-03-221-0/+135
This is the low-level platform-dependent interface to drive keyboard columns, read rows, and handle keyboard interrupts. Both lm4 and stm32 had something like this before, but the interfaces weren't fully explicit or compatible. BUG=chrome-os-partner:18360 BRANCH=none TEST=manual - Build all platforms. - Boot system and test typing on keyboard. - Hold power+refresh+esc to test boot key detection; should go to recovery. Change-Id: Ie3bcc1d066a4da5204f0e236daeb52c4064a6213 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/46156