Firmware: Add initial QMK firmware code and keymap

This commit is contained in:
Lexi / Zoe 2024-06-21 01:55:51 +02:00
parent f0c834e079
commit c3107cd715
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
5 changed files with 197 additions and 0 deletions

49
Makefile Normal file
View File

@ -0,0 +1,49 @@
# Set QMK_HOME in your environment variables to adjust the path of the firmware
QMK_HOME ?= ${HOME}/qmk_firmware
# Directories for QMK keyboard files (author, keyboard, revision)
QMK_KEYBOARD_AUTHOR_DIR := binarydiv
QMK_KEYBOARD_BASE_DIR := ${QMK_KEYBOARD_AUTHOR_DIR}/protoeepyboard
QMK_KEYBOARD_REV_DIR := ${QMK_KEYBOARD_BASE_DIR}/v1
# Keymap to use when compiling QMK firmware
QMK_KEYMAP := default
# Set default make target
.DEFAULT_GOAL := qmk-compile
# -- QMK commands
# Prerequisite: Check if QMK is installed
.PHONY: _qmk-check-firmware-installed
_qmk-check-firmware-installed:
@test -d "${QMK_HOME}" || { \
echo "QMK firmware not found! (QMK_HOME=${QMK_HOME})"; \
echo "Please install QMK using 'qmk setup' first or set QMK_HOME in environment."; \
exit 1; \
}
# Create symlink in QMK firmware directory to the keyboard files in qmk_keyboards/
.PHONY: _qmk-create-symlink
_qmk-create-symlink: _qmk-check-firmware-installed ${QMK_HOME}/keyboards/${QMK_KEYBOARD_BASE_DIR}
# Only create symlink if it doesn't exist already
${QMK_HOME}/keyboards/${QMK_KEYBOARD_BASE_DIR}:
mkdir -p "${QMK_HOME}/keyboards/${QMK_KEYBOARD_AUTHOR_DIR}"
ln -s "$$(realpath qmk_keyboards/${QMK_KEYBOARD_BASE_DIR})" "${QMK_HOME}/keyboards/${QMK_KEYBOARD_BASE_DIR}"
# Compile QMK firmware
.PHONY: qmk-compile
qmk-compile: _qmk-create-symlink
qmk compile -kb ${QMK_KEYBOARD_REV_DIR} -km ${QMK_KEYMAP}
# Compile and flash QMK firmware to keyboard
.PHONY: qmk-flash
qmk-flash: _qmk-create-symlink
qmk flash -kb ${QMK_KEYBOARD_REV_DIR} -km ${QMK_KEYMAP}
# Run "qmk config" to set this keyboard as the default (to simplify running qmk commands manually)
.PHONY: qmk-activate
qmk-activate: _qmk-create-symlink
qmk config user.keyboard=${QMK_KEYBOARD_REV_DIR} user.keymap=${QMK_KEYMAP}

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,92 @@
{
"keyboard_name": "protoEepyBoard v1.0",
"maintainer": "binaryDiv",
"manufacturer": "binaryDiv",
"url": "https://git.0xbd.space/binaryDiv/protoEepyBoard/",
"processor": "RP2040",
"bootloader": "rp2040",
"usb": {
"device_version": "1.0.0",
"vid": "0x1337",
"pid": "0xBD31"
},
"features": {
"bootmagic": true,
"command": false,
"console": true,
"extrakey": true,
"mousekey": true,
"nkro": true
},
"diode_direction": "COL2ROW",
"matrix_pins": {
"cols": ["GP6", "GP7", "GP8", "GP9", "GP10", "GP5", "GP24", "GP23", "GP22", "GP21", "GP20", "GP25"],
"rows": ["GP17", "GP16", "GP15", "GP14", "GP13"]
},
"layouts": {
"LAYOUT_ortho_5x12": {
"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": [0, 5], "x": 5, "y": 0},
{"matrix": [0, 6], "x": 6, "y": 0},
{"matrix": [0, 7], "x": 7, "y": 0},
{"matrix": [0, 8], "x": 8, "y": 0},
{"matrix": [0, 9], "x": 9, "y": 0},
{"matrix": [0, 10], "x": 10, "y": 0},
{"matrix": [0, 11], "x": 11, "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": [1, 5], "x": 5, "y": 1},
{"matrix": [1, 6], "x": 6, "y": 1},
{"matrix": [1, 7], "x": 7, "y": 1},
{"matrix": [1, 8], "x": 8, "y": 1},
{"matrix": [1, 9], "x": 9, "y": 1},
{"matrix": [1, 10], "x": 10, "y": 1},
{"matrix": [1, 11], "x": 11, "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": [2, 5], "x": 5, "y": 2},
{"matrix": [2, 6], "x": 6, "y": 2},
{"matrix": [2, 7], "x": 7, "y": 2},
{"matrix": [2, 8], "x": 8, "y": 2},
{"matrix": [2, 9], "x": 9, "y": 2},
{"matrix": [2, 10], "x": 10, "y": 2},
{"matrix": [2, 11], "x": 11, "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": [3, 5], "x": 5, "y": 3},
{"matrix": [3, 6], "x": 6, "y": 3},
{"matrix": [3, 7], "x": 7, "y": 3},
{"matrix": [3, 8], "x": 8, "y": 3},
{"matrix": [3, 9], "x": 9, "y": 3},
{"matrix": [3, 10], "x": 10, "y": 3},
{"matrix": [3, 11], "x": 11, "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": [4, 5], "x": 5, "y": 4},
{"matrix": [4, 6], "x": 6, "y": 4},
{"matrix": [4, 7], "x": 7, "y": 4},
{"matrix": [4, 8], "x": 8, "y": 4},
{"matrix": [4, 9], "x": 9, "y": 4},
{"matrix": [4, 10], "x": 10, "y": 4},
{"matrix": [4, 11], "x": 11, "y": 4}
]
}
}
}

View File

@ -0,0 +1,35 @@
// Copyright 2024 binaryDiv (@binaryDiv)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
// Define layer names for better readability
enum layer_names {
// Base layer
L_BASE,
// "Hyper" key layer
L_HYPER,
// Keyboard control layer: Used for keyboard configuration
//L_KBDCTL,
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Base layer
[L_BASE] = LAYOUT_ortho_5x12(
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQUAL,
KC_ESCAPE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SEMICOLON, KC_QUOTE,
KC_LEFT_SHIFT, KC_BACKSPACE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH,
KC_LEFT_CTRL, KC_LEFT_ALT, KC_LEFT_GUI, MO(L_HYPER), KC_ENTER, KC_SPACE, KC_ENTER, KC_RIGHT_ALT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
),
// "Hyper" key layer
[L_HYPER] = LAYOUT_ortho_5x12(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
_______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, KC_LEFT_BRACKET, KC_RIGHT_BRACKET, KC_F12,
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE,
_______, KC_DELETE, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BACKSLASH,
_______, QK_BOOTLOADER, _______, _______, _______, KC_SPACE, KC_ENTER, _______, _______, _______, _______, _______
)
};

View File

@ -0,0 +1 @@
# This file intentionally left blank