pico hid refactoring

This commit is contained in:
Maxim Devaev 2023-08-14 14:42:54 +03:00
parent 69163ccfb1
commit f9ab76b247
5 changed files with 9 additions and 5 deletions

View File

@ -20,6 +20,8 @@
# ========================================================================= */ # ========================================================================= */
#pragma once
#include "ph_types.h" #include "ph_types.h"

View File

@ -20,6 +20,8 @@
*****************************************************************************/ *****************************************************************************/
#pragma once
#include "ph_types.h" #include "ph_types.h"

View File

@ -26,9 +26,9 @@
#include "ph_outputs.h" #include "ph_outputs.h"
u8 ph_g_ps2_kbd_leds; u8 ph_g_ps2_kbd_leds = 0;
bool ph_g_ps2_kbd_online; bool ph_g_ps2_kbd_online = 0;
bool ph_g_ps2_mouse_online; bool ph_g_ps2_mouse_online = 0;
void ph_ps2_init(void) { void ph_ps2_init(void) {

View File

@ -25,7 +25,7 @@
#include "ph_types.h" #include "ph_types.h"
u8 ph_usb_keymap(u8 key) { inline u8 ph_usb_keymap(u8 key) {
switch (key) { switch (key) {
case 1: return 4; // KeyA case 1: return 4; // KeyA
case 2: return 5; // KeyB case 2: return 5; // KeyB

View File

@ -25,7 +25,7 @@
#include "ph_types.h" #include "ph_types.h"
<%! import operator %> <%! import operator %>
u8 ph_usb_keymap(u8 key) { inline u8 ph_usb_keymap(u8 key) {
switch (key) { switch (key) {
% for km in sorted(keymap, key=operator.attrgetter("mcu_code")): % for km in sorted(keymap, key=operator.attrgetter("mcu_code")):
% if km.usb_key.is_modifier: % if km.usb_key.is_modifier: