summaryrefslogtreecommitdiff
path: root/hid/src/ps2/keymap.h.mako
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-11-12 21:03:28 +0300
committerDevaev Maxim <[email protected]>2020-11-12 21:03:28 +0300
commit87cc8cf7b0e00f7f0a9badf551067aafad6da4ce (patch)
treecdd802d124236ded6969dc5d80c764deec357e02 /hid/src/ps2/keymap.h.mako
parent79ef26e2f441f6c742a5da78b08ea2d5a4cc6e18 (diff)
parent0984f0cb36c5881669010c62e986cc8bc7fe019a (diff)
Merge branch 'spi'
Diffstat (limited to 'hid/src/ps2/keymap.h.mako')
-rw-r--r--hid/src/ps2/keymap.h.mako8
1 files changed, 3 insertions, 5 deletions
diff --git a/hid/src/ps2/keymap.h.mako b/hid/src/ps2/keymap.h.mako
index 70da2f36..bedb5fcc 100644
--- a/hid/src/ps2/keymap.h.mako
+++ b/hid/src/ps2/keymap.h.mako
@@ -22,8 +22,6 @@
#pragma once
-#include "../inline.h"
-
enum Ps2KeyType : uint8_t {
PS2_KEY_TYPE_UNKNOWN = 0,
@@ -34,13 +32,13 @@ enum Ps2KeyType : uint8_t {
};
<%! import operator %>
-INLINE void keymapPs2(uint8_t code, Ps2KeyType *ps2_type, uint8_t *ps2_code) {
+void keymapPs2(uint8_t code, Ps2KeyType *ps2_type, uint8_t *ps2_code) {
*ps2_type = PS2_KEY_TYPE_UNKNOWN;
*ps2_code = 0;
switch (code) {
-% for km in sorted(keymap, key=operator.attrgetter("serial_code")):
- case ${km.serial_code}: *ps2_type = PS2_KEY_TYPE_${km.ps2_key.type.upper()}; *ps2_code = ${km.ps2_key.code}; return; // ${km.arduino_name}
+% for km in sorted(keymap, key=operator.attrgetter("mcu_code")):
+ case ${km.mcu_code}: *ps2_type = PS2_KEY_TYPE_${km.ps2_key.type.upper()}; *ps2_code = ${km.ps2_key.code}; return; // ${km.arduino_name}
% endfor
}
}