mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-18 21:52:02 +00:00
Add new macropad Sharkropad
This commit is contained in:
parent
6d0e5728aa
commit
e105468d70
22
keyboards/mawaeg/sharkropad/config.h
Normal file
22
keyboards/mawaeg/sharkropad/config.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/* Copyright 2025 @mawaeg
|
||||||
|
*
|
||||||
|
* 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 3 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define STM32_FLASH_SECTORS_PER_BANK 128
|
||||||
|
|
||||||
|
#define I2C1_SCL_PIN A9
|
||||||
|
#define I2C1_SDA_PIN A10
|
||||||
|
|
||||||
|
#define WS2812_BITBANG_NOP_FUDGE 0.4
|
21
keyboards/mawaeg/sharkropad/halconf.h
Executable file
21
keyboards/mawaeg/sharkropad/halconf.h
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
/* Copyright 2025 @mawaeg
|
||||||
|
*
|
||||||
|
* 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 3 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 HAL_USE_I2C TRUE
|
||||||
|
|
||||||
|
#include_next <halconf.h>
|
139
keyboards/mawaeg/sharkropad/keyboard.json
Executable file
139
keyboards/mawaeg/sharkropad/keyboard.json
Executable file
@ -0,0 +1,139 @@
|
|||||||
|
{
|
||||||
|
"manufacturer": "mawaeg",
|
||||||
|
"keyboard_name": "Sharkropad",
|
||||||
|
"maintainer": "mawaeg",
|
||||||
|
"bootloader": "stm32-dfu",
|
||||||
|
"bootmagic": {
|
||||||
|
"matrix": [0, 3]
|
||||||
|
},
|
||||||
|
"diode_direction": "COL2ROW",
|
||||||
|
"encoder": {
|
||||||
|
"enabled": true,
|
||||||
|
"rotary": [
|
||||||
|
{"pin_a": "A0", "pin_b": "A1"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"features": {
|
||||||
|
"bootmagic": true,
|
||||||
|
"command": false,
|
||||||
|
"console": false,
|
||||||
|
"extrakey": true,
|
||||||
|
"mousekey": false,
|
||||||
|
"nkro": true,
|
||||||
|
"oled": true,
|
||||||
|
"rgb_matrix": true
|
||||||
|
},
|
||||||
|
"matrix_pins": {
|
||||||
|
"cols": ["B1", "B0", "A4", "A2"],
|
||||||
|
"rows": ["A3", "A7", "A6", "A5"]
|
||||||
|
},
|
||||||
|
"processor": "STM32L432",
|
||||||
|
"rgb_matrix": {
|
||||||
|
"animations": {
|
||||||
|
"alphas_mods": true,
|
||||||
|
"band_pinwheel_sat": true,
|
||||||
|
"band_pinwheel_val": true,
|
||||||
|
"band_sat": true,
|
||||||
|
"band_spiral_sat": true,
|
||||||
|
"band_spiral_val": true,
|
||||||
|
"band_val": true,
|
||||||
|
"breathing": true,
|
||||||
|
"cycle_all": true,
|
||||||
|
"cycle_left_right": true,
|
||||||
|
"cycle_out_in": true,
|
||||||
|
"cycle_out_in_dual": true,
|
||||||
|
"cycle_pinwheel": true,
|
||||||
|
"cycle_spiral": true,
|
||||||
|
"cycle_up_down": true,
|
||||||
|
"digital_rain": true,
|
||||||
|
"dual_beacon": true,
|
||||||
|
"effect_max": true,
|
||||||
|
"flower_blooming": true,
|
||||||
|
"gradient_left_right": true,
|
||||||
|
"gradient_up_down": true,
|
||||||
|
"hue_breathing": true,
|
||||||
|
"hue_pendulum": true,
|
||||||
|
"hue_wave": true,
|
||||||
|
"jellybean_raindrops": true,
|
||||||
|
"multisplash": true,
|
||||||
|
"pixel_flow": true,
|
||||||
|
"pixel_fractal": true,
|
||||||
|
"pixel_rain": true,
|
||||||
|
"rainbow_beacon": true,
|
||||||
|
"rainbow_moving_chevron": true,
|
||||||
|
"rainbow_pinwheels": true,
|
||||||
|
"raindrops": true,
|
||||||
|
"riverflow": true,
|
||||||
|
"solid_multisplash": true,
|
||||||
|
"solid_reactive": true,
|
||||||
|
"solid_reactive_cross": true,
|
||||||
|
"solid_reactive_multicross": true,
|
||||||
|
"solid_reactive_multinexus": true,
|
||||||
|
"solid_reactive_multiwide": true,
|
||||||
|
"solid_reactive_nexus": true,
|
||||||
|
"solid_reactive_simple": true,
|
||||||
|
"solid_reactive_wide": true,
|
||||||
|
"solid_splash": true,
|
||||||
|
"splash": true,
|
||||||
|
"starlight": true,
|
||||||
|
"starlight_dual_hue": true,
|
||||||
|
"starlight_dual_sat": true,
|
||||||
|
"typing_heatmap": true
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"animation": "gradient_up_down"
|
||||||
|
},
|
||||||
|
"driver": "ws2812",
|
||||||
|
"layout": [
|
||||||
|
{"matrix": [1, 0], "x": 189, "y": 27, "flags": 4},
|
||||||
|
{"matrix": [1, 1], "x": 137, "y": 27, "flags": 4},
|
||||||
|
{"matrix": [1, 2], "x": 86, "y": 27, "flags": 4},
|
||||||
|
{"matrix": [1, 3], "x": 35, "y": 27, "flags": 4},
|
||||||
|
{"matrix": [2, 0], "x": 189, "y": 41, "flags": 4},
|
||||||
|
{"matrix": [2, 1], "x": 137, "y": 41, "flags": 4},
|
||||||
|
{"matrix": [2, 2], "x": 86, "y": 41, "flags": 4},
|
||||||
|
{"matrix": [2, 3], "x": 35, "y": 41, "flags": 4},
|
||||||
|
{"matrix": [3, 0], "x": 189, "y": 55, "flags": 4},
|
||||||
|
{"matrix": [3, 1], "x": 137, "y": 55, "flags": 4},
|
||||||
|
{"matrix": [3, 2], "x": 86, "y": 55, "flags": 4},
|
||||||
|
{"matrix": [3, 3], "x": 35, "y": 55, "flags": 4},
|
||||||
|
{"x": 76, "y": 3, "flags": 2},
|
||||||
|
{"x": 148, "y": 3, "flags": 2},
|
||||||
|
{"x": 216, "y": 17, "flags": 2},
|
||||||
|
{"x": 216, "y": 45, "flags": 2},
|
||||||
|
{"x": 224, "y": 61, "flags": 2},
|
||||||
|
{"x": 60, "y": 61, "flags": 2},
|
||||||
|
{"x": 8, "y": 45, "flags": 2},
|
||||||
|
{"x": 8, "y": 17, "flags": 2}
|
||||||
|
],
|
||||||
|
"maximum_brightness": 180
|
||||||
|
},
|
||||||
|
"url": "https://github.com/mawaeg/sharkropad",
|
||||||
|
"usb": {
|
||||||
|
"device_version": "1.0.0",
|
||||||
|
"pid": "0xAFFE",
|
||||||
|
"vid": "0x6D73"
|
||||||
|
},
|
||||||
|
"ws2812": {
|
||||||
|
"pin": "B3"
|
||||||
|
},
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_numpad_4x4": {
|
||||||
|
"layout": [
|
||||||
|
{"matrix": [0, 3], "x": 3, "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": [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": [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}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
116
keyboards/mawaeg/sharkropad/keymaps/default/keymap.c
Executable file
116
keyboards/mawaeg/sharkropad/keymaps/default/keymap.c
Executable file
@ -0,0 +1,116 @@
|
|||||||
|
/* Copyright 2025 @mawaeg
|
||||||
|
*
|
||||||
|
* 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 3 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
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
// clang-format off
|
||||||
|
/*
|
||||||
|
* ┌────────────┐
|
||||||
|
* │ RGB_MOD │
|
||||||
|
* ┌───┬───┬───┼────────────┤
|
||||||
|
* │ 7 │ 8 │ 9 │ RGB_TOGGLE │
|
||||||
|
* ├───┼───┼───┼────────────┤
|
||||||
|
* │ 4 │ 5 │ 6 │ NUM │
|
||||||
|
* ├───┼───┼───┼────────────┤
|
||||||
|
* │ 1 │ 2 │ 3 │ 0 │
|
||||||
|
* └───┴───┴───┴────────────┘
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT_numpad_4x4(
|
||||||
|
RGB_MOD,
|
||||||
|
KC_P7, KC_P8, KC_P9, RGB_TOG,
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_NUM,
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_P0
|
||||||
|
)
|
||||||
|
// clang-format on
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef ENCODER_MAP_ENABLE
|
||||||
|
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||||
|
[0] = { ENCODER_CCW_CW(RGB_SPD, RGB_SPI)},
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef OLED_ENABLE
|
||||||
|
|
||||||
|
const char *rgb_matrix_effect_names[] = {
|
||||||
|
"None",
|
||||||
|
"Solid Color",
|
||||||
|
"Alphas Mods",
|
||||||
|
"Gradient Up/Down",
|
||||||
|
"Gradient Left/Right",
|
||||||
|
"Breathing",
|
||||||
|
"Band Saturation",
|
||||||
|
"Band Value",
|
||||||
|
"Band Pinwheel Sat",
|
||||||
|
"Band Pinwheel Val",
|
||||||
|
"Band Spiral Sat",
|
||||||
|
"Band Spiral Val",
|
||||||
|
"Cycle All",
|
||||||
|
"Cycle Left/Right",
|
||||||
|
"Cycle Up/Down",
|
||||||
|
"Cycle Out/In",
|
||||||
|
"Cycle Out/In Dual",
|
||||||
|
"Rainbow Chevron",
|
||||||
|
"Cycle Pinwheel",
|
||||||
|
"Cycle Spiral",
|
||||||
|
"Dual Beacon",
|
||||||
|
"Rainbow Beacon",
|
||||||
|
"Rainbow Pinwheels",
|
||||||
|
"Flower Blooming",
|
||||||
|
"Raindrops",
|
||||||
|
"Jellybean Raindrops",
|
||||||
|
"Hue Breathing",
|
||||||
|
"Hue Pendulum",
|
||||||
|
"Hue Wave",
|
||||||
|
"Pixel Fractal",
|
||||||
|
"Pixel Flow",
|
||||||
|
"Pixel Rain",
|
||||||
|
"Typing Heatmap",
|
||||||
|
"Digital Rain",
|
||||||
|
"Reactive Simple",
|
||||||
|
"Reactive",
|
||||||
|
"Reactive Wide",
|
||||||
|
"Reactive Multiwide",
|
||||||
|
"Reactive Cross",
|
||||||
|
"Reactive Multicross",
|
||||||
|
"Reactive Nexus",
|
||||||
|
"Reactive Multinexus",
|
||||||
|
"Splash",
|
||||||
|
"Multisplash",
|
||||||
|
"Solid Splash",
|
||||||
|
"Solid Multisplash",
|
||||||
|
"Starlight",
|
||||||
|
"Starlight Dual Hue",
|
||||||
|
"Starlight Dual Sat",
|
||||||
|
"Riverflow",
|
||||||
|
"Effect Max"
|
||||||
|
};
|
||||||
|
|
||||||
|
bool oled_task_user(void) {
|
||||||
|
|
||||||
|
oled_write_ln_P(PSTR("Mode: "), false);
|
||||||
|
oled_write_ln(rgb_matrix_effect_names[rgb_matrix_get_mode()], false);
|
||||||
|
|
||||||
|
oled_write_ln_P(PSTR("RGB Speed: "), false);
|
||||||
|
char speedBuffer[4];
|
||||||
|
uint8_t speedPercentage = (uint8_t)(((float)rgb_matrix_get_speed() / 255.0) * 100.0); // Proper float division
|
||||||
|
sprintf(speedBuffer, "%d", speedPercentage);
|
||||||
|
oled_write(speedBuffer, false);
|
||||||
|
oled_write("% ", false);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
1
keyboards/mawaeg/sharkropad/keymaps/default/rules.mk
Executable file
1
keyboards/mawaeg/sharkropad/keymaps/default/rules.mk
Executable file
@ -0,0 +1 @@
|
|||||||
|
ENCODER_MAP_ENABLE = yes
|
22
keyboards/mawaeg/sharkropad/mcuconf.h
Executable file
22
keyboards/mawaeg/sharkropad/mcuconf.h
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
/* Copyright 2025 @mawaeg
|
||||||
|
*
|
||||||
|
* 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 3 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
|
||||||
|
|
||||||
|
#include_next <mcuconf.h>
|
||||||
|
|
||||||
|
#undef STM32_I2C_USE_I2C1
|
||||||
|
#define STM32_I2C_USE_I2C1 TRUE
|
24
keyboards/mawaeg/sharkropad/readme.md
Executable file
24
keyboards/mawaeg/sharkropad/readme.md
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
# sharkropad
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**Sharkropad** is an open-source hotswappable macropad.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Marek Schmitt](https://github.com/mawaeg)
|
||||||
|
* Hardware Supported: PCB included in the [Sharkropad repository](https://github.com/mawaeg/sharkropad).
|
||||||
|
* Hardware Availability: PCB has to be sourced yourserlf
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make mawaeg/sharkropad:default
|
||||||
|
|
||||||
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
|
make mawaeg/sharkropad: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:
|
||||||
|
* **Bootmagic reset**: Hold down the rotary encoder knob and plug in the keyboard
|
Loading…
Reference in New Issue
Block a user