diff options
author | Grigory Avdyushin <[email protected]> | 2025-03-23 06:17:05 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2025-03-22 22:17:05 -0700 |
commit | ce2f7d86be171f7273299720ba739b8c85d4c267 (patch) | |
tree | 5359ccd60a4fce9ef2d7a3edb5455199b517c7d9 | |
parent | 6a947fa5345b47f8d41c5ab13c0c6dac79cb3bc9 (diff) | |
download | qmk_firmware-ce2f7d86be171f7273299720ba739b8c85d4c267.tar.gz qmk_firmware-ce2f7d86be171f7273299720ba739b8c85d4c267.zip |
Franky36 handwired keyboard (#25029)
-rw-r--r-- | keyboards/handwired/franky36/config.h | 21 | ||||
-rw-r--r-- | keyboards/handwired/franky36/franky36.c | 68 | ||||
-rw-r--r-- | keyboards/handwired/franky36/halconf.h | 21 | ||||
-rw-r--r-- | keyboards/handwired/franky36/keyboard.json | 72 | ||||
-rw-r--r-- | keyboards/handwired/franky36/keymaps/default/keymap.c | 123 | ||||
-rw-r--r-- | keyboards/handwired/franky36/mcuconf.h | 24 | ||||
-rw-r--r-- | keyboards/handwired/franky36/readme.md | 25 |
7 files changed, 354 insertions, 0 deletions
diff --git a/keyboards/handwired/franky36/config.h b/keyboards/handwired/franky36/config.h new file mode 100644 index 0000000000..3749ff5785 --- /dev/null +++ b/keyboards/handwired/franky36/config.h @@ -0,0 +1,21 @@ +/* Copyright 2024-2025 Grigory Avdyushin + * + * 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 GP0 +#define I2C1_SCL_PIN GP1 diff --git a/keyboards/handwired/franky36/franky36.c b/keyboards/handwired/franky36/franky36.c new file mode 100644 index 0000000000..50e4d38b52 --- /dev/null +++ b/keyboards/handwired/franky36/franky36.c @@ -0,0 +1,68 @@ +/* Copyright 2024-2025 Grigory Avdyushin + * + * 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 + +#ifdef OLED_ENABLE + +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0x00, 0x0A, 0x0A + }; + + oled_write_P(qmk_logo, false); +} + +static void render_mod_status(uint8_t modifiers) { + oled_write_P(PSTR("MODS:"), false); + oled_write_P(PSTR("S"), (modifiers & MOD_MASK_SHIFT)); + oled_write_P(PSTR("C"), (modifiers & MOD_MASK_CTRL)); + oled_write_P(PSTR("A"), (modifiers & MOD_MASK_ALT)); + oled_write_ln_P(PSTR("G"), (modifiers & MOD_MASK_GUI)); + oled_write_ln_P(PSTR(" "), false); +} + +static void render_layer_state(void) { + oled_write_ln_P(PSTR(" "), false); + oled_write_P("BASE ", layer_state_is(0)); + oled_write_P("LOWER", layer_state_is(1)); + oled_write_P("RAISE", layer_state_is(2)); + oled_write_P("NAV ", layer_state_is(3)); + oled_write_ln_P(PSTR(" "), false); +} + +static void render_capsword_state(bool on) { + oled_write_ln_P("CAPSW", on); +} + +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + render_logo(); + render_layer_state(); + render_mod_status(get_mods() | get_oneshot_mods()); + render_capsword_state(is_caps_word_on()); + return false; +} + + #endif diff --git a/keyboards/handwired/franky36/halconf.h b/keyboards/handwired/franky36/halconf.h new file mode 100644 index 0000000000..3c594066b6 --- /dev/null +++ b/keyboards/handwired/franky36/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2024-2025 Grigory Avdyushin + * + * 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 HAL_USE_I2C TRUE + +#include_next <halconf.h> diff --git a/keyboards/handwired/franky36/keyboard.json b/keyboards/handwired/franky36/keyboard.json new file mode 100644 index 0000000000..038fc1eb67 --- /dev/null +++ b/keyboards/handwired/franky36/keyboard.json @@ -0,0 +1,72 @@ +{ + "manufacturer": "Grigory Avdyushin", + "keyboard_name": "franky36", + "maintainer": "Grigory Avdyushin", + "bootloader": "rp2040", + "caps_word": { + "both_shifts_turns_on": true + }, + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "caps_word": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "oled": true + }, + "matrix_pins": { + "cols": ["GP9", "GP10", "GP11", "GP12", "GP13", "GP14", "GP15", "GP26", "GP27", "GP28"], + "rows": ["GP5", "GP4", "GP3", "GP2"] + }, + "processor": "RP2040", + "url": "https://github.com/avdyushin/franky36", + "usb": { + "device_version": "0.2.0", + "pid": "0x0001", + "vid": "0xFEED" + }, + "community_layouts": ["split_3x5_3"], + "layouts": { + "LAYOUT_split_3x5_3": { + "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": [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": [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": [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} + ] + } + } +} diff --git a/keyboards/handwired/franky36/keymaps/default/keymap.c b/keyboards/handwired/franky36/keymaps/default/keymap.c new file mode 100644 index 0000000000..1b281124f9 --- /dev/null +++ b/keyboards/handwired/franky36/keymaps/default/keymap.c @@ -0,0 +1,123 @@ +/* Copyright 2024-2025 Grigory Avdyushin + * + * 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 my_layers { + _BASE = 0, + _LOWER, + _RAISE, + _NAV, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define NAV MO(_NAV) + +#define OSM_LSFT OSM(MOD_LSFT) // One Shot Right Shift + +#define KC_SFT_Z SFT_T(KC_Z) // Left Shift when held, Z when tapped +#define KC_SFT_SL RSFT_T(KC_SLSH) // Right Shift when held, / when tapped + +#define KC_SFT_BSLS RSFT_T(KC_BSLS) // Right Shift when held, \ when tapped + +#define KC_LWR_SPC LT(_LOWER, KC_SPC) // Lower layer when held, Space when tapped +#define KC_RSE_BSPC LT(_RAISE, KC_BSPC) // Raise layer when held, Backspace when tapped +#define KC_NAV_A LT(_NAV,KC_A) // Navigation layer when held, A when tapped + +#define KC_CMD_TAB CMD_T(KC_TAB) // Left Command when held, Tab when tapped +#define KC_CMD_ENT RCMD_T(KC_ENT) // Right Command when held, Enter when tapped + +#define KC_CTL_ESC CTL_T(KC_ESC) // Left Control when held, Escape when tapped +#define KC_OPT_OSM_SFT ROPT_T(OSM_LSFT) // Right Option when held, One Shot Shift when tapped + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + * │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ + * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ + * │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ;:│ + * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ + * │⇧/Z│ X │ C │ V │ B │ │ N │ M │ ,<│ .>│⇧/?│ + * └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + * ┌───┬───┬───┐ ┌───┬───┬───┐ + * │CTL│CMD│SPC│ │ENT│CMD│OPT│ + * └───┴───┴───┘ └───┴───┴───┘ + */ + [_BASE] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_NAV_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_SFT_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SFT_SL, + KC_CTL_ESC, KC_CMD_TAB, KC_LWR_SPC, KC_RSE_BSPC, KC_CMD_ENT, KC_ROPT + ), + + /* + * ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + * │ 1!│ 2@│ 3#│ 4$│ 5%│ │ 6^│ 7&│ 8*│ 9(│ 0)│ + * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ + * │ `~│ │ │ │ │ │ ← │ ↓ │ ↑ │ → │ '"│ + * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ + * │ ⇧ │ │ │ │ │ │ -_│ =+│ [{│ ]}│ \|│ + * └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + * ┌───┬───┬───┐ ┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ + * └───┴───┴───┘ └───┴───┴───┘ + */ + [_LOWER] = LAYOUT_split_3x5_3( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_GRV, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_QUOT, + KC_LSFT, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_SFT_BSLS, + _______, _______, _______, _______, _______, _______ + ), + + /* + * ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + * │ F1│ F2│ F3│ F4│ F5│ │ F6│ F7│ F8│ F9│F10│ + * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ + * └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + * ┌───┬───┬───┐ ┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ + * └───┴───┴───┘ └───┴───┴───┘ + */ + [_RAISE] = LAYOUT_split_3x5_3( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + /* + * ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │HOM│ │ │END│ │ + * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ + * │ │ │ │ │ │ │ ← │ ↓ │ ↑ │ → │ │ + * ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ + * │ │ │ │ │ │ │PUP│ │ │PDN│ │ + * └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + * ┌───┬───┬───┐ ┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ + * └───┴───┴───┘ └───┴───┴───┘ + */ + [_NAV] = LAYOUT_split_3x5_3( + _______, _______, _______, _______, _______, KC_HOME, _______, _______, KC_END, _______, + _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, + _______, _______, _______, _______, _______, KC_PGUP, _______, _______, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/handwired/franky36/mcuconf.h b/keyboards/handwired/franky36/mcuconf.h new file mode 100644 index 0000000000..8d47159177 --- /dev/null +++ b/keyboards/handwired/franky36/mcuconf.h @@ -0,0 +1,24 @@ +/* Copyright 2024-2025 Grigory Avdyushin + * + * 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 + +#include_next <mcuconf.h> + +#undef RP_I2C_USE_I2C0 +#define RP_I2C_USE_I2C0 TRUE +#undef RP_I2C_USE_I2C1 +#define RP_I2C_USE_I2C1 FALSE diff --git a/keyboards/handwired/franky36/readme.md b/keyboards/handwired/franky36/readme.md new file mode 100644 index 0000000000..62d1bfd5c3 --- /dev/null +++ b/keyboards/handwired/franky36/readme.md @@ -0,0 +1,25 @@ +# franky36 + +Franky36 is 36 key compact handwired split keyboard that uses single RP2040-Zero controller. + +* Keyboard Maintainer: [Grigory Avdyushin](https://github.com/avdyushin) +* Hardware Supported: RP2040-Zero +* Hardware Availability: Handwired [franky36](https://github.com/avdyushin/franky36) + +Make example for this keyboard (after setting up your build environment): + + make franky36:default + +Flashing example for this keyboard: + + make franky36: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 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Hold down the reset button on the controller and plug in the keyboard +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available |