diff options
Diffstat (limited to 'hid/pico')
-rw-r--r-- | hid/pico/src/ph_cmds.h | 2 | ||||
-rw-r--r-- | hid/pico/src/ph_debug.h | 2 | ||||
-rw-r--r-- | hid/pico/src/ph_ps2.c | 6 | ||||
-rw-r--r-- | hid/pico/src/ph_usb_keymap.h | 2 | ||||
-rw-r--r-- | hid/pico/src/ph_usb_keymap.h.mako | 2 |
5 files changed, 9 insertions, 5 deletions
diff --git a/hid/pico/src/ph_cmds.h b/hid/pico/src/ph_cmds.h index 549b65e3..bfb820c5 100644 --- a/hid/pico/src/ph_cmds.h +++ b/hid/pico/src/ph_cmds.h @@ -20,6 +20,8 @@ # ========================================================================= */ +#pragma once + #include "ph_types.h" diff --git a/hid/pico/src/ph_debug.h b/hid/pico/src/ph_debug.h index 32dcd691..db7ef31d 100644 --- a/hid/pico/src/ph_debug.h +++ b/hid/pico/src/ph_debug.h @@ -20,6 +20,8 @@ *****************************************************************************/ +#pragma once + #include "ph_types.h" diff --git a/hid/pico/src/ph_ps2.c b/hid/pico/src/ph_ps2.c index 03fbe9b7..60723a1c 100644 --- a/hid/pico/src/ph_ps2.c +++ b/hid/pico/src/ph_ps2.c @@ -26,9 +26,9 @@ #include "ph_outputs.h" -u8 ph_g_ps2_kbd_leds; -bool ph_g_ps2_kbd_online; -bool ph_g_ps2_mouse_online; +u8 ph_g_ps2_kbd_leds = 0; +bool ph_g_ps2_kbd_online = 0; +bool ph_g_ps2_mouse_online = 0; void ph_ps2_init(void) { diff --git a/hid/pico/src/ph_usb_keymap.h b/hid/pico/src/ph_usb_keymap.h index e33bbd08..951949ae 100644 --- a/hid/pico/src/ph_usb_keymap.h +++ b/hid/pico/src/ph_usb_keymap.h @@ -25,7 +25,7 @@ #include "ph_types.h" -u8 ph_usb_keymap(u8 key) { +inline u8 ph_usb_keymap(u8 key) { switch (key) { case 1: return 4; // KeyA case 2: return 5; // KeyB diff --git a/hid/pico/src/ph_usb_keymap.h.mako b/hid/pico/src/ph_usb_keymap.h.mako index b90e8970..dd156fed 100644 --- a/hid/pico/src/ph_usb_keymap.h.mako +++ b/hid/pico/src/ph_usb_keymap.h.mako @@ -25,7 +25,7 @@ #include "ph_types.h" <%! import operator %> -u8 ph_usb_keymap(u8 key) { +inline u8 ph_usb_keymap(u8 key) { switch (key) { % for km in sorted(keymap, key=operator.attrgetter("mcu_code")): % if km.usb_key.is_modifier: |