~ruther/qmk_firmware

1513966c3844df9303e2222e32824f3823e11d27 — Joel Challis 1 year, 8 days ago 4a7fdda
Tidy use of raw hid within keyboards (#23557)

M keyboards/dp60/dp60.c => keyboards/dp60/dp60.c +0 -24
@@ 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;
}

M keyboards/dp60/keymaps/via/keymap.c => keyboards/dp60/keymaps/via/keymap.c +20 -0
@@ 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;
}

M keyboards/evyd13/plain60/keymaps/rgb/rules.mk => keyboards/evyd13/plain60/keymaps/rgb/rules.mk +0 -2
@@ 1,3 1,1 @@
RGBLIGHT_ENABLE = yes
RAW_ENABLE = no
DYNAMIC_KEYMAP_ENABLE = no

M keyboards/hs60/v1/keyboard.json => keyboards/hs60/v1/keyboard.json +1 -2
@@ 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": {

M keyboards/hs60/v1/rules.mk => keyboards/hs60/v1/rules.mk +0 -4
@@ 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

M keyboards/hs60/v1/v1.c => keyboards/hs60/v1/v1.c +0 -74
@@ 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] = {

M keyboards/keychron/q6/iso/rules.mk => keyboards/keychron/q6/iso/rules.mk +0 -1
@@ 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

M keyboards/keychron/q6/iso_encoder/rules.mk => keyboards/keychron/q6/iso_encoder/rules.mk +0 -1
@@ 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

M keyboards/massdrop/alt/rules.mk => keyboards/massdrop/alt/rules.mk +0 -1
@@ 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

M keyboards/massdrop/ctrl/rules.mk => keyboards/massdrop/ctrl/rules.mk +0 -1
@@ 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

M keyboards/rocketboard_16/rules.mk => keyboards/rocketboard_16/rules.mk +0 -2
@@ 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

Do not follow this link