Firmware: Add initial QMK firmware files

This commit is contained in:
Lexi / Zoe 2024-05-22 18:46:49 +02:00
parent 98fae1e0ae
commit 27816b7545
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
7 changed files with 259 additions and 0 deletions

View file

@ -0,0 +1,20 @@
// Copyright 2024 binaryDiv (@binaryDiv)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
//#define NO_DEBUG
/* disable print */
//#define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT

View file

@ -0,0 +1,99 @@
{
"keyboard_name": "eepyPad v1.0",
"maintainer": "binaryDiv",
"manufacturer": "binaryDiv",
"url": "https://git.0xbd.space/binaryDiv/eepyPad/",
"processor": "atmega32u4",
"bootloader": "caterina",
"usb": {
"device_version": "1.0.0",
"vid": "0x1337",
"pid": "0xBD30"
},
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true
},
"diode_direction": "ROW2COL",
"matrix_pins": {
"cols": ["F7", "B1", "B3", "B2", "B6"],
"rows": ["B5", "B4", "E6", "D7", "C6"]
},
"layouts": {
"LAYOUT_ortho_5x5": {
"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}
]
}
},
"rgb_matrix": {
"driver": "ws2812",
"default": {
"animation": "trans_pride",
"speed": 32
},
"center_point": [2, 2],
"animations": {
"cycle_pinwheel": true,
"trans_pride": true
},
"layout": [
{"matrix": [0, 3], "x": 3, "y": 0, "flags": 4},
{"matrix": [0, 2], "x": 2, "y": 0, "flags": 4},
{"matrix": [0, 1], "x": 1, "y": 0, "flags": 4},
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
{"matrix": [1, 0], "x": 0, "y": 1, "flags": 4},
{"matrix": [1, 1], "x": 1, "y": 1, "flags": 4},
{"matrix": [1, 2], "x": 2, "y": 1, "flags": 4},
{"matrix": [1, 3], "x": 3, "y": 1, "flags": 4},
{"matrix": [1, 4], "x": 4, "y": 1, "flags": 4},
{"matrix": [2, 4], "x": 4, "y": 2, "flags": 4},
{"matrix": [2, 3], "x": 3, "y": 2, "flags": 4},
{"matrix": [2, 2], "x": 2, "y": 2, "flags": 4},
{"matrix": [2, 1], "x": 1, "y": 2, "flags": 4},
{"matrix": [2, 0], "x": 0, "y": 2, "flags": 4},
{"matrix": [3, 0], "x": 0, "y": 3, "flags": 4},
{"matrix": [3, 1], "x": 1, "y": 3, "flags": 4},
{"matrix": [3, 2], "x": 2, "y": 3, "flags": 4},
{"matrix": [3, 3], "x": 3, "y": 3, "flags": 4},
{"matrix": [3, 4], "x": 4, "y": 3, "flags": 4},
{"matrix": [4, 4], "x": 4, "y": 4, "flags": 4},
{"matrix": [4, 3], "x": 3, "y": 4, "flags": 4},
{"matrix": [4, 2], "x": 2, "y": 4, "flags": 4},
{"matrix": [4, 1], "x": 1, "y": 4, "flags": 4},
{"matrix": [4, 0], "x": 0, "y": 4, "flags": 4}
]
},
"ws2812": {
"pin": "F6"
}
}

View file

@ -0,0 +1,37 @@
// Copyright 2024 binaryDiv (@binaryDiv)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
*
* Kbd-Fn
*
* Alt+6 Alt+7 Alt+8 Alt+9 Alt+0
*
* Alt+1 Alt+2 Alt+3 Alt+4 Alt+5
*
* Ctrl+6 Ctrl+7 Ctrl+8 Ctrl+9 Ctrl+0
*
* Ctrl+1 Ctrl+2 Ctrl+3 Ctrl+4 Ctrl+5
*
*/
// Default layer for Factorio tertiary/quarternary quick bars
[0] = LAYOUT_ortho_5x5(
_______, _______, _______, MO(1), _______,
LALT(KC_6), LALT(KC_7), LALT(KC_8), LALT(KC_9), LALT(KC_0),
LALT(KC_1), LALT(KC_2), LALT(KC_3), LALT(KC_4), LALT(KC_5),
LCTL(KC_6), LCTL(KC_7), LCTL(KC_8), LCTL(KC_9), LCTL(KC_0),
LCTL(KC_1), LCTL(KC_2), LCTL(KC_3), LCTL(KC_4), LCTL(KC_5)
),
// Keyboard control layer for entering bootloader and controlling the RGB light (hold 0,4)
[1] = LAYOUT_ortho_5x5(
QK_BOOTLOADER, QK_REBOOT, _______, _______, QK_CLEAR_EEPROM,
RGB_TOG, RGB_MODE_REVERSE, RGB_MODE_FORWARD, _______, _______,
RGB_VAI, RGB_SAI, RGB_HUI, RGB_SPI, _______,
RGB_VAD, RGB_SAD, RGB_HUD, RGB_SPD, _______,
RGB_MODE_PLAIN, RGB_MODE_BREATHE, RGB_MODE_RAINBOW, RGB_MODE_SWIRL, _______
),
};

View file

@ -0,0 +1,32 @@
RGB_MATRIX_EFFECT(trans_pride)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
bool trans_pride(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
uint8_t total_rows = 5;
uint8_t total_cols = 5;
uint8_t rgb_rows[][3] = {
{RGB_CYAN},
{RGB_MAGENTA},
{RGB_WHITE},
{RGB_MAGENTA},
{RGB_CYAN}
};
for (uint8_t row = 0; row < total_rows; row++) {
for (uint8_t col = 0; col < total_cols; col++) {
rgb_matrix_set_color(
g_led_config.matrix_co[row][col],
(uint8_t) scale8(rgb_rows[row][0], rgb_matrix_config.hsv.v),
(uint8_t) scale8(rgb_rows[row][1], rgb_matrix_config.hsv.v),
(uint8_t) scale8(rgb_rows[row][2], rgb_matrix_config.hsv.v)
);
}
}
return rgb_matrix_check_finished_leds(led_max);
}
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS

View file

@ -0,0 +1,2 @@
# Add custom RGB LED effects
RGB_MATRIX_CUSTOM_USER = yes