logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git
commit: 1513966c3844df9303e2222e32824f3823e11d27
parent 4a7fdda668af7c1c63e80c7da172b0b275dd4cbe
Author: Joel Challis <git@zvecr.com>
Date:   Fri, 19 Apr 2024 02:18:51 +0100

Tidy use of raw hid within keyboards (#23557)


Diffstat:

Mkeyboards/dp60/dp60.c24------------------------
Mkeyboards/dp60/keymaps/via/keymap.c20++++++++++++++++++++
Mkeyboards/evyd13/plain60/keymaps/rgb/rules.mk2--
Mkeyboards/hs60/v1/keyboard.json3+--
Mkeyboards/hs60/v1/rules.mk4----
Mkeyboards/hs60/v1/v1.c74--------------------------------------------------------------------------
Mkeyboards/keychron/q6/iso/rules.mk1-
Mkeyboards/keychron/q6/iso_encoder/rules.mk1-
Mkeyboards/massdrop/alt/rules.mk1-
Mkeyboards/massdrop/ctrl/rules.mk1-
Mkeyboards/rocketboard_16/rules.mk2--
11 files changed, 21 insertions(+), 112 deletions(-)

diff --git a/keyboards/dp60/dp60.c b/keyboards/dp60/dp60.c @@ -172,27 +172,3 @@ webusb_pos_t webusb_keymap[] = { {4, 0}, {4, 1}, {4, 2}, {4, 6}, {4, 10}, {4, 11}, {4, 12}, {4, 13}, }; #endif - -#ifndef RAW_ENABLE -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { -#else -bool process_record_user(uint16_t keycode, keyrecord_t *record) { -#endif - if (record->event.pressed) { - switch(keycode) { - #ifdef RGBLIGHT_ENABLE - #ifdef RGB_MATRIX_ENABLE - case KC_F13: // toggle rgb matrix - rgb_matrix_toggle(); - return false; - case KC_F14: - rgb_matrix_step(); - return false; - #endif - #endif - default: - break; - } - } - return true; -} diff --git a/keyboards/dp60/keymaps/via/keymap.c b/keyboards/dp60/keymaps/via/keymap.c @@ -44,3 +44,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______, _______,_______,_______,_______) }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + #ifdef RGBLIGHT_ENABLE + #ifdef RGB_MATRIX_ENABLE + case KC_F13: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case KC_F14: + rgb_matrix_step(); + return false; + #endif + #endif + default: + break; + } + } + return true; +} diff --git a/keyboards/evyd13/plain60/keymaps/rgb/rules.mk b/keyboards/evyd13/plain60/keymaps/rgb/rules.mk @@ -1,3 +1 @@ RGBLIGHT_ENABLE = yes -RAW_ENABLE = no -DYNAMIC_KEYMAP_ENABLE = no diff --git a/keyboards/hs60/v1/keyboard.json b/keyboards/hs60/v1/keyboard.json @@ -73,8 +73,7 @@ "mousekey": false, "extrakey": true, "nkro": true, - "rgb_matrix": true, - "raw": true + "rgb_matrix": true }, "community_layouts": ["60_ansi", "60_iso"], "layouts": { diff --git a/keyboards/hs60/v1/rules.mk b/keyboards/hs60/v1/rules.mk @@ -2,7 +2,3 @@ # when we get USB suspend event. We want it to keep updating # backlight effects. OPT_DEFS += -DNO_SUSPEND_POWER_DOWN - -# Experimental features for zealcmd please do no enable -#RAW_ENABLE = yes -#USE_KEYMAPS_IN_EEPROM = yes diff --git a/keyboards/hs60/v1/v1.c b/keyboards/hs60/v1/v1.c @@ -15,80 +15,6 @@ */ #include "quantum.h" -// Please ignore this is for upcoming features -/*#ifdef RAW_ENABLE - -void raw_hid_receive( uint8_t *data, uint8_t length ) -{ - uint8_t command = data[0]; - switch ( command ) - { - case id_protocol_version: - { - msg_protocol_version *msg = (msg_protocol_version*)&data[1]; - msg->version = PROTOCOL_VERSION; - break; - } -#if USE_KEYMAPS_IN_EEPROM - case id_keymap_keycode_load: - { - msg_keymap_keycode_load *msg = (msg_keymap_keycode_load*)&data[1]; - msg->keycode = keymap_keycode_load( msg->layer, msg->row, msg->column ); - break; - } - case id_keymap_keycode_save: - { - msg_keymap_keycode_save *msg = (msg_keymap_keycode_save*)&data[1]; - keymap_keycode_save( msg->layer, msg->row, msg->column, msg->keycode); - break; - } - case id_keymap_default_save: - { - keymap_default_save(); - break; - } -#endif // USE_KEYMAPS_IN_EEPROM - case id_backlight_config_set_values: - { - msg_backlight_config_set_values *msg = (msg_backlight_config_set_values*)&data[1]; - backlight_config_set_values(msg); - backlight_config_save(); - break; - } - case id_backlight_config_set_alphas_mods: - { - msg_backlight_config_set_alphas_mods *msg = (msg_backlight_config_set_alphas_mods*)&data[1]; - backlight_config_set_alphas_mods( msg->alphas_mods ); - backlight_config_save(); - break; - } - case id_backlight_set_key_color: - { - msg_backlight_set_key_color *msg = (msg_backlight_set_key_color*)&data[1]; - backlight_set_key_color(msg->row, msg->column, msg->hsv); - break; - } - case id_system_get_state: - { - msg_system_state *msg = (msg_system_state*)&data[1]; - msg->value = backlight_get_tick(); - break; - } - default: - { - // Unhandled message. - data[0] = id_unhandled; - break; - } - } - - // Return same buffer with values changed - raw_hid_send( data, length ); - -} - -#endif*/ - #ifdef HS60_ANSI const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = { diff --git a/keyboards/keychron/q6/iso/rules.mk b/keyboards/keychron/q6/iso/rules.mk @@ -12,7 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output DIP_SWITCH_ENABLE = yes RGB_MATRIX_ENABLE = yes -RAW_ENABLE = yes LTO_ENABLE = yes # custom matrix setup diff --git a/keyboards/keychron/q6/iso_encoder/rules.mk b/keyboards/keychron/q6/iso_encoder/rules.mk @@ -13,7 +13,6 @@ AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes # Enable Encoder DIP_SWITCH_ENABLE = yes RGB_MATRIX_ENABLE = yes -RAW_ENABLE = yes LTO_ENABLE = yes # custom matrix setup diff --git a/keyboards/massdrop/alt/rules.mk b/keyboards/massdrop/alt/rules.mk @@ -21,7 +21,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output VIRTSER_ENABLE = no # USB Serial Driver -RAW_ENABLE = no # Raw device AUTO_SHIFT_ENABLE = no # Auto Shift # Custom RGB matrix handling diff --git a/keyboards/massdrop/ctrl/rules.mk b/keyboards/massdrop/ctrl/rules.mk @@ -21,7 +21,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output VIRTSER_ENABLE = no # USB Serial Driver -RAW_ENABLE = no # Raw device AUTO_SHIFT_ENABLE = no # Auto Shift # Custom RGB matrix handling diff --git a/keyboards/rocketboard_16/rules.mk b/keyboards/rocketboard_16/rules.mk @@ -3,5 +3,3 @@ MCU_LDSCRIPT = STM32F103xB # Extra include SRC += keycode_lookup.c - -RAW_ENABLE = yes # Enables HID RAW communication between the board and the PC