summaryrefslogtreecommitdiff
path: root/board/mithrax/keyboard_customization.h
diff options
context:
space:
mode:
authorFiras Sammoura <fsammoura@google.com>2022-06-17 16:40:54 +0000
committerFiras Sammoura <fsammoura@google.com>2022-06-17 16:40:54 +0000
commite5fb0b9ba488614b5684e640530f00821ab7b943 (patch)
tree9a15b4a98d7987870a1805a33883d0cf9123fc05 /board/mithrax/keyboard_customization.h
parentad46fafb27c419bd416bfecc76df6c6426a99b32 (diff)
parenta46d3f3feaac0d69012f61b66f652bff991d05a7 (diff)
downloadchrome-ec-e5fb0b9ba488614b5684e640530f00821ab7b943.tar.gz
Merge remote-tracking branch cros/main into firmware-fpmcu-bloonchipper-release
Generated by: ./util/update_release_branch.py --board bloonchipper --relevant_paths_file ./util/fingerprint-relevant-paths.txt firmware-fpmcu-bloonchipper-release Relevant changes: git log --oneline ad46fafb27..a46d3f3fea -- board/hatch_fp board/bloonchipper common/fpsensor docs/fingerprint driver/fingerprint util/getversion.sh 981fb88cf8 docs/fingerprint: Resolve contradictory FPMCU factory flashing instructions 38ef6b7306 tree: Files should end with single newline 60032a8828 docs/fingerprint: Clean up formatting in fingerprint-factory-quick-guide.md f49eb6f894 docs/fingerprint: Run mdformat 64aa5fc7bb docs/fingerprint: Add links to info on fuzz testing 8bd99cc434 fpsensor: Use correct return type 2b2d7a991d fpsensor: Use correct return type BRANCH=None BUG=b:234772776 b:234181908 b:172020503 b:234181908 TEST=`make -j buildall` Cq-Include-Trybots: chromeos/cq:cq-orchestrator Signed-off-by: Firas Sammoura <fsammoura@google.com> Change-Id: I18b58de542c8b439d0f9327a7d4f0ec897da080f
Diffstat (limited to 'board/mithrax/keyboard_customization.h')
-rw-r--r--board/mithrax/keyboard_customization.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/board/mithrax/keyboard_customization.h b/board/mithrax/keyboard_customization.h
new file mode 100644
index 0000000000..b177a11eb4
--- /dev/null
+++ b/board/mithrax/keyboard_customization.h
@@ -0,0 +1,73 @@
+/* Copyright 2022 The ChromiumOS Authors.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Keyboard configuration */
+
+#ifndef __KEYBOARD_CUSTOMIZATION_H
+#define __KEYBOARD_CUSTOMIZATION_H
+
+/*
+ * KEYBOARD_COLS_MAX has the build time column size. It's used to allocate
+ * exact spaces for arrays. Actual keyboard scanning is done using
+ * keyboard_cols, which holds a runtime column size.
+ */
+#define KEYBOARD_COLS_MAX 15
+#define KEYBOARD_ROWS 8
+
+/*
+ * WARNING: Do not directly modify it. You should call keyboard_raw_set_cols,
+ * instead. It checks whether you're eligible or not.
+ */
+extern uint8_t keyboard_cols;
+
+#define KEYBOARD_ROW_TO_MASK(r) (1 << (r))
+
+/* Columns and masks for keys we particularly care about */
+#define KEYBOARD_COL_DOWN 11
+#define KEYBOARD_ROW_DOWN 5
+#define KEYBOARD_MASK_DOWN KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_DOWN)
+#define KEYBOARD_COL_ESC 1
+#define KEYBOARD_ROW_ESC 1
+#define KEYBOARD_MASK_ESC KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_ESC)
+#define KEYBOARD_COL_KEY_H 6
+#define KEYBOARD_ROW_KEY_H 1
+#define KEYBOARD_MASK_KEY_H KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_KEY_H)
+#define KEYBOARD_COL_KEY_R 3
+#define KEYBOARD_ROW_KEY_R 7
+#define KEYBOARD_MASK_KEY_R KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_KEY_R)
+#define KEYBOARD_COL_LEFT_ALT 10
+#define KEYBOARD_ROW_LEFT_ALT 6
+#define KEYBOARD_MASK_LEFT_ALT KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_LEFT_ALT)
+#define KEYBOARD_COL_REFRESH 2
+#define KEYBOARD_ROW_REFRESH 3
+#define KEYBOARD_MASK_REFRESH KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_REFRESH)
+#define KEYBOARD_COL_RIGHT_ALT 10
+#define KEYBOARD_ROW_RIGHT_ALT 0
+#define KEYBOARD_MASK_RIGHT_ALT KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_RIGHT_ALT)
+#define KEYBOARD_DEFAULT_COL_VOL_UP 4
+#define KEYBOARD_DEFAULT_ROW_VOL_UP 1
+#define KEYBOARD_COL_LEFT_CTRL 0
+#define KEYBOARD_ROW_LEFT_CTRL 2
+#define KEYBOARD_MASK_LEFT_CTRL KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_LEFT_CTRL)
+#define KEYBOARD_COL_RIGHT_CTRL 0
+#define KEYBOARD_ROW_RIGHT_CTRL 4
+#define KEYBOARD_MASK_RIGHT_CTRL KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_RIGHT_CTRL)
+#define KEYBOARD_COL_SEARCH 0
+#define KEYBOARD_ROW_SEARCH 3
+#define KEYBOARD_MASK_SEARCH KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_SEARCH)
+#define KEYBOARD_COL_KEY_0 9
+#define KEYBOARD_ROW_KEY_0 0
+#define KEYBOARD_MASK_KEY_0 KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_KEY_0)
+#define KEYBOARD_COL_KEY_1 1
+#define KEYBOARD_ROW_KEY_1 7
+#define KEYBOARD_MASK_KEY_1 KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_KEY_1)
+#define KEYBOARD_COL_KEY_2 4
+#define KEYBOARD_ROW_KEY_2 6
+#define KEYBOARD_MASK_KEY_2 KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_KEY_2)
+#define KEYBOARD_COL_LEFT_SHIFT 7
+#define KEYBOARD_ROW_LEFT_SHIFT 1
+#define KEYBOARD_MASK_LEFT_SHIFT KEYBOARD_ROW_TO_MASK(KEYBOARD_ROW_LEFT_SHIFT)
+
+#endif /* __KEYBOARD_CUSTOMIZATION_H */