Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
QMK Bot 2024-12-09 06:32:41 +00:00
commit c7c91700b8
6 changed files with 364 additions and 0 deletions

View File

@ -0,0 +1,21 @@
/* Copyright 2024 lostdotfish
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define I2C_DRIVER I2CD0
#define I2C1_SDA_PIN GP12
#define I2C1_SCL_PIN GP13
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND

View File

@ -0,0 +1,141 @@
{
"manufacturer": "Lostdotfish",
"keyboard_name": "rp2040_orbweaver",
"maintainer": "Lostdotfish",
"url": "https://geekhack.org/index.php?topic=124092.0",
"bootloader": "rp2040",
"processor": "RP2040",
"usb": {
"device_version": "1.0.0",
"pid": "0x0000",
"vid": "0xFEED"
},
"diode_direction": "ROW2COL",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true
},
"rgb_matrix": {
"driver": "is31fl3731",
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
{"x": 20, "y": 0, "flags": 4},
{"matrix": [0, 1], "x": 40, "y": 0, "flags": 4},
{"matrix": [0, 2], "x": 60, "y": 0, "flags": 4},
{"matrix": [0, 3], "x": 80, "y": 0, "flags": 4},
{"matrix": [0, 4], "x": 0, "y": 20, "flags": 4},
{"matrix": [1, 0], "x": 20, "y": 20, "flags": 4},
{"matrix": [1, 1], "x": 40, "y": 20, "flags": 4},
{"matrix": [1, 2], "x": 60, "y": 20, "flags": 4},
{"matrix": [1, 3], "x": 80, "y": 20, "flags": 4},
{"matrix": [1, 4], "x": 0, "y": 40, "flags": 4},
{"matrix": [2, 0], "x": 20, "y": 40, "flags": 4},
{"matrix": [2, 1], "x": 40, "y": 40, "flags": 4},
{"matrix": [2, 2], "x": 60, "y": 40, "flags": 4},
{"matrix": [2, 3], "x": 80, "y": 40, "flags": 4},
{"matrix": [2, 4], "x": 0, "y": 60, "flags": 4},
{"matrix": [3, 0], "x": 20, "y": 60, "flags": 4},
{"matrix": [3, 1], "x": 40, "y": 60, "flags": 4},
{"matrix": [3, 2], "x": 60, "y": 60, "flags": 4},
{"matrix": [3, 4], "x": 80, "y": 60, "flags": 4}
],
"led_flush_limit": 26,
"led_process_limit": 5,
"max_brightness": 220,
"sleep": true,
"center_point": [40, 30],
"animations": {
"alphas_mods": true,
"gradient_up_down": true,
"gradient_left_right": true,
"breathing": true,
"band_sat": true,
"band_val": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"rainbow_moving_chevron": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"dual_beacon": true,
"rainbow_beacon": true,
"rainbow_pinwheels": true,
"flower_blooming": true,
"raindrops": true,
"jellybean_raindrops": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"pixel_fractal": true,
"pixel_flow": true,
"pixel_rain": true,
"typing_heatmap": true,
"digital_rain": true,
"solid_reactive_simple": true,
"solid_reactive": true,
"solid_reactive_wide": true,
"solid_reactive_multiwide": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_nexus": true,
"solid_reactive_multinexus": true,
"splash": true,
"multisplash": true,
"solid_splash": true,
"solid_multisplash": true,
"starlight": true,
"starlight_dual_sat": true,
"starlight_dual_hue": true,
"riverflow": true
}
},
"matrix_pins": {
"rows": ["GP0", "GP1", "GP2", "GP3", "GP10", "GP9"],
"cols": ["GP4", "GP5", "GP8", "GP7", "GP6"]
},
"layouts": {
"LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2, "y": 0},
{"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [0, 4], "x": 4, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1, "y": 1},
{"matrix": [1, 2], "x": 2, "y": 1},
{"matrix": [1, 3], "x": 3, "y": 1},
{"matrix": [1, 4], "x": 4, "y": 1},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1, "y": 2},
{"matrix": [2, 2], "x": 2, "y": 2},
{"matrix": [2, 3], "x": 3, "y": 2},
{"matrix": [2, 4], "x": 4, "y": 2},
{"matrix": [3, 0], "x": 0, "y": 3},
{"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2, "y": 3},
{"matrix": [3, 3], "x": 3, "y": 3},
{"matrix": [3, 4], "x": 4, "y": 3},
{"matrix": [4, 0], "x": 0, "y": 4},
{"matrix": [4, 1], "x": 1, "y": 4},
{"matrix": [4, 2], "x": 2, "y": 4},
{"matrix": [4, 3], "x": 3, "y": 4},
{"matrix": [4, 4], "x": 4, "y": 4},
{"matrix": [5, 0], "x": 0, "y": 5},
]
}
}
}

View File

@ -0,0 +1,78 @@
/* Copyright 2024 lostdotfish
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
enum orbweaver_layers {
_DEFAULT,
_LETTERS,
_CONTROL
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//generic default keymap with Razor defaults (+ 20 shifts layer)
[_DEFAULT] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4,
KC_TAB, KC_Q, KC_W, KC_E, KC_R,
KC_CAPS, KC_A, KC_S, KC_D, KC_F,
KC_LSFT, KC_Z, KC_X, KC_C, TO(1),
KC_LALT, KC_UP, KC_DOWN, KC_RIGHT, KC_LEFT,
KC_SPACE
),
//Second example keymap with all modifier keys replaced with numbers or letters
[_LETTERS] = LAYOUT(
KC_0, KC_1, KC_2, KC_3, KC_4,
KC_I, KC_Q, KC_W, KC_E, KC_R,
KC_J, KC_A, KC_S, KC_D, KC_F,
KC_K, KC_Z, KC_X, KC_C, TO(2),
KC_L, KC_UP, KC_DOWN, KC_RIGHT, KC_LEFT,
KC_SPACE
),
//, RGB Contol Keymap
[_CONTROL] = LAYOUT(
RM_NEXT, RM_HUEU, RM_SATU, RM_VALU, RM_SPDU,
RM_PREV, RM_HUED, RM_SATD, RM_VALD, RM_SPDD,
RM_TOGG, KC_A, KC_S, KC_D, KC_F,
KC_K, KC_Z, KC_X, KC_C, TO(0),
KC_L, KC_UP, KC_DOWN, KC_RIGHT, KC_LEFT,
KC_SPACE
)
};
layer_state_t layer_state_set_user(layer_state_t state) {
gpio_write_pin_high(GP23);
gpio_write_pin_high(GP24);
gpio_write_pin_high(GP25);
switch (get_highest_layer(state)) {
case _DEFAULT:
gpio_write_pin_low(GP23);
break;
case _LETTERS:
gpio_write_pin_low(GP25);
break;
case _CONTROL:
gpio_write_pin_low(GP24);
break;
}
return state;
}

View File

@ -0,0 +1,9 @@
// Copyright 2023 zzeneg (@zzeneg)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include_next <mcuconf.h>
#undef RP_I2C_USE_I2C0
#define RP_I2C_USE_I2C0 TRUE

View File

@ -0,0 +1,51 @@
# rp2040_orbweaver
QMK firmware for RP2040 based MCU replacement PCB for the Razer Orbweaver gaming keypad
![RP2040 Orbweaver](https://i.imgur.com/GCPRUbs.png)
This firmware is for the Razer Orbweaver Chroma keypad with a custom, plug and play, RP2040 MCU PCB. For installation instructions and board availability see [geekhack](https://geekhack.org/index.php?topic=124092.0).
The firmware controls a 6x5 key matrix (4x5 keypad + 6 additional keys on the thumb pad and up to 4 additional keys added by user). It also controls a IS31FL3731 RGB Matrix controller (on the Chroma model) via I2C interface. This requires a single I2C Driver with 20 common anode RGB LEDs.
Key 20 (bottom right) is used to switch layers.
The default key map provides 3 preset layers.
(layer 0) is a generic layer based on the original Razer defaults.
(layer 1) replaces modifier keys with letter keys.
(layer 2) replaces the 2 top rows with RGB control keys.
The three LEDs on the thumb pad indicate the active layer.
Blue = layer 0
Green = layer 1
Yellow = layer 3
All LEDs will be off when any other (user added) layout is activated
A set of RGB animations are included in confg.h. These are controlled by activating the Yellow layer and using keys 01 - 11 (11 toggles the lighting on and off - see /keymaps/default/keymap.c for more information)
Many thanks to a_marmot. Without his original handwired project, this board would not have been possible. His original work can be found here. [geekhack](https://geekhack.org/index.php?topic=119396.0).
* Keyboard Maintainer: [Lostdotfish](https://github.com/Lostdotfish)
* Hardware Supported: RP2040 + IS31FL3731
* Hardware Availability: [https://geekhack.org/index.php?topic=124092.0](https://geekhack.org/index.php?topic=124092.0)
Make example for this keyboard (after setting up your build environment):
make lostdotfish/rp2040_orbweaver:default
Flashing example for this keyboard:
make lostdotfish/rp2040_orbweaver:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Bootloader
Enter the bootloader in 2 ways:
* Press and hold the upper left hand key on the main keyboard while you plug in the USB.
* Press and release the boot button on the top of the RP2040_Orbweaver v2.0 inside the modded unit.

View File

@ -0,0 +1,64 @@
/* Copyright 2024 lostdotfish
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
*/
#include "rgb_matrix.h"
#include "quantum.h"
void keyboard_pre_init_kb(void) {
// Initialize Reset pins
gpio_set_pin_output(GP23);
gpio_set_pin_output(GP24);
gpio_set_pin_output(GP25);
gpio_write_pin_high(GP23);
gpio_write_pin_high(GP24);
gpio_write_pin_high(GP25);
keyboard_pre_init_user();
}
const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
* | | G location
* | | | B location
* | | | | */
{0, C9_1, C8_1, C7_1}, //top left key.
{0, C9_2, C8_2, C7_2},
{0, C9_3, C8_3, C7_3},
{0, C9_4, C8_4, C7_4},
{0, C9_5, C8_5, C7_5}, //top right key.
{0, C9_6, C8_6, C7_6},
{0, C9_7, C8_7, C6_6},
{0, C9_8, C7_7, C6_7},
{0, C1_8, C2_8, C3_8},
{0, C1_7, C2_7, C3_7},
{0, C1_6, C2_6, C3_6},
{0, C1_5, C2_5, C3_5},
{0, C1_4, C2_4, C3_4},
{0, C1_3, C2_3, C3_3},
{0, C1_2, C2_2, C4_3},
{0, C1_1, C3_2, C4_2}, //lower left key
{0, C9_9, C8_9, C7_9},
{0, C9_10, C8_10, C7_10},
{0, C9_11, C8_11, C7_11},
{0, C9_12, C8_12, C7_12} //lower right key
};