diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2022-06-27 16:38:28 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2022-06-27 16:38:28 +0200 |
commit | 98b9909429aea0869f7a6f2f44ab386a4a3ff094 (patch) | |
tree | e1080a61bb89a75edc70818489f8044adf597c48 /keyboards/adpenrose | |
parent | b610965fd6d851484025166fb255078b1c809261 (diff) | |
parent | fa3dd373b4925734d9843ae6014349069ffec353 (diff) | |
download | qmk_firmware-98b9909429aea0869f7a6f2f44ab386a4a3ff094.tar.gz qmk_firmware-98b9909429aea0869f7a6f2f44ab386a4a3ff094.zip |
Merge branch 'master' into taamas
Diffstat (limited to 'keyboards/adpenrose')
-rw-r--r-- | keyboards/adpenrose/kintsugi/config.h | 142 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/info.json | 80 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/keymaps/default/keymap.c | 48 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/keymaps/default/readme.md | 1 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/keymaps/snailmap_port/keymap.c | 454 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/keymaps/snailmap_port/readme.md | 30 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/keymaps/snailmap_port/rules.mk | 5 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/keymaps/via/keymap.c | 62 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/keymaps/via/readme.md | 1 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/keymaps/via/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/kintsugi.c | 81 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/kintsugi.h | 46 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/lib/kintsugifont.c | 244 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/post_config.h | 21 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/readme.md | 37 | ||||
-rw-r--r-- | keyboards/adpenrose/kintsugi/rules.mk | 21 |
16 files changed, 1275 insertions, 0 deletions
diff --git a/keyboards/adpenrose/kintsugi/config.h b/keyboards/adpenrose/kintsugi/config.h new file mode 100644 index 0000000000..b3aca40a06 --- /dev/null +++ b/keyboards/adpenrose/kintsugi/config.h @@ -0,0 +1,142 @@ +/* +Copyright 2021 adpenrose + +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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4450 // "ADP" +#define PRODUCT_ID 0x0001 // 'Cause it's my first keeb +#define DEVICE_VER 0x0001 +#define MANUFACTURER adpenrose +#define PRODUCT Kintsugi + +/* key matrix size */ +#define MATRIX_ROWS 10 +#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 { B0, E6, D7, C6, D4, D2, F4, F5, B5, B4 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6, F0 } +#define UNUSED_PINS { D3, C7 } + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/*Rotary encoder - set the resolution fitting your encoder. +Most will need a value of 4. If 1 encoder click results in 2 keycodes sent +increase the value. If you need 2 clicks for 1 keycode, decrease*/ +#define ENCODER_RESOLUTION 4 +#define ENCODERS_PAD_A { B7 } +#define ENCODERS_PAD_B { D5 } +#define TAP_CODE_DELAY 10 + +/* Underglow options: */ +#define RGB_DI_PIN F1 +#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 diff --git a/keyboards/adpenrose/kintsugi/info.json b/keyboards/adpenrose/kintsugi/info.json new file mode 100644 index 0000000000..0e76187335 --- /dev/null +++ b/keyboards/adpenrose/kintsugi/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "Kintsugi", + "url": "https://github.com/ADPenrose/kintsugi_keeb", + "maintainer": "adpenrose", + "layouts": { + "LAYOUT_65_ansi_blocker": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"\\", "x":13.5, "y":1, "w":1.5}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Enc", "x":15, "y":2}, + + {"label":"LShift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"RShift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"M1", "x":15, "y":3}, + + {"label":"LCtrl", "x":0, "y":4, "w":1.25}, + {"label":"LSuper", "x":1.25, "y":4, "w":1.25}, + {"label":"LAlt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"L1", "x":10, "y":4, "w":1.5}, + {"label":"L2", "x":11.5, "y":4, "w":1.5}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/adpenrose/kintsugi/keymaps/default/keymap.c b/keyboards/adpenrose/kintsugi/keymaps/default/keymap.c new file mode 100644 index 0000000000..19d3880b77 --- /dev/null +++ b/keyboards/adpenrose/kintsugi/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2021 adpenrose + * + * 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 + +/* Base layout: + * ,---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backspace| OLED| + * |--------------------------------------------------------------- | + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | \ OLED| + * |---------------------------------------------------------------------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter | ENC | + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |Up| M1 | + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt |MO(1)| |Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_65_ansi_blocker( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_A, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_MUTE, + 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_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT_65_ansi_blocker( + _______, 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_DEL, + _______, RGB_TOG, RGB_VAI, RGB_VAD, RGB_MODE_FORWARD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/adpenrose/kintsugi/keymaps/default/readme.md b/keyboards/adpenrose/kintsugi/keymaps/default/readme.md new file mode 100644 index 0000000000..83bc48086d --- /dev/null +++ b/keyboards/adpenrose/kintsugi/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Kintsugi diff --git a/keyboards/adpenrose/kintsugi/keymaps/snailmap_port/keymap.c b/keyboards/adpenrose/kintsugi/keymaps/snailmap_port/keymap.c new file mode 100644 index 0000000000..4930d5bc68 --- /dev/null +++ b/keyboards/adpenrose/kintsugi/keymaps/snailmap_port/keymap.c @@ -0,0 +1,454 @@ +/* Copyright 2021 adpenrose + * + * 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 + +/* Base layout: + * ,---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backspace| OLED| + * |--------------------------------------------------------------- | + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | \ OLED| + * |---------------------------------------------------------------------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter | ENC | + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |Up| M1 | + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |MO(2) |MO(3)| |Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_65_ansi_blocker( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_MUTE, + 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_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(2), MO(3), KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_65_ansi_blocker( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +/* Encoder */ +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + /* Used to change the layer using the encoder. */ + static int8_t selected_layer = 0; + + if (clockwise){ + /* Check if left shift is pressed: */ + if (selected_layer < 4 && get_mods() & MOD_BIT(KC_LSFT)){ + selected_layer ++; + /* If already on the last layer, jumps back to the first layer: */ + if (selected_layer == 4) { + selected_layer = 0; + } + /* Move to the selected layer. */ + layer_move(selected_layer); + } else if (get_mods() & MOD_BIT(KC_RSFT)){ /* Check if right shift is pressed: */ + switch (get_highest_layer(layer_state)){ + default: + /* Go to the next track. */ + tap_code(KC_MNXT); + break; + } + } else { + /* If shift isn't pressed, encoder will do this stuff: */ + switch (get_highest_layer(layer_state)){ + default: + /* Turn up the volume of the system. */ + tap_code(KC_VOLU); + break; + } + } + } else { + /* Check if left shift is pressed: */ + if (selected_layer > -1 && get_mods() & MOD_BIT(KC_LSFT)){ + selected_layer --; + /* If already on the first layer, jumps up to the last layer: */ + if (selected_layer == -1) { + selected_layer = 3; + } + /* Move to the selected layer. */ + layer_move(selected_layer); + } else if (get_mods() & MOD_BIT(KC_RSFT)){ /* Check if right shift is pressed: */ + switch (get_highest_layer(layer_state)){ + default: + /* Go to the previous track. */ + tap_code(KC_MPRV); + break; + } + } else { + /* If shift isn't pressed, encoder will do this stuff: */ + switch (get_highest_layer(layer_state)){ + default: + /* Turn down the volume of the system. */ + tap_code(KC_VOLD); + break; + } + } + } + return false; +} +#endif + +#ifdef OLED_ENABLE +/*=========================================== OLED CONFIGURATION ===========================================*/ +bool oled_horizontal = true; // OLED rotation (true = horizontal, false = vertical) +bool graph_direction = false; // Graph movement (true = right to left, false = left to right) +float graph_top_wpm = 100.0; // Minimum WPM required to reach the top of the graph +int graph_refresh = 1000; // In milliseconds, determines the graph-line frequency +int icon_med_wpm = 50; // WPM required to display the medium snail +int icon_fast_wpm = 72; // WPM required to display the fast snail +// Layer names: Should be exactly 5 characters in length if vertical display, or 6 characters if horizontal +#define MA_LAYER_NAME "QWRTY" // Layer 0 name +#define L1_LAYER_NAME "KICAD" // Layer 1 name +#define L2_LAYER_NAME "NMPAD" // Layer 2 name +#define L3_LAYER_NAME "FUNCT" // Layer 3 name +// Constants required for the background render, the graph render and the WPM counter. THESE VALUES SHOULD NOT BE CHANGED. +bool first_loop = true; +int timer = 0; +int wpm_limit = 20; +int max_wpm = -1; +int wpm_icon = -1; +int graph_lines[65]; +/*================================================================================================================*/ + +/* Rotation of the OLED: */ +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (oled_horizontal) { + return OLED_ROTATION_180; + } else { + return OLED_ROTATION_270; + } +} + +// Toggles pixel on/off, converts horizontal coordinates to vertical equivalent if necessary +static void write_pixel(int x, int y, bool onoff) { + if (oled_horizontal) { + oled_write_pixel(x, y, onoff); + } else { + oled_write_pixel(y, 127 - x, onoff); + } +} + +/*====================================== BASE KEYBOARD MATRIX IMAGES =======================================*/ +// Draw static background image to OLED (keyboard with no bottom row) +static void render_background(void) { + if (oled_horizontal) { + static const char PROGMEM oled_keymap_horizontal[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x84, 0x80, 0x80, 0x80, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, + 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, + 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, + 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, + 0x80, 0x04, 0x04, 0x04, 0x04, 0x84, 0x84, 0x84, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x42, 0x42, 0x02, 0x02, 0x02, 0x02, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x42, 0x40, 0x00, 0x00, + 0x00, 0x02, 0x40, 0x40, 0x40, 0x40, 0x42, 0x40, 0x40, 0x40, 0x40, 0x42, 0x40, 0x40, 0x40, 0x40, + 0x42, 0x40, 0x40, 0x40, 0x40, 0x42, 0x40, 0x40, 0x40, 0x40, 0x42, 0x40, 0x40, 0x40, 0x40, 0x42, + 0x40, 0x40, 0x40, 0x00, 0x02, 0x00, 0x00, 0x40, 0x40, 0x02, 0x00, 0x00, 0x00, 0x40, 0x42, 0x02, + 0x02, 0x02, 0x02, 0x42, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(oled_keymap_horizontal, sizeof(oled_keymap_horizontal)); + } else { + static const char PROGMEM oled_keymap_vertical[] = { + 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, + 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(oled_keymap_vertical, sizeof(oled_keymap_vertical)); + } +} +/*================================================================================================================*/ + + +/*=============================== PIXEL'S COORDINATES FOR EACH PHYSICAL KEY ================================*/ +// Location of OLED keyboard's top left pixel, relative to the display +static const int keymap_template[2] = {46, 0}; +// Location of key highlights top left pixels, relative to keymap_template {X, Y, Key length in px} +static int keymap_coords[MATRIX_ROWS][MATRIX_COLS][3] = { + { {0, 0, 1}, {5, 0, 1}, {10, 0, 1}, {15, 0, 1}, {20, 0, 1}, {25, 0, 1}, {30, 0, 1} }, + { {0, 5, 5}, {9, 5, 1}, {14, 5, 1}, {19, 5, 1}, {24, 5, 1}, {29, 5, 1}, {34, 5, 1} }, + { {0, 10, 6}, {10, 10, 1}, {15, 10, 1}, {20, 10, 1}, {25, 10, 1}, {30, 10, 1}, {35, 10, 1} }, + { {0, 15, 8}, {12, 15, 1}, {17, 15, 1}, {22, 15, 1}, {27, 15, 1}, {32, 15, 1}, {37, 15, 1} }, + { {0, 20, 2}, {6, 20, 2}, {12, 20, 2}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {18, 20, 33} }, + { {35, 0, 1}, {40, 0, 1}, {45, 0, 1}, {50, 0, 1}, {55, 0, 1}, {60, 0, 1}, {65, 0, 8} }, + { {39, 5, 1}, {44, 5, 1}, {49, 5, 1}, {54, 5, 1}, {59, 5, 1}, {64, 5, 1}, {69, 5, 4} }, + { {40, 10, 1}, {45, 10, 1}, {50, 10, 1}, {55, 10, 1}, {60, 10, 1}, {65, 10, 8}, {77, 10, 1} }, + { {42, 15, 1}, {47, 15, 1}, {52, 15, 1}, {57, 15, 1}, {62, 15, 6}, {72, 15, 1}, {77, 15, 1} }, + { {0, 0, 0}, {0, 0, 0}, {55, 20, 2}, {61, 20, 2}, {67, 20, 1}, {72, 20, 1}, {77, 20, 1} }, + }; + +// Toggles pixels surrounding key +static void render_keymap(uint8_t key_row, uint8_t key_col, bool onoff) { + int length = keymap_coords[key_row][key_col][2] + 4; + int left = keymap_coords[key_row][key_col][0] + keymap_template[0]; + int top = keymap_coords[key_row][key_col][1] + keymap_template[1]; + int right = left + length - 1; + int bottom = top + 4; + + // Draw top and bottom walls (horizontal for <length>px) + for (int x = 0; x < length; x++) { + write_pixel(left + x, top, onoff); + write_pixel(left + x, bottom, onoff); + } + // Draw left and right walls (vertical for 5px) + for (int y = 0; y < 5; y++) { + write_pixel(left, top + y, onoff); + write_pixel(right, top + y, onoff); + } +} +/*================================================================================================================*/ + +/*============================================= LAYER'S NAME ===============================================*/ +// Write active layer name +static void render_layer_state(void) { + if (oled_horizontal) { + oled_set_cursor(0, 0); + } else { + oled_set_cursor(0, 15); + } + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR(MA_LAYER_NAME), false); + break; + case 1: + oled_write_P(PSTR(L1_LAYER_NAME), false); + break; + case 2: + oled_write_P(PSTR(L2_LAYER_NAME), false); + break; + case 3: + oled_write_P(PSTR(L3_LAYER_NAME), false); + break; + default: + oled_write("ERROR", false); + break; + } +} +/*================================================================================================================*/ + +/*==================================== WPM COUNTERS (CURRENT AND MAX) ======================================*/ +// Update WPM counters +static void render_wpm_counters(int current_wpm) { + int cursorposition_cur = 2; + int cursorposition_max = 1; + if (oled_horizontal == false) { + cursorposition_cur = 13; + cursorposition_max = 14; + } + + oled_set_cursor(0, cursorposition_cur); + oled_write(get_u8_str(get_current_wpm(), '0'), false); + + char wpm_counter[4]; + wpm_counter[3] = '\0'; + wpm_counter[2] = '0' + current_wpm % 10; + wpm_counter[1] = '0' + (current_wpm / 10) % 10; + wpm_counter[0] = '0' + (current_wpm / 100) % 10; + + if (current_wpm > max_wpm) { + max_wpm = current_wpm; + wpm_limit = max_wpm + 20; + oled_set_cursor(0, cursorposition_max); + oled_write(wpm_counter, false); + } +} +/*================================================================================================================*/ + +/*============================================== WPM GRAPH =================================================*/ +// Update WPM graph +static void render_wpm_graph(int current_wpm) { + int line_height = ((current_wpm / graph_top_wpm) * 7); + if (line_height > 7) { + line_height = 7; + } + // Count graph line pixels, return if nothing to draw + int pixel_count = line_height; + for (int i = 0; i < 64; i++) { + pixel_count += graph_lines[i]; + } + if (pixel_count == 0) { + return; + } + // Shift array elements left or right depending on graph_direction, append new graph line + if (graph_direction) { + for (int i = 0; i < 64; i++) { + graph_lines[i] = graph_lines[i + 1]; + } + graph_lines[64] = line_height; + } else { + for (int i = 64; i > 0; i--) { + graph_lines[i] = graph_lines[i - 1]; + } + graph_lines[0] = line_height; + } + // Draw all graph lines (left to right, bottom to top) + int draw_count, arrpos; + for (int x = 1; x <= 127; x += 2) { + arrpos = x / 2; + draw_count = graph_lines[arrpos]; + for (int y = 31; y >= 25; y--) { + if (draw_count > 0) { + write_pixel(x, y, true); + draw_count--; + } else { + write_pixel(x, y, false); + } + } + } +} +/*================================================================================================================*/ + +/*======================================== WPM BASED SNAIL ICON ============================================*/ +// Update WPM snail icon +static void render_wpm_icon(int current_wpm) { + // wpm_icon is used to prevent unnecessary redraw + if ((current_wpm < icon_med_wpm) && (wpm_icon != 0)) { + wpm_icon = 0; + } else if ((current_wpm >= icon_med_wpm) && (current_wpm < icon_fast_wpm) && (wpm_icon != 1)) { + wpm_icon = 1; + } else if ((current_wpm >= icon_fast_wpm) && (wpm_icon != 2)) { + wpm_icon = 2; + } else { + return; + } + static const char PROGMEM snails[][2][24] = { + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0xA0, 0x20, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x50, 0x88, 0x04, 0x00, 0x00}, + {0x40, 0x60, 0x50, 0x4E, 0x51, 0x64, 0x4A, 0x51, 0x54, 0x49, 0x41, 0x62, 0x54, 0x49, 0x46, 0x41, 0x40, 0x30, 0x09, 0x04, 0x02, 0x01, 0x00, 0x00}}, + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x04, 0x98, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00}, + {0x60, 0x50, 0x54, 0x4A, 0x51, 0x64, 0x4A, 0x51, 0x55, 0x49, 0x41, 0x62, 0x54, 0x49, 0x46, 0x41, 0x21, 0x10, 0x0A, 0x08, 0x05, 0x02, 0x00, 0x00}}, + {{0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x10, 0x10, 0x10, 0x20, 0x40, 0x40, 0xC0, 0x80, 0x80, 0x00, 0x00, 0x00}, + {0x60, 0x58, 0x54, 0x62, 0x49, 0x54, 0x52, 0x51, 0x55, 0x49, 0x62, 0x52, 0x4D, 0x45, 0x46, 0x22, 0x21, 0x11, 0x10, 0x0A, 0x08, 0x05, 0x02, 0x00}} + }; + if (oled_horizontal) { + oled_set_cursor(3, 1); + oled_write_raw_P(snails[wpm_icon][0], sizeof(snails[wpm_icon][0])); + oled_set_cursor(3, 2); + oled_write_raw_P(snails[wpm_icon][1], sizeof(snails[wpm_icon][1])); + } else { + oled_set_cursor(0, 11); + oled_write_raw_P(snails[wpm_icon][0], sizeof(snails[wpm_icon][0])); + oled_set_cursor(0, 12); + oled_write_raw_P(snails[wpm_icon][1], sizeof(snails[wpm_icon][1])); + } +} +/*================================================================================================================*/ + +/* Function that renders stuff on the oled */ +bool oled_task_user(void) { + // Draw OLED keyboard, preventing redraw. + if (first_loop) { + render_background(); + first_loop = false; + } + + // Get current WPM + int current_wpm = get_current_wpm(); + // Write active layer name to display + render_layer_state(); + // Update WPM counters + render_wpm_counters(current_wpm); + // Update WPM snail icon + render_wpm_icon(current_wpm); + // Update WPM graph every graph_refresh milliseconds + if (timer_elapsed(timer) > graph_refresh) { + render_wpm_graph(current_wpm); + timer = timer_read(); + } + + return false; +} +#endif + +// Called by QMK during key processing +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + #ifdef OLED_ENABLE + // Toggle pixels surrounding key + render_keymap(record->event.key.row, record->event.key.col, record->event.pressed); + #endif + + return true; +} diff --git a/keyboards/adpenrose/kintsugi/keymaps/snailmap_port/readme.md b/keyboards/adpenrose/kintsugi/keymaps/snailmap_port/readme.md new file mode 100644 index 0000000000..eb7b7577af --- /dev/null +++ b/keyboards/adpenrose/kintsugi/keymaps/snailmap_port/readme.md @@ -0,0 +1,30 @@ +# SnailMap-ported keymap for the Kintsugi + +## Features + +- Keyboard matrix that highlights whichever key is currently pressed. +- Little cute snail icon that changes acording to the current WPM. +- Counters for current and max WPM values. +- Active layer name. +- Mini WPM graph. + +## How to customize + +The `OLED configuration variables` can be used to easily customize the display: + +``` +oled_horizontal - Horizontal or vertical orientation +graph_direction - Graph movement direction +graph_refresh - Frequency of graph lines +graph_top_wpm - WPM required to reach the top of the graph +icon_med_wpm - WPM required to display the medium snail +icon_fast_wpm - WPM required to display the fast snail +MA_LAYER_NAME - Layer 0 display name +L1_LAYER_NAME - Layer 1 display name +L2_LAYER_NAME - Layer 2 display name +L3_LAYER_NAME - Layer 3 display name +``` + +___ + +###### *This keymap is an adaptation designed to work with the Kintsugi keyboard. The original SnailMap keymap was created by [dogspace](https://github.com/dogspace) for the Nibble keyboard, and you can check it [here](https://github.com/qmk/qmk_firmware/tree/master/keyboards/nullbitsco/nibble/keymaps/snailmap).*
\ No newline at end of file diff --git a/keyboards/adpenrose/kintsugi/keymaps/snailmap_port/rules.mk b/keyboards/adpenrose/kintsugi/keymaps/snailmap_port/rules.mk new file mode 100644 index 0000000000..8058dc57fc --- /dev/null +++ b/keyboards/adpenrose/kintsugi/keymaps/snailmap_port/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +WPM_ENABLE = yes +SPACE_CADET_ENABLE = no +MAGIC_ENABLE = no diff --git a/keyboards/adpenrose/kintsugi/keymaps/via/keymap.c b/keyboards/adpenrose/kintsugi/keymaps/via/keymap.c new file mode 100644 index 0000000000..ea0b06070d --- /dev/null +++ b/keyboards/adpenrose/kintsugi/keymaps/via/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2021 adpenrose + * + * 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 + +/* Base layout: + * ,---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backspace| OLED| + * |--------------------------------------------------------------- | + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | \ OLED| + * |---------------------------------------------------------------------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter | ENC | + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |Up| M1 | + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |MO(2) |MO(3)| |Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_65_ansi_blocker( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_MUTE, + 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_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), MO(2), KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT_65_ansi_blocker( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/adpenrose/kintsugi/keymaps/via/readme.md b/keyboards/adpenrose/kintsugi/keymaps/via/readme.md new file mode 100644 index 0000000000..afdea1ca5b --- /dev/null +++ b/keyboards/adpenrose/kintsugi/keymaps/via/readme.md @@ -0,0 +1 @@ +# VIA keymap for Kintsugi diff --git a/keyboards/adpenrose/kintsugi/keymaps/via/rules.mk b/keyboards/adpenrose/kintsugi/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/adpenrose/kintsugi/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/adpenrose/kintsugi/kintsugi.c b/keyboards/adpenrose/kintsugi/kintsugi.c new file mode 100644 index 0000000000..ff62858377 --- /dev/null +++ b/keyboards/adpenrose/kintsugi/kintsugi.c @@ -0,0 +1,81 @@ +/* Copyright 2021 adpenrose + * + * 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 "kintsugi.h" + +/* Encoder */ +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { + return false; + } else { +/* The switch case allows for different encoder mappings on different layers, "default" map gets applied for all unspecified layers */ + switch(get_highest_layer(layer_state)){ + case 1: + if (clockwise) { + tap_code(KC_MNXT); + } else { + tap_code(KC_MPRV); + } + break; + default: + if (clockwise){ + tap_code(KC_VOLU); + } else{ + tap_code(KC_VOLD); + } + break; + } + } + return true; +} +#endif + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} + +static void render_logo(void) { +/* Kintsugi logo render: */ + static const char PROGMEM logo_1[] = { + 0x83, 0x84, 0x85, 0x86, 0x87, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0x00 + }; + static const char PROGMEM logo_2[] = { + 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0x00 + }; + static const char PROGMEM logo_3[] = { + 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0x00 + }; + oled_set_cursor(0,3); + oled_write_P(logo_1, false); + oled_set_cursor(0,7); + oled_write_P(logo_2, false); + oled_set_cursor(0,11); + oled_write_P(logo_3, false); +} + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + else { + render_logo(); + } + + return true; +} +#endif diff --git a/keyboards/adpenrose/kintsugi/kintsugi.h b/keyboards/adpenrose/kintsugi/kintsugi.h new file mode 100644 index 0000000000..37ce6cc6e5 --- /dev/null +++ b/keyboards/adpenrose/kintsugi/kintsugi.h @@ -0,0 +1,46 @@ +/* Copyright 2021 adpenrose + * + * 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 "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_65_ansi_blocker( \ + K00, K01, K02, K03, K04, K05, K06, K50, K51, K52, K53, K54, K55, K56, \ + K10, K11, K12, K13, K14, K15, K16, K60, K61, K62, K63, K64, K65, K66, \ + K20, K21, K22, K23, K24, K25, K26, K70, K71, K72, K73, K74, K75, K76, \ + K30, K31, K32, K33, K34, K35, K36, K80, K81, K82, K83, K84, K85, K86, \ + K40, K41, K42, K46, K92, K93, K94, K95, K96 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46 }, \ + { K50, K51, K52, K53, K54, K55, K56 }, \ + { K60, K61, K62, K63, K64, K65, K66 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, K82, K83, K84, K85, K86 }, \ + { KC_NO, KC_NO, K92, K93, K94, K95, K96 } \ +} diff --git a/keyboards/adpenrose/kintsugi/lib/kintsugifont.c b/keyboards/adpenrose/kintsugi/lib/kintsugifont.c new file mode 100644 index 0000000000..e319275b17 --- /dev/null +++ b/keyboards/adpenrose/kintsugi/lib/kintsugifont.c @@ -0,0 +1,244 @@ +/* Copyright 2021 adpenrose + * + * 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 "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, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0xA4, 0xA4, 0x9C, 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, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xC0, 0xC0, 0xE0, 0xF0, 0xF0, + 0xF8, 0xFC, 0xBC, 0x9E, 0x9E, 0xBC, + 0xFC, 0xF8, 0xF0, 0xF0, 0xE0, 0xC0, + 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0xC0, 0xF0, + 0xFC, 0xFE, 0x8E, 0xE6, 0x70, 0x00, + 0xFC, 0xFE, 0xFE, 0xFC, 0x00, 0x38, + 0x78, 0xF0, 0xFE, 0xFE, 0xF0, 0x78, + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, + 0x78, 0x78, 0x78, 0x78, 0x78, 0x7E, + 0x7E, 0xFE, 0xFC, 0xFC, 0x7C, 0x18, + 0x00, 0x9E, 0xBC, 0x1C, 0x02, 0x0F, + 0x1E, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0xE1, 0xE1, 0xE1, 0xE1, 0xE3, 0xE7, + 0xE7, 0xE3, 0xE3, 0xFF, 0xFF, 0xE3, + 0xE3, 0xE7, 0xE7, 0xE3, 0xE1, 0xE1, + 0xE1, 0xE1, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0xF1, 0xFB, + 0xFF, 0xFF, 0xE7, 0xF3, 0xF8, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0xC7, + 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, + 0xC7, 0x87, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x8E, 0x9E, + 0x9E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, + 0x1E, 0x9F, 0xDF, 0xFF, 0xFF, 0xFE, + 0xCF, 0x0F, 0x0F, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, + 0x70, 0x71, 0x73, 0x73, 0x7F, 0x7E, + 0x7C, 0x70, 0x70, 0x7F, 0x7F, 0x70, + 0x70, 0x7C, 0x7E, 0x7F, 0x73, 0x73, + 0x71, 0x70, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x7C, 0x3E, + 0x01, 0x3E, 0x61, 0x0E, 0x1E, 0x00, + 0x3F, 0x7F, 0x7F, 0x7F, 0x73, 0x73, + 0x71, 0x70, 0x77, 0x77, 0x70, 0x71, + 0x73, 0x73, 0x73, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1F, 0x7F, + 0x7F, 0x78, 0x78, 0x78, 0x78, 0x78, + 0x78, 0x79, 0x7B, 0x7B, 0x7B, 0x03, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/adpenrose/kintsugi/post_config.h b/keyboards/adpenrose/kintsugi/post_config.h new file mode 100644 index 0000000000..e1f92f9e60 --- /dev/null +++ b/keyboards/adpenrose/kintsugi/post_config.h @@ -0,0 +1,21 @@ +/* +Copyright 2021 adpenrose + +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/>. +*/ + +#ifndef OLED_FONT_H +# define OLED_FONT_H "lib/kintsugifont.c" +# define OLED_TIMEOUT 120000 +#endif
\ No newline at end of file diff --git a/keyboards/adpenrose/kintsugi/readme.md b/keyboards/adpenrose/kintsugi/readme.md new file mode 100644 index 0000000000..2aa402543e --- /dev/null +++ b/keyboards/adpenrose/kintsugi/readme.md @@ -0,0 +1,37 @@ +# Kintsugi + +![kintsugi](https://i.imgur.com/HPdmzdCl.jpeg) + +A 65%-ish keyboard with some extra features. + +## Features + +* Powered by an ATmega32u4 microcontroller (current version needs an Elite-C to work). +* Encoder. +* OLED screen. +* Underglow. +* Hotswap sockets. + +## General info + +* Keyboard Maintainer: [Arturo Avila](https://github.com/ADPenrose) +* Hardware Supported: Kintsugi V1 PCB +* Hardware Availability: [Arturo Avila](https://github.com/ADPenrose) + +Make example for this keyboard (after setting up your build environment): + + make kintsugi:default + +Flashing example for this keyboard: + + make kintsugi: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 front of the Elite-C microcontroller _**before soldering**_ it to the PCB- some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `RESET` if it is available diff --git a/keyboards/adpenrose/kintsugi/rules.mk b/keyboards/adpenrose/kintsugi/rules.mk new file mode 100644 index 0000000000..fe95a9b72b --- /dev/null +++ b/keyboards/adpenrose/kintsugi/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes # Encoder functionality +OLED_ENABLE = yes # OLED functionality +OLED_DRIVER = SSD1306 |