From 1d2a9a1cdb022b0a62003c550897786140e4aa10 Mon Sep 17 00:00:00 2001 From: Kyle McCreery Date: Fri, 1 Jan 2021 13:16:00 -1000 Subject: [PATCH] [Keyboard] New Keyboard - Mercutio (#11214) * Initial commit on new clean branch. Testing out functionality of oled and encoder for default features. * Cleaned up the initial push and removed the fancy keymap until the extra features and functionality can be tested and made more user friendly. * Cleaned up the readme some more, compiled and tested both default and via keymaps, and did another round of checks to prepare for starting the PR. * Cleaning up the keymap to meet expected formatting in a couple places and also adding in the TAP_CODE_DELAY after newly encoutnered encoder issues and inconsistencies. * Apply suggestions from code review Co-authored-by: Joel Challis * Update keyboards/mechwild/mercutio/readme.md Co-authored-by: Ryan * Fixing json syntax. * Update keyboards/mechwild/mercutio/rules.mk Co-authored-by: Ryan Co-authored-by: Joel Challis Co-authored-by: Ryan --- keyboards/mechwild/mercutio/config.h | 56 ++++ keyboards/mechwild/mercutio/info.json | 12 + .../mercutio/keymaps/default/config.h | 20 ++ .../mercutio/keymaps/default/keymap.c | 81 ++++++ .../mechwild/mercutio/keymaps/via/config.h | 20 ++ .../mechwild/mercutio/keymaps/via/keymap.c | 81 ++++++ .../mechwild/mercutio/keymaps/via/rules.mk | 2 + .../mechwild/mercutio/lib/mercutiofont.c | 244 ++++++++++++++++++ keyboards/mechwild/mercutio/mercutio.c | 18 ++ keyboards/mechwild/mercutio/mercutio.h | 40 +++ keyboards/mechwild/mercutio/readme.md | 24 ++ keyboards/mechwild/mercutio/rules.mk | 24 ++ 12 files changed, 622 insertions(+) create mode 100755 keyboards/mechwild/mercutio/config.h create mode 100644 keyboards/mechwild/mercutio/info.json create mode 100644 keyboards/mechwild/mercutio/keymaps/default/config.h create mode 100644 keyboards/mechwild/mercutio/keymaps/default/keymap.c create mode 100644 keyboards/mechwild/mercutio/keymaps/via/config.h create mode 100755 keyboards/mechwild/mercutio/keymaps/via/keymap.c create mode 100644 keyboards/mechwild/mercutio/keymaps/via/rules.mk create mode 100755 keyboards/mechwild/mercutio/lib/mercutiofont.c create mode 100755 keyboards/mechwild/mercutio/mercutio.c create mode 100644 keyboards/mechwild/mercutio/mercutio.h create mode 100644 keyboards/mechwild/mercutio/readme.md create mode 100755 keyboards/mechwild/mercutio/rules.mk diff --git a/keyboards/mechwild/mercutio/config.h b/keyboards/mechwild/mercutio/config.h new file mode 100755 index 0000000000..457b3bfdf9 --- /dev/null +++ b/keyboards/mechwild/mercutio/config.h @@ -0,0 +1,56 @@ +/* Copyright 2020 Kyle McCreery + * + * 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 . + */ + + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6D77 // mw = "MechWild" +#define PRODUCT_ID 0x1703 +#define DEVICE_VER 0x0100 +#define MANUFACTURER MechWild +#define PRODUCT Mercutio + +/* key matrix size */ +#define MATRIX_ROWS 7 +#define MATRIX_COLS 7 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D4, C3, C0, C1, C2} +#define MATRIX_COL_PINS { B0, D7, D6, D5, B1, B2, B3} +#define UNUSED_PINS + +/* encoder pins */ +#define ENCODERS_PAD_A { B4 } +#define ENCODERS_PAD_B { B5 } + +/* encoder resolution */ +#define ENCODER_RESOLUTION 2 +#define TAP_CODE_DELAY 10 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/mechwild/mercutio/info.json b/keyboards/mechwild/mercutio/info.json new file mode 100644 index 0000000000..fc915c611c --- /dev/null +++ b/keyboards/mechwild/mercutio/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "MechWild Mercutio", + "url": "mechwild.com", + "maintainer": "kylemccreery", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"encoder", "x":12, "y":0}, {"label":"1.5u", "x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"label":"1.5u", "x":11.5, "y":1, "w":1.5}, {"label":"1.75u", "x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"label":"1.25u", "x":11.75, "y":2, "w":1.25}, {"label":"1.25u", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"label":"1.75u", "x":11.25, "y":3, "w":1.75},{"label":"1.25u", "x":0, "y":4, "w":1.25}, {"label":"1u", "x":1.25, "y":4}, {"label":"1.25u", "x":2.25, "y":4, "w":1.25}, {"label":"2.25u", "x":3.5, "y":4, "w":2.25}, {"label":"1u", "x":5.75, "y":4}, {"label":"2.75u", "x":6.75, "y":4, "w":2.75}, {"label":"1.25u", "x":9.5, "y":4, "w":1.25}, {"label":"1u", "x":10.75, "y":4}, {"label":"1.25u", "x":11.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/mechwild/mercutio/keymaps/default/config.h b/keyboards/mechwild/mercutio/keymaps/default/config.h new file mode 100644 index 0000000000..e51d4878cf --- /dev/null +++ b/keyboards/mechwild/mercutio/keymaps/default/config.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Kyle McCreery + * + * 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 . + */ + +#pragma once + +/* Define custom font */ +#define OLED_FONT_H "keyboards/mechwild/mercutio/lib/mercutiofont.c" \ No newline at end of file diff --git a/keyboards/mechwild/mercutio/keymaps/default/keymap.c b/keyboards/mechwild/mercutio/keymaps/default/keymap.c new file mode 100644 index 0000000000..f6a78d0c50 --- /dev/null +++ b/keyboards/mechwild/mercutio/keymaps/default/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2020 Kyle McCreery + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_MUTE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_LSFT, KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_RCTL ), + + [1] = LAYOUT_all( + KC_TRNS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TRNS, KC_TRNS, KC_GRV, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_TRNS, KC_QUOT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_SLSH, KC_UP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_END, KC_LEFT, KC_DOWN, KC_RIGHT ), + + [2] = LAYOUT_all( + KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + [3] = LAYOUT_all( + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + switch (index) { + case 0: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } +} +#endif + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand +} + +static void render_name(void) { + static const char PROGMEM mercutio_name[] = { + 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0x95, 0xB5, 0x96, 0xD5, 0xB6, 0xB6, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 + }; + oled_write_P(mercutio_name, false); +} + +void oled_task_user(void) { + render_name(); +} +#endif \ No newline at end of file diff --git a/keyboards/mechwild/mercutio/keymaps/via/config.h b/keyboards/mechwild/mercutio/keymaps/via/config.h new file mode 100644 index 0000000000..e51d4878cf --- /dev/null +++ b/keyboards/mechwild/mercutio/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Kyle McCreery + * + * 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 . + */ + +#pragma once + +/* Define custom font */ +#define OLED_FONT_H "keyboards/mechwild/mercutio/lib/mercutiofont.c" \ No newline at end of file diff --git a/keyboards/mechwild/mercutio/keymaps/via/keymap.c b/keyboards/mechwild/mercutio/keymaps/via/keymap.c new file mode 100755 index 0000000000..f6a78d0c50 --- /dev/null +++ b/keyboards/mechwild/mercutio/keymaps/via/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2020 Kyle McCreery + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_MUTE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_LSFT, KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_RCTL ), + + [1] = LAYOUT_all( + KC_TRNS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TRNS, KC_TRNS, KC_GRV, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_TRNS, KC_QUOT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_SLSH, KC_UP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_END, KC_LEFT, KC_DOWN, KC_RIGHT ), + + [2] = LAYOUT_all( + KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + [3] = LAYOUT_all( + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + switch (index) { + case 0: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } +} +#endif + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand +} + +static void render_name(void) { + static const char PROGMEM mercutio_name[] = { + 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0x95, 0xB5, 0x96, 0xD5, 0xB6, 0xB6, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 + }; + oled_write_P(mercutio_name, false); +} + +void oled_task_user(void) { + render_name(); +} +#endif \ No newline at end of file diff --git a/keyboards/mechwild/mercutio/keymaps/via/rules.mk b/keyboards/mechwild/mercutio/keymaps/via/rules.mk new file mode 100644 index 0000000000..16d33cd89f --- /dev/null +++ b/keyboards/mechwild/mercutio/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes + diff --git a/keyboards/mechwild/mercutio/lib/mercutiofont.c b/keyboards/mechwild/mercutio/lib/mercutiofont.c new file mode 100755 index 0000000000..f0fec0e37a --- /dev/null +++ b/keyboards/mechwild/mercutio/lib/mercutiofont.c @@ -0,0 +1,244 @@ +/* Copyright 2020 Kyle McCreery + * + * 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 . + */ + +#include "progmem.h" + +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7E, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xC0, 0xE0, 0xF0, 0xF0, 0x30, 0x00, + 0x00, 0xC0, 0x60, 0xF0, 0xF0, 0xF0, + 0x30, 0x00, 0x80, 0xC0, 0x20, 0xF0, + 0xF0, 0xF0, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xC0, 0xE0, 0x70, + 0x30, 0x18, 0xB8, 0xF8, 0xF0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xDC, 0x7E, + 0x3F, 0xBE, 0xF0, 0xF0, 0xE0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xC0, 0xE0, 0x70, 0x10, 0x18, 0x18, + 0xF8, 0xF0, 0x60, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0x60, 0xF0, 0xF8, 0xF8, + 0x30, 0x00, 0x00, 0x00, 0x80, 0xE0, + 0xF0, 0xF8, 0xF8, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xE0, 0xF0, 0xFC, + 0xFF, 0x3F, 0x0F, 0x01, 0x00, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, + 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xC0, 0x60, 0x30, 0x90, 0x40, + 0x20, 0x30, 0x70, 0xE0, 0xC0, 0x00, + 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x00, 0x00, 0x00, 0xE0, 0xFE, 0xFF, + 0xFE, 0xF8, 0xC0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xE0, 0xFC, 0xFF, 0xFE, + 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x3E, + 0xE0, 0x80, 0x70, 0x0E, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x3C, 0xE0, + 0x80, 0x78, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x0C, 0x06, 0xC3, 0xF9, + 0xFE, 0x3F, 0xC7, 0x71, 0x18, 0x06, + 0xC3, 0xF0, 0x7C, 0x1F, 0xC7, 0x71, + 0x18, 0x06, 0xC3, 0xF8, 0xFE, 0x3F, + 0x0F, 0x01, 0x80, 0xC0, 0xF0, 0xF8, + 0xFE, 0xDF, 0x47, 0x63, 0x60, 0x30, + 0x38, 0x1E, 0x0F, 0x07, 0x81, 0x40, + 0x20, 0x18, 0x06, 0x03, 0x81, 0xF0, + 0xFC, 0x7F, 0x1F, 0x07, 0x80, 0xC0, + 0xE0, 0xF8, 0xFC, 0x3E, 0x0F, 0x03, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x01, 0x80, 0x60, 0x10, 0x08, 0x06, + 0xE3, 0xFC, 0xFF, 0x3F, 0x07, 0x01, + 0xC0, 0x30, 0x8C, 0xE3, 0xFF, 0x7F, + 0x1F, 0x03, 0x80, 0xC0, 0x30, 0x18, + 0x8C, 0xE3, 0xF9, 0xFF, 0x3F, 0x07, + 0x01, 0x80, 0xC0, 0x30, 0x18, 0x0C, + 0xC3, 0xF1, 0xFC, 0x7F, 0x0F, 0x03, + 0x80, 0xC0, 0xF0, 0xFC, 0xFE, 0x3F, + 0x07, 0x01, 0x00, 0x3E, 0xC1, 0x80, + 0x80, 0xE0, 0xFC, 0x3F, 0x8F, 0x40, + 0x40, 0xC0, 0xF0, 0xFC, 0x7E, 0x4E, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, + 0x07, 0x1F, 0xFF, 0xFE, 0xF0, 0xC0, + 0xF8, 0xFF, 0x7F, 0x0F, 0x07, 0x7F, + 0xFF, 0xFE, 0xFC, 0x04, 0x04, 0x78, + 0x80, 0x00, 0x00, 0x00, 0xC0, 0x38, + 0x0C, 0x1C, 0x60, 0x80, 0x00, 0x00, + 0x00, 0xF0, 0x0C, 0x04, 0xF4, 0x1C, + 0x80, 0xC0, 0xFC, 0xE6, 0xC3, 0xC1, + 0xC1, 0xC3, 0xE6, 0xFC, 0xC0, 0x80, + 0x00, 0x00, 0x38, 0x3F, 0x3F, 0x1F, + 0x07, 0x03, 0x00, 0x00, 0x38, 0x3E, + 0x3F, 0x1F, 0x0E, 0x03, 0x00, 0x00, + 0x30, 0x7F, 0x7F, 0x3F, 0x19, 0x0C, + 0x06, 0x03, 0x01, 0x0F, 0x1F, 0x3F, + 0x71, 0x60, 0x60, 0x70, 0x30, 0x18, + 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x38, 0x7E, 0x7F, 0x3F, + 0x3B, 0x18, 0x04, 0x03, 0x01, 0x00, + 0x0F, 0x1F, 0x31, 0x20, 0x20, 0x20, + 0x20, 0x10, 0x18, 0x08, 0x04, 0x02, + 0x01, 0x00, 0x00, 0x00, 0x1C, 0x3F, + 0x7F, 0x7F, 0x31, 0x18, 0x06, 0x03, + 0x18, 0x3E, 0x3F, 0x3F, 0x1B, 0x08, + 0x04, 0x02, 0x01, 0x00, 0x00, 0x1E, + 0x3F, 0x3F, 0x3F, 0x10, 0x08, 0x04, + 0x02, 0x01, 0x00, 0x00, 0x18, 0x3E, + 0x3F, 0x3F, 0x19, 0x0C, 0x06, 0x03, + 0x01, 0x00, 0x0F, 0x1F, 0x31, 0x60, + 0x60, 0x60, 0x30, 0x18, 0x1C, 0x0F, + 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x18, 0x3C, 0x3C, 0x1C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1F, 0x1F, 0x1F, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x1F, 0x1F, + 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x1F, 0x1F, 0x1E, 0xF8, 0x00, + 0x0F, 0x70, 0x30, 0x0E, 0xC1, 0x38, + 0x07, 0x0E, 0x70, 0x83, 0x1C, 0x60, + 0x1E, 0x03, 0xC0, 0x3E, 0x01, 0x00, + 0x3F, 0x7F, 0xFF, 0xFF, 0xF9, 0xC0, + 0xC0, 0xF9, 0xFF, 0xFF, 0x7F, 0x3F, +}; diff --git a/keyboards/mechwild/mercutio/mercutio.c b/keyboards/mechwild/mercutio/mercutio.c new file mode 100755 index 0000000000..de4437a133 --- /dev/null +++ b/keyboards/mechwild/mercutio/mercutio.c @@ -0,0 +1,18 @@ +/* Copyright 2020 Kyle McCreery + * + * 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 . + */ + + +#include "mercutio.h" diff --git a/keyboards/mechwild/mercutio/mercutio.h b/keyboards/mechwild/mercutio/mercutio.h new file mode 100644 index 0000000000..6f9da39b7a --- /dev/null +++ b/keyboards/mechwild/mercutio/mercutio.h @@ -0,0 +1,40 @@ +/* Copyright 2020 Kyle McCreery + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + + +#define LAYOUT_all( \ + KEN, \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K34, K36, K37, K39, K3A, K3B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K3B, K23, K24, K25, K26 }, \ + { K30, K32, K3A, K39, K34, K36, K37 }, \ + { ___, K1A, KEN, K0A, K09, K08, K07 }, \ + { ___, K31, K0B, K1B, K19, K18, K17 }, \ + { ___, K22, K2B, K2A, K29, K28, K27 } \ +} + + + diff --git a/keyboards/mechwild/mercutio/readme.md b/keyboards/mechwild/mercutio/readme.md new file mode 100644 index 0000000000..0ab08b2b07 --- /dev/null +++ b/keyboards/mechwild/mercutio/readme.md @@ -0,0 +1,24 @@ +# Mercutio + +![Mercutio](https://i.imgur.com/23J9GqXl.jpg) + +A through-hole 40% keyboard kit featuring an encoder and oled display. + +* Keyboard Maintainer: [Kyle McCreery](https://github.com/kylemccreery) +* Hardware Supported: Mercutio v1.0 +* Hardware Availability: [Mercutio on MechWild](https://mechwild.com/product/mercutio/) + +Make example for this keyboard (after setting up your build environment): + + make mechwild/mercutio:default + +## Bootloader +Uses usbasploader, which has been preflashed on the atmega328p before being shipped to you. The usbasploader build available on [hsgw's repository](https://github.com/hsgw/USBaspLoader/tree/plaid) will work if you need to flash a new and unprepared replacement microcontroller. To flash this onto your fresh atmega328p, you will need to use the provided ISP headers and an external ISP programmer. + +In order to put the board into bootloader mode you must first hold the boot button (labeled BOOT) and while holding the boot button, press the reset button (labeled RESET) and release it. Wait for another second, then release the boot button as well. The microcontroller will now be in bootloader mode if the bootloader is present and prepared correctly. Continue to flash as you normally would from this point (ie. QMK Toolbox). If you have autoflash enabled on QMK Toolbox, it will do it automatically now. Reset the board once more in order to use the new firmware (you can do this by unplugging and replugging it or by pressing and releasing the reset button.) + +By default, Mercutio firmware has bootmagic enabled (lite). This means that instead of holding or pressing either of the small buttons, you are able to unplug the Mercutio, hold the top left button (tab), plug the Mercutio back in, and then release the top left button (tab). This will work the same to put the Mercutio into bootloader mode. For more information, see the [bootmagic feature page](https://beta.docs.qmk.fm/using-qmk/hardware-features/feature_bootmagic). Reset the board once more in order to use the new firmware (you can do this by unplugging and replugging it or by pressing and releasing the reset button.) + + + +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). diff --git a/keyboards/mechwild/mercutio/rules.mk b/keyboards/mechwild/mercutio/rules.mk new file mode 100755 index 0000000000..d2a2a02a08 --- /dev/null +++ b/keyboards/mechwild/mercutio/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +BOOTLOADER = USBasp + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes +OLED_DRIVER_ENABLE = yes