From 45f249545a91888d4079d64e8bb9b76785073183 Mon Sep 17 00:00:00 2001 From: Woze Parrot Date: Fri, 8 Mar 2024 23:19:53 -0500 Subject: [PATCH] feat: test porting to new qmk --- keyboards/mushycloud/config.h | 148 +-------- keyboards/mushycloud/info.json | 75 ++++- keyboards/mushycloud/keymaps/default/keymap.c | 296 ++---------------- keyboards/mushycloud/readme.md | 18 +- keyboards/mushycloud/rules.mk | 29 +- keyboards/mushycloud_old/config.h | 162 ++++++++++ keyboards/mushycloud_old/info.json | 19 ++ .../mushycloud_old/keymaps/default/keymap.c | 277 ++++++++++++++++ .../keymaps/default/readme.md | 0 .../mushycloud.c | 0 .../mushycloud.h | 0 keyboards/mushycloud_old/readme.md | 17 + keyboards/mushycloud_old/rules.mk | 28 ++ 13 files changed, 608 insertions(+), 461 deletions(-) create mode 100644 keyboards/mushycloud_old/config.h create mode 100644 keyboards/mushycloud_old/info.json create mode 100644 keyboards/mushycloud_old/keymaps/default/keymap.c rename keyboards/{mushycloud => mushycloud_old}/keymaps/default/readme.md (100%) rename keyboards/{mushycloud => mushycloud_old}/mushycloud.c (100%) rename keyboards/{mushycloud => mushycloud_old}/mushycloud.h (100%) create mode 100644 keyboards/mushycloud_old/readme.md create mode 100644 keyboards/mushycloud_old/rules.mk diff --git a/keyboards/mushycloud/config.h b/keyboards/mushycloud/config.h index 5490302b38a8..f0acc8e8cec4 100644 --- a/keyboards/mushycloud/config.h +++ b/keyboards/mushycloud/config.h @@ -1,133 +1,8 @@ -/* -Copyright 2021 Woze Parrot - -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 . -*/ +// Copyright 2023 wozeparrot (@wozeparrot) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xC70D -#define DEVICE_VER 0x0001 -#define MANUFACTURER Woze Parrot -#define PRODUCT mushycloud - -/* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 7 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { D4, C6, D7, E6 } -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ -#define SOFT_SERIAL_PIN D3 // or D1, D2, D3, E6 -#define EE_HANDS - -//#define LED_NUM_LOCK_PIN B0 -//#define LED_CAPS_LOCK_PIN B1 -//#define LED_SCROLL_LOCK_PIN B2 -//#define LED_COMPOSE_PIN B3 -//#define LED_KANA_PIN B4 - -//#define BACKLIGHT_PIN B7 -//#define BACKLIGHT_LEVELS 3 -//#define BACKLIGHT_BREATHING - -//#define RGB_DI_PIN E2 -//#ifdef RGB_DI_PIN -//# define RGBLED_NUM 16 -//# define RGBLIGHT_HUE_STEP 8 -//# define RGBLIGHT_SAT_STEP 8 -//# define RGBLIGHT_VAL_STEP 8 -//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -/*== all animations enable ==*/ -//# define RGBLIGHT_ANIMATIONS -/*== or choose animations ==*/ -//# define RGBLIGHT_EFFECT_BREATHING -//# define RGBLIGHT_EFFECT_RAINBOW_MOOD -//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL -//# define RGBLIGHT_EFFECT_SNAKE -//# define RGBLIGHT_EFFECT_KNIGHT -//# define RGBLIGHT_EFFECT_CHRISTMAS -//# define RGBLIGHT_EFFECT_STATIC_GRADIENT -//# define RGBLIGHT_EFFECT_RGB_TEST -//# define RGBLIGHT_EFFECT_ALTERNATING -/*== customize breathing effect ==*/ -/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ -//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 -/*==== use exp() and sin() ====*/ -//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 -//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 -//#endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* 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 - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is useful for the Windows task manager shortcut (ctrl+shift+esc). - */ -//#define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -143,22 +18,3 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -/* disable these deprecated features by default */ -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -/* Bootmagic Lite key configuration */ -//#define BOOTMAGIC_LITE_ROW 0 -//#define BOOTMAGIC_LITE_COLUMN 0 - -#define TAPPING_TERM 125 - -#define OLED_TIMEOUT 10000 - -#define LEADER_TIMEOUT 300 -#define LEADER_PER_KEY_TIMING - -#define MK_3_SPEED -#define MK_MOMENTARY_ACCEL -#define MK_C_OFFSET_UNMOD 8 \ No newline at end of file diff --git a/keyboards/mushycloud/info.json b/keyboards/mushycloud/info.json index b5055191a6ca..286da0ffab9a 100644 --- a/keyboards/mushycloud/info.json +++ b/keyboards/mushycloud/info.json @@ -1,18 +1,73 @@ { + "manufacturer": "wozeparrot", "keyboard_name": "mushycloud", - "url": "", - "maintainer": "Woze Parrot", - "width": 7, - "height": 4, + "maintainer": "wozeparrot", + "bootloader": "caterina", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["F4", "F5", "F6", "F7", "B1", "B3", "B2"], + "rows": ["D4", "C6", "D7", "E6"] + }, + "processor": "atmega32u4", + "url": "https://github.com/wozeparrot/MushyCloud", + "usb": { + "device_version": "1.0.0", + "pid": "0xC70D", + "vid": "0xFEED" + }, "layouts": { "LAYOUT": { "layout": [ - {"label": "k00", "x": 0, "y": 0}, - {"label": "k01", "x": 1, "y": 0}, - {"label": "k02", "x": 2, "y": 0}, - - {"label": "k10", "x": 0, "y": 1, "w": 1.5}, - {"label": "k12", "x": 1.5, "y": 1, "w": 1.5} + { "matrix": [0, 0], "x": 0, "y": 0.25 }, + { "matrix": [0, 1], "x": 1, "y": 0.25 }, + { "matrix": [0, 2], "x": 2, "y": 0.125 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [0, 4], "x": 4, "y": 0.125 }, + { "matrix": [0, 5], "x": 5, "y": 0.25 }, + { "matrix": [0, 8], "x": 8, "y": 0.25 }, + { "matrix": [0, 9], "x": 9, "y": 0.125 }, + { "matrix": [0, 10], "x": 10, "y": 0 }, + { "matrix": [0, 11], "x": 11, "y": 0.125 }, + { "matrix": [0, 12], "x": 12, "y": 0.25 }, + { "matrix": [0, 13], "x": 13, "y": 0.25 }, + { "matrix": [1, 0], "x": 0, "y": 1.25 }, + { "matrix": [1, 1], "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "x": 2, "y": 1.125 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [1, 4], "x": 4, "y": 1.125 }, + { "matrix": [1, 5], "x": 5, "y": 1.25 }, + { "matrix": [1, 8], "x": 8, "y": 1.25 }, + { "matrix": [1, 9], "x": 9, "y": 1.125 }, + { "matrix": [1, 10], "x": 10, "y": 1 }, + { "matrix": [1, 11], "x": 11, "y": 1.125 }, + { "matrix": [1, 12], "x": 12, "y": 1.25 }, + { "matrix": [1, 13], "x": 13, "y": 1.25 }, + { "matrix": [2, 0], "x": 0, "y": 2.25 }, + { "matrix": [2, 1], "x": 1, "y": 2.25 }, + { "matrix": [2, 2], "x": 2, "y": 2.125 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [2, 4], "x": 4, "y": 2.125 }, + { "matrix": [2, 5], "x": 5, "y": 2.25 }, + { "matrix": [2, 8], "x": 8, "y": 2.25 }, + { "matrix": [2, 9], "x": 9, "y": 2.125 }, + { "matrix": [2, 10], "x": 10, "y": 2 }, + { "matrix": [2, 11], "x": 11, "y": 2.125 }, + { "matrix": [2, 12], "x": 12, "y": 2.25 }, + { "matrix": [2, 13], "x": 13, "y": 2.25 }, + { "matrix": [3, 3], "x": 3.5, "y": 3.25 }, + { "matrix": [3, 4], "x": 4.5, "y": 3.5 }, + { "matrix": [3, 5], "x": 5.5, "y": 3.75 }, + { "matrix": [3, 7], "x": 7.5, "y": 3.75 }, + { "matrix": [3, 8], "x": 8.5, "y": 3.5 }, + { "matrix": [3, 9], "x": 9.5, "y": 3.25 } ] } } diff --git a/keyboards/mushycloud/keymaps/default/keymap.c b/keyboards/mushycloud/keymaps/default/keymap.c index ca122fb1bdfa..a4b5f59f5040 100644 --- a/keyboards/mushycloud/keymaps/default/keymap.c +++ b/keyboards/mushycloud/keymaps/default/keymap.c @@ -1,277 +1,27 @@ -/* Copyright 2021 Woze Parrot - * - * 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 -#include - -// Defines names for use in layer keycodes and the keymap -enum layer_names { - _QWERTY, - _LOWER, - _RAISE, - _FN, - _MOUSE -}; +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - FN, - MOUSE -}; +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSPC, \ - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_TAB, FN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ - KC_ESC, KC_LGUI, LOWER, KC_SPC, MOUSE, KC_LEAD, KC_SPC, RAISE, KC_RGUI, KC_LALT \ - ), - [_LOWER] = LAYOUT( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, \ - KC_TRNS, KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_QUOT, KC_MINS, KC_EQL, 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_BSLS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [_RAISE] = LAYOUT( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, \ - KC_TRNS, KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_QUOT, KC_MINS, KC_EQL, 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_BSLS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [_FN] = LAYOUT( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - KC_TRNS, KC_MPLY, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_END, KC_UP, KC_TRNS, KC_TRNS, KC_PSCR, \ - KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_DEL, \ - KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT \ - ), - [_MOUSE] = LAYOUT( - KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, 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_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ) + /* + * ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ + * │Tab│ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │Bsp│ + * ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + * │Ctl│ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ + * ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + * │Sft│ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │Sft│ + * └───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┘ + * ┌───┐ ┌───┐ + * │GUI├───┐ ┌───┤Alt│ + * └───┤Bsp├───┐ ┌───┤Ent├───┘ + * └───┤ │ │ ├───┘ + * └───┘ └───┘ + */ + [0] = LAYOUT_split_3x6_3( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, KC_RALT + ) }; - -uint8_t current_kps = 0; -uint16_t kps_timer = 0; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (kps_timer > 0) { - uint8_t latest_kps = 1000 / timer_elapsed(kps_timer); - current_kps = (latest_kps - current_kps) * 0.0487 + current_kps; - } - kps_timer = timer_read(); - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _FN); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _FN); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _FN); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _FN); - } - return false; - break; - case FN: - if (record->event.pressed) { - layer_on(_FN); - } else { - layer_off(_FN); - } - return false; - break; - case MOUSE: - if (record->event.pressed) { - layer_on(_MOUSE); - } else { - layer_off(_MOUSE); - } - return false; - break; - } - - return true; -} - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_ONE_KEY(KC_T) { - SEND_STRING("The quick brown fox jumps over the lazy dog"); - } - SEQ_ONE_KEY(KC_C) { - SEND_STRING("--- Contact ---\nDiscord: wozeparrot#6403\nEmail: wozeparrot@gmail.com\nGithub: wozeparrot\n--- ------- ---\n"); - } - - SEQ_TWO_KEYS(KC_S, KC_G) { - SEND_STRING(SS_LCTL("t") "github.com\n"); - } - SEQ_TWO_KEYS(KC_S, KC_R) { - SEND_STRING(SS_LCTL("t") "reddit.com\n"); - } - SEQ_TWO_KEYS(KC_S, KC_H) { - SEND_STRING(SS_LCTL("t") "news.ycombinator.com\n"); - } - SEQ_TWO_KEYS(KC_S, KC_C) { - SEND_STRING(SS_LCTL("t") "4chan.org\n"); - } - SEQ_TWO_KEYS(KC_S, KC_Y) { - SEND_STRING(SS_LCTL("t") "youtube.com\n"); - } - - SEQ_ONE_KEY(KC_L) { - SEND_STRING(SS_LGUI(SS_TAP(X_ENT)) SS_DELAY(1000) "waylock0\n"); - } - } -} - -void render_dd(void) { - static const char PROGMEM logo[] = { - // 'qmktest1dd', 32x32px - 0x00, 0xfe, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0xfe, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x7f, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x7f, 0x00 - }; - - oled_write_raw_P(logo, sizeof(logo)); -} - -void render_rr(void) { - static const char PROGMEM logo[] = { - // 'qmktest1rr', 32x32px - 0x00, 0xfe, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, - 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0xfe, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x7f, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, - 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x00 - }; - - oled_write_raw_P(logo, sizeof(logo)); -} - -void render_ll(void) { - static const char PROGMEM logo[] = { - // 'qmktest1ll', 32x32px - 0x00, 0xfe, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, - 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0xfe, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x7f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, - 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x7f, 0x00 - }; - - oled_write_raw_P(logo, sizeof(logo)); -} - -void render_fn(void) { - static const char PROGMEM logo[] = { - // 'qmktest1fn', 32x32px - 0x00, 0xfe, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, - 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0xfe, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x7f, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, - 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x7f, 0x00 - }; - - oled_write_raw_P(logo, sizeof(logo)); -} - -void oled_next_line(void) { - oled_advance_char(); - oled_advance_char(); - oled_advance_char(); - oled_advance_char(); - oled_advance_char(); -} - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_270; -} - -char kps_str[6]; -char wpm_str[6]; -void oled_task_user(void) { - switch (get_highest_layer(layer_state)) { - case _QWERTY: - render_dd(); - break; - case _FN: - render_fn(); - break; - case _RAISE: - render_rr(); - break; - case _LOWER: - render_ll(); - break; - case _MOUSE: - render_dd(); - oled_set_cursor(0, 0); - render_fn(); - oled_render(); - break; - } - - oled_set_cursor(0, 5); - - sprintf(kps_str, "|%03d|", current_kps); - oled_write(kps_str, false); - - if (timer_elapsed(kps_timer) > 1000) { - current_kps = (0 - current_kps) * 0.0487 + current_kps; - kps_timer = timer_read(); - } - - oled_next_line(); - - sprintf(wpm_str, "|%03d|", get_current_wpm()); - oled_write(wpm_str, false); -} diff --git a/keyboards/mushycloud/readme.md b/keyboards/mushycloud/readme.md index 8684c6ebe200..f6df1f262a90 100644 --- a/keyboards/mushycloud/readme.md +++ b/keyboards/mushycloud/readme.md @@ -1,10 +1,12 @@ # mushycloud -3x7 split ortholinear keyboard. +![mushycloud](imgur.com image replace me!) -* Keyboard Maintainer: [Woze Parrot](https://github.com/wozeparrot) -* Hardware Supported: atmega32u4 -* Hardware Availability: [https://github.com/wozeparrot/mushycloud](https://github.com/wozeparrot/mushycloud) +*A short description of the keyboard/project* + +* Keyboard Maintainer: [wozeparrot](https://github.com/wozeparrot) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* Make example for this keyboard (after setting up your build environment): @@ -15,3 +17,11 @@ Flashing example for this keyboard: make mushycloud: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**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/mushycloud/rules.mk b/keyboards/mushycloud/rules.mk index c8e43ec85897..6e7633bfe015 100644 --- a/keyboards/mushycloud/rules.mk +++ b/keyboards/mushycloud/rules.mk @@ -1,28 +1 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = caterina - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # 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 -OLED_DRIVER_ENABLE = yes -TAP_DANCE_ENABLE = no -WPM_ENABLE = yes -LEADER_ENABLE = yes - -SPLIT_KEYBOARD = yes +# This file intentionally left blank diff --git a/keyboards/mushycloud_old/config.h b/keyboards/mushycloud_old/config.h new file mode 100644 index 000000000000..c0556efc4a48 --- /dev/null +++ b/keyboards/mushycloud_old/config.h @@ -0,0 +1,162 @@ +/* +Copyright 2021 Woze Parrot + +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 0xFEED +#define PRODUCT_ID 0xC70D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Woze Parrot +#define PRODUCT mushycloud + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { D4, C6, D7, E6 } +#define MATRIX_COL_PINS \ + { F4, F5, F6, F7, B1, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D3 // or D1, D2, D3, E6 +#define EE_HANDS + +//#define LED_NUM_LOCK_PIN B0 +//#define LED_CAPS_LOCK_PIN B1 +//#define LED_SCROLL_LOCK_PIN B2 +//#define LED_COMPOSE_PIN B3 +//#define LED_KANA_PIN B4 + +//#define BACKLIGHT_PIN B7 +//#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +//#define RGB_DI_PIN E2 +//#ifdef RGB_DI_PIN +//# define RGBLED_NUM 16 +//# define RGBLIGHT_HUE_STEP 8 +//# define RGBLIGHT_SAT_STEP 8 +//# define RGBLIGHT_VAL_STEP 8 +//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +//# define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +//# define RGBLIGHT_EFFECT_BREATHING +//# define RGBLIGHT_EFFECT_RAINBOW_MOOD +//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +//# define RGBLIGHT_EFFECT_CHRISTMAS +//# define RGBLIGHT_EFFECT_STATIC_GRADIENT +//# define RGBLIGHT_EFFECT_RGB_TEST +//# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +//#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * 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 + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 + +#define TAPPING_TERM 125 + +#define OLED_TIMEOUT 10000 + +#define LEADER_TIMEOUT 300 +#define LEADER_PER_KEY_TIMING + +#define MK_3_SPEED +#define MK_MOMENTARY_ACCEL +#define MK_C_OFFSET_UNMOD 8 diff --git a/keyboards/mushycloud_old/info.json b/keyboards/mushycloud_old/info.json new file mode 100644 index 000000000000..b5055191a6ca --- /dev/null +++ b/keyboards/mushycloud_old/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "mushycloud", + "url": "", + "maintainer": "Woze Parrot", + "width": 7, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "k00", "x": 0, "y": 0}, + {"label": "k01", "x": 1, "y": 0}, + {"label": "k02", "x": 2, "y": 0}, + + {"label": "k10", "x": 0, "y": 1, "w": 1.5}, + {"label": "k12", "x": 1.5, "y": 1, "w": 1.5} + ] + } + } +} diff --git a/keyboards/mushycloud_old/keymaps/default/keymap.c b/keyboards/mushycloud_old/keymaps/default/keymap.c new file mode 100644 index 000000000000..ca122fb1bdfa --- /dev/null +++ b/keyboards/mushycloud_old/keymaps/default/keymap.c @@ -0,0 +1,277 @@ +/* Copyright 2021 Woze Parrot + * + * 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 +#include + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _FN, + _MOUSE +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + FN, + MOUSE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSPC, \ + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_TAB, FN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_ESC, KC_LGUI, LOWER, KC_SPC, MOUSE, KC_LEAD, KC_SPC, RAISE, KC_RGUI, KC_LALT \ + ), + [_LOWER] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_TRNS, KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_QUOT, KC_MINS, KC_EQL, 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_BSLS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [_RAISE] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_TRNS, KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_QUOT, KC_MINS, KC_EQL, 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_BSLS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [_FN] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + KC_TRNS, KC_MPLY, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_END, KC_UP, KC_TRNS, KC_TRNS, KC_PSCR, \ + KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_DEL, \ + KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT \ + ), + [_MOUSE] = LAYOUT( + KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, 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_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ) +}; + +uint8_t current_kps = 0; +uint16_t kps_timer = 0; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (kps_timer > 0) { + uint8_t latest_kps = 1000 / timer_elapsed(kps_timer); + current_kps = (latest_kps - current_kps) * 0.0487 + current_kps; + } + kps_timer = timer_read(); + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _FN); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _FN); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _FN); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _FN); + } + return false; + break; + case FN: + if (record->event.pressed) { + layer_on(_FN); + } else { + layer_off(_FN); + } + return false; + break; + case MOUSE: + if (record->event.pressed) { + layer_on(_MOUSE); + } else { + layer_off(_MOUSE); + } + return false; + break; + } + + return true; +} + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_T) { + SEND_STRING("The quick brown fox jumps over the lazy dog"); + } + SEQ_ONE_KEY(KC_C) { + SEND_STRING("--- Contact ---\nDiscord: wozeparrot#6403\nEmail: wozeparrot@gmail.com\nGithub: wozeparrot\n--- ------- ---\n"); + } + + SEQ_TWO_KEYS(KC_S, KC_G) { + SEND_STRING(SS_LCTL("t") "github.com\n"); + } + SEQ_TWO_KEYS(KC_S, KC_R) { + SEND_STRING(SS_LCTL("t") "reddit.com\n"); + } + SEQ_TWO_KEYS(KC_S, KC_H) { + SEND_STRING(SS_LCTL("t") "news.ycombinator.com\n"); + } + SEQ_TWO_KEYS(KC_S, KC_C) { + SEND_STRING(SS_LCTL("t") "4chan.org\n"); + } + SEQ_TWO_KEYS(KC_S, KC_Y) { + SEND_STRING(SS_LCTL("t") "youtube.com\n"); + } + + SEQ_ONE_KEY(KC_L) { + SEND_STRING(SS_LGUI(SS_TAP(X_ENT)) SS_DELAY(1000) "waylock0\n"); + } + } +} + +void render_dd(void) { + static const char PROGMEM logo[] = { + // 'qmktest1dd', 32x32px + 0x00, 0xfe, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0xfe, 0x00, + 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, + 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, + 0x00, 0x7f, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x7f, 0x00 + }; + + oled_write_raw_P(logo, sizeof(logo)); +} + +void render_rr(void) { + static const char PROGMEM logo[] = { + // 'qmktest1rr', 32x32px + 0x00, 0xfe, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, + 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0xfe, 0x00, + 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, + 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, + 0x00, 0x7f, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, + 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x00 + }; + + oled_write_raw_P(logo, sizeof(logo)); +} + +void render_ll(void) { + static const char PROGMEM logo[] = { + // 'qmktest1ll', 32x32px + 0x00, 0xfe, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, + 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0xfe, 0x00, + 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, + 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, + 0x00, 0x7f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, + 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x7f, 0x00 + }; + + oled_write_raw_P(logo, sizeof(logo)); +} + +void render_fn(void) { + static const char PROGMEM logo[] = { + // 'qmktest1fn', 32x32px + 0x00, 0xfe, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, + 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0x02, 0xf2, 0xf2, 0xf2, 0xf2, 0x02, 0x02, 0xfe, 0x00, + 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, + 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, + 0x00, 0x7f, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, + 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x40, 0x4f, 0x4f, 0x4f, 0x4f, 0x40, 0x40, 0x7f, 0x00 + }; + + oled_write_raw_P(logo, sizeof(logo)); +} + +void oled_next_line(void) { + oled_advance_char(); + oled_advance_char(); + oled_advance_char(); + oled_advance_char(); + oled_advance_char(); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} + +char kps_str[6]; +char wpm_str[6]; +void oled_task_user(void) { + switch (get_highest_layer(layer_state)) { + case _QWERTY: + render_dd(); + break; + case _FN: + render_fn(); + break; + case _RAISE: + render_rr(); + break; + case _LOWER: + render_ll(); + break; + case _MOUSE: + render_dd(); + oled_set_cursor(0, 0); + render_fn(); + oled_render(); + break; + } + + oled_set_cursor(0, 5); + + sprintf(kps_str, "|%03d|", current_kps); + oled_write(kps_str, false); + + if (timer_elapsed(kps_timer) > 1000) { + current_kps = (0 - current_kps) * 0.0487 + current_kps; + kps_timer = timer_read(); + } + + oled_next_line(); + + sprintf(wpm_str, "|%03d|", get_current_wpm()); + oled_write(wpm_str, false); +} diff --git a/keyboards/mushycloud/keymaps/default/readme.md b/keyboards/mushycloud_old/keymaps/default/readme.md similarity index 100% rename from keyboards/mushycloud/keymaps/default/readme.md rename to keyboards/mushycloud_old/keymaps/default/readme.md diff --git a/keyboards/mushycloud/mushycloud.c b/keyboards/mushycloud_old/mushycloud.c similarity index 100% rename from keyboards/mushycloud/mushycloud.c rename to keyboards/mushycloud_old/mushycloud.c diff --git a/keyboards/mushycloud/mushycloud.h b/keyboards/mushycloud_old/mushycloud.h similarity index 100% rename from keyboards/mushycloud/mushycloud.h rename to keyboards/mushycloud_old/mushycloud.h diff --git a/keyboards/mushycloud_old/readme.md b/keyboards/mushycloud_old/readme.md new file mode 100644 index 000000000000..8684c6ebe200 --- /dev/null +++ b/keyboards/mushycloud_old/readme.md @@ -0,0 +1,17 @@ +# mushycloud + +3x7 split ortholinear keyboard. + +* Keyboard Maintainer: [Woze Parrot](https://github.com/wozeparrot) +* Hardware Supported: atmega32u4 +* Hardware Availability: [https://github.com/wozeparrot/mushycloud](https://github.com/wozeparrot/mushycloud) + +Make example for this keyboard (after setting up your build environment): + + make mushycloud:default + +Flashing example for this keyboard: + + make mushycloud: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). diff --git a/keyboards/mushycloud_old/rules.mk b/keyboards/mushycloud_old/rules.mk new file mode 100644 index 000000000000..c8e43ec85897 --- /dev/null +++ b/keyboards/mushycloud_old/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # 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 +OLED_DRIVER_ENABLE = yes +TAP_DANCE_ENABLE = no +WPM_ENABLE = yes +LEADER_ENABLE = yes + +SPLIT_KEYBOARD = yes