diff --git a/keyboards/sofle_pico/config.h b/keyboards/sofle_pico/config.h new file mode 100644 index 00000000000..f4f34171fa0 --- /dev/null +++ b/keyboards/sofle_pico/config.h @@ -0,0 +1,23 @@ +// Copyright 2024 Ryan Neff (@JellyTitan) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* Use full duplex communication (TRRS) */ +#define SERIAL_USART_FULL_DUPLEX +#define SERIAL_USART_TX_PIN GP16 +#define SERIAL_USART_RX_PIN GP17 +/* Swap TX and RX pins if keyboard is master half. Only available on some MCU's. This _is_ available on the RP2040 */ +#define SERIAL_USART_PIN_SWAP + +/* I2C for OLEDs */ +#define I2C_DRIVER I2CD1 +#define I2C1_SDA_PIN GP6 +#define I2C1_SCL_PIN GP7 + +#define OLED_DISPLAY_128X64 +#define OLED_TIMEOUT 30000 + +#define ENCODER_MAP_KEY_DELAY 10 + +#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50 diff --git a/keyboards/sofle_pico/halconf.h b/keyboards/sofle_pico/halconf.h new file mode 100644 index 00000000000..ed969d9afca --- /dev/null +++ b/keyboards/sofle_pico/halconf.h @@ -0,0 +1,7 @@ +// Copyright 2024 Ryan Neff (@JellyTitan) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_I2C TRUE +#include_next diff --git a/keyboards/sofle_pico/info.json b/keyboards/sofle_pico/info.json new file mode 100644 index 00000000000..473e427f7b9 --- /dev/null +++ b/keyboards/sofle_pico/info.json @@ -0,0 +1,251 @@ +{ + "manufacturer": "Ryan Neff", + "keyboard_name": "Sofle Pico", + "maintainer": "Ryan Neff ", + "bootloader": "rp2040", + "bootloader_instructions": "Hold the BOOT button while plugging in the usb cable", + "diode_direction": "COL2ROW", + "encoder": { + "rotary": [ + {"pin_a": "GP14", "pin_b": "GP15"} + ] + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "dynamic_tapping_term": true, + "encoder": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "oled": true, + "rgb_matrix": true, + "wpm": true + }, + "matrix_pins": { + "cols": ["GP1", "GP2", "GP3", "GP4", "GP5", "GP8"], + "rows": ["GP9", "GP10", "GP11", "GP12", "GP13"] + }, + "mouse_key": { + "delay": 10, + "interval": 16, + "max_speed": 2, + "time_to_max": 40 + }, + "processor": "RP2040", + "rgb_matrix": { + "sleep": true, + "animations": { + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "typing_heatmap": true + }, + "default": { + "animation": "cycle_out_in", + "speed": 16 + }, + "driver": "ws2812", + "layout": [ + {"matrix": [0, 5], "x": 95, "y": 7, "flags": 4}, + {"matrix": [1, 5], "x": 95, "y": 21, "flags": 4}, + {"matrix": [2, 5], "x": 95, "y": 36, "flags": 4}, + {"matrix": [3, 5], "x": 95, "y": 50, "flags": 4}, + {"matrix": [4, 4], "x": 115, "y": 64, "flags": 4}, + {"matrix": [4, 3], "x": 95, "y": 64, "flags": 4}, + {"matrix": [4, 2], "x": 76, "y": 62, "flags": 4}, + {"matrix": [3, 4], "x": 76, "y": 48, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 33, "flags": 4}, + {"matrix": [1, 4], "x": 76, "y": 19, "flags": 4}, + {"matrix": [0, 4], "x": 76, "y": 5, "flags": 4}, + {"matrix": [0, 3], "x": 57, "y": 3, "flags": 4}, + {"matrix": [1, 3], "x": 57, "y": 17, "flags": 4}, + {"matrix": [2, 3], "x": 57, "y": 31, "flags": 4}, + {"matrix": [3, 3], "x": 57, "y": 46, "flags": 4}, + {"matrix": [4, 1], "x": 57, "y": 62, "flags": 4}, + {"matrix": [4, 0], "x": 38, "y": 64, "flags": 4}, + {"matrix": [3, 2], "x": 38, "y": 48, "flags": 4}, + {"matrix": [2, 2], "x": 38, "y": 33, "flags": 4}, + {"matrix": [1, 2], "x": 38, "y": 19, "flags": 4}, + {"matrix": [0, 2], "x": 38, "y": 5, "flags": 4}, + {"matrix": [0, 1], "x": 19, "y": 7, "flags": 4}, + {"matrix": [1, 1], "x": 19, "y": 21, "flags": 4}, + {"matrix": [2, 1], "x": 19, "y": 36, "flags": 4}, + {"matrix": [3, 1], "x": 19, "y": 50, "flags": 4}, + {"matrix": [3, 0], "x": 0, "y": 50, "flags": 4}, + {"matrix": [2, 0], "x": 0, "y": 36, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 21, "flags": 4}, + {"matrix": [0, 0], "x": 0, "y": 7, "flags": 4}, + {"matrix": [5, 5], "x": 129, "y": 7, "flags": 4}, + {"matrix": [6, 5], "x": 129, "y": 21, "flags": 4}, + {"matrix": [7, 5], "x": 129, "y": 36, "flags": 4}, + {"matrix": [8, 5], "x": 129, "y": 50, "flags": 4}, + {"matrix": [9, 4], "x": 119, "y": 64, "flags": 4}, + {"matrix": [9, 3], "x": 129, "y": 64, "flags": 4}, + {"matrix": [9, 2], "x": 148, "y": 62, "flags": 4}, + {"matrix": [8, 4], "x": 148, "y": 48, "flags": 4}, + {"matrix": [7, 4], "x": 148, "y": 33, "flags": 4}, + {"matrix": [6, 4], "x": 148, "y": 19, "flags": 4}, + {"matrix": [5, 4], "x": 148, "y": 5, "flags": 4}, + {"matrix": [5, 3], "x": 167, "y": 3, "flags": 4}, + {"matrix": [6, 3], "x": 167, "y": 17, "flags": 4}, + {"matrix": [7, 3], "x": 167, "y": 31, "flags": 4}, + {"matrix": [8, 3], "x": 167, "y": 46, "flags": 4}, + {"matrix": [9, 1], "x": 167, "y": 62, "flags": 4}, + {"matrix": [9, 0], "x": 186, "y": 64, "flags": 4}, + {"matrix": [8, 2], "x": 186, "y": 48, "flags": 4}, + {"matrix": [7, 2], "x": 186, "y": 33, "flags": 4}, + {"matrix": [6, 2], "x": 186, "y": 19, "flags": 4}, + {"matrix": [5, 2], "x": 186, "y": 5, "flags": 4}, + {"matrix": [5, 1], "x": 209, "y": 7, "flags": 4}, + {"matrix": [6, 1], "x": 209, "y": 21, "flags": 4}, + {"matrix": [7, 1], "x": 209, "y": 36, "flags": 4}, + {"matrix": [8, 1], "x": 209, "y": 50, "flags": 4}, + {"matrix": [8, 0], "x": 224, "y": 50, "flags": 4}, + {"matrix": [7, 0], "x": 224, "y": 36, "flags": 4}, + {"matrix": [6, 0], "x": 224, "y": 21, "flags": 4}, + {"matrix": [5, 0], "x": 224, "y": 7, "flags": 4} + ], + "max_brightness": 127, + "split_count": [29, 29] + }, + "split": { + "enabled": true, + "bootmagic": { + "matrix": [5, 0] + }, + "encoder": { + "right": { + "rotary": [ + {"pin_a": "GP14", "pin_b": "GP15"} + ] + } + }, + "serial": { + "driver": "vendor" + }, + "transport": { + "sync": { + "layer_state": true + } + } + }, + "tags": ["ortho", "split", "rgb", "encoder", "OLED", "128x64", "tenting_puck"], + "tapping": { + "term": 210 + }, + "url": "https://github.com/JellyTitan/Sofle-Pico", + "usb": { + "device_version": "3.5.4", + "pid": "0x5350", + "vid": "0x4A54" + }, + "ws2812": { + "driver": "vendor", + "pin": "GP0" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "`", "matrix": [0, 0], "x": 0, "y": 0.7}, + {"label": "1", "matrix": [0, 1], "x": 1, "y": 0.7}, + {"label": "2", "matrix": [0, 2], "x": 2, "y": 0.3}, + {"label": "3", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4", "matrix": [0, 4], "x": 4, "y": 0.3}, + {"label": "5", "matrix": [0, 5], "x": 5, "y": 0.45}, + {"label": "6", "matrix": [5, 5], "x": 9, "y": 0.45}, + {"label": "7", "matrix": [5, 4], "x": 10, "y": 0.3}, + {"label": "8", "matrix": [5, 3], "x": 11, "y": 0}, + {"label": "9", "matrix": [5, 2], "x": 12, "y": 0.3}, + {"label": "0", "matrix": [5, 1], "x": 13, "y": 0.7}, + {"label": "`", "matrix": [5, 0], "x": 14, "y": 0.7}, + {"label": "Esc", "matrix": [1, 0], "x": 0, "y": 1.7}, + {"label": "Q", "matrix": [1, 1], "x": 1, "y": 1.7}, + {"label": "W", "matrix": [1, 2], "x": 2, "y": 1.3}, + {"label": "E", "matrix": [1, 3], "x": 3, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4, "y": 1.3}, + {"label": "T", "matrix": [1, 5], "x": 5, "y": 1.45}, + {"label": "Y", "matrix": [6, 5], "x": 9, "y": 1.45}, + {"label": "U", "matrix": [6, 4], "x": 10, "y": 1.3}, + {"label": "I", "matrix": [6, 3], "x": 11, "y": 1}, + {"label": "O", "matrix": [6, 2], "x": 12, "y": 1.3}, + {"label": "P", "matrix": [6, 1], "x": 13, "y": 1.7}, + {"label": "Bspc", "matrix": [6, 0], "x": 14, "y": 1.7}, + {"label": "Tab", "matrix": [2, 0], "x": 0, "y": 2.7}, + {"label": "A", "matrix": [2, 1], "x": 1, "y": 2.7}, + {"label": "S", "matrix": [2, 2], "x": 2, "y": 2.3}, + {"label": "D", "matrix": [2, 3], "x": 3, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4, "y": 2.3}, + {"label": "G", "matrix": [2, 5], "x": 5, "y": 2.45}, + {"label": "H", "matrix": [7, 5], "x": 9, "y": 2.45}, + {"label": "J", "matrix": [7, 4], "x": 10, "y": 2.3}, + {"label": "K", "matrix": [7, 3], "x": 11, "y": 2}, + {"label": "L", "matrix": [7, 2], "x": 12, "y": 2.3}, + {"label": ";", "matrix": [7, 1], "x": 13, "y": 2.7}, + {"label": "'", "matrix": [7, 0], "x": 14, "y": 2.7}, + {"label": "LShift", "matrix": [3, 0], "x": 0, "y": 3.7}, + {"label": "Z", "matrix": [3, 1], "x": 1, "y": 3.7}, + {"label": "X", "matrix": [3, 2], "x": 2, "y": 3.3}, + {"label": "C", "matrix": [3, 3], "x": 3, "y": 3}, + {"label": "V", "matrix": [3, 4], "x": 4, "y": 3.3}, + {"label": "B", "matrix": [3, 5], "x": 5, "y": 3.45}, + {"label": "Mute", "matrix": [4, 5], "x": 6.2, "y": 3.45}, + {"label": "Pause", "matrix": [9, 5], "x": 7.8, "y": 3.45}, + {"label": "N", "matrix": [8, 5], "x": 9, "y": 3.45}, + {"label": "M", "matrix": [8, 4], "x": 10, "y": 3.3}, + {"label": ",", "matrix": [8, 3], "x": 11, "y": 3}, + {"label": ".", "matrix": [8, 2], "x": 12, "y": 3.3}, + {"label": "/", "matrix": [8, 1], "x": 13, "y": 3.7}, + {"label": "RShift", "matrix": [8, 0], "x": 14, "y": 3.7}, + {"label": "LCtrl", "matrix": [4, 0], "x": 2, "y": 4.3}, + {"label": "LGUI", "matrix": [4, 1], "x": 3, "y": 4}, + {"label": "LCmnd", "matrix": [4, 2], "x": 4, "y": 4.3}, + {"label": "LAlt", "matrix": [4, 3], "x": 5.1, "y": 4.5, "h": 1.5}, + {"label": "Enter", "matrix": [4, 4], "x": 6.1, "y": 4.5, "h": 1.5}, + {"label": "Space", "matrix": [9, 4], "x": 7.9, "y": 4.5, "h": 1.5}, + {"label": "RAlt", "matrix": [9, 3], "x": 8.9, "y": 4.5, "h": 1.5}, + {"label": "RCmnd", "matrix": [9, 2], "x": 10, "y": 4.3}, + {"label": "RGui", "matrix": [9, 1], "x": 11, "y": 4}, + {"label": "RCtrl", "matrix": [9, 0], "x": 12, "y": 4.3} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/sofle_pico/keymaps/default/keymap.c b/keyboards/sofle_pico/keymaps/default/keymap.c new file mode 100644 index 00000000000..533464766b9 --- /dev/null +++ b/keyboards/sofle_pico/keymaps/default/keymap.c @@ -0,0 +1,111 @@ +// Copyright 2024 Ryan Neff (@JellyTitan) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum sofle_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + /* + * QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + + [_QWERTY] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, 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_MUTE, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, KC_LALT, KC_LCTL, TL_LOWR, KC_ENT, KC_SPC , TL_UPPR, KC_RCTL, KC_RALT, KC_RGUI + ), + /* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + [_LOWER] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* RAISE + * ,----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, KC_UP , XXXXXXX, XXXXXXX, KC_BSPC, + _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL , KC_BSPC, + _______, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |QK_BOOT| | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |MACWIN| | | |-------. ,-------| | VOLDO| MUTE | VOLUP| | | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | PREV | PLAY | NEXT | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + [_ADJUST] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + // clang-format on +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = {ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, + [1] = {ENCODER_CCW_CW(KC_PGUP, KC_PGDN)}, + [2] = {ENCODER_CCW_CW(_______, _______)}, + [3] = {ENCODER_CCW_CW(_______, _______)}, +}; +#endif diff --git a/keyboards/sofle_pico/keymaps/default/readme.md b/keyboards/sofle_pico/keymaps/default/readme.md new file mode 100644 index 00000000000..a15159d07ca --- /dev/null +++ b/keyboards/sofle_pico/keymaps/default/readme.md @@ -0,0 +1,10 @@ +![SofleKeyboard default keymap](https://i.imgur.com/MZxVvm9.png) +![SofleKeyboard adjust layer](https://i.imgur.com/f5sKy0I.png) + + +# Default keymap for Sofle Pico Keyboard + +Adapted from the classic Sofle Keyboard by Josef Adamcik. +Simplified to serve as a starting point for further customizations. +Layout in [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/gists/76efb423a46cbbea75465cb468eef7ff) +Left encoder controls volume up/down/mute. Right encoder PGUP/PGDOWN. diff --git a/keyboards/sofle_pico/keymaps/default/rules.mk b/keyboards/sofle_pico/keymaps/default/rules.mk new file mode 100644 index 00000000000..7c9bf212a6f --- /dev/null +++ b/keyboards/sofle_pico/keymaps/default/rules.mk @@ -0,0 +1 @@ +TRI_LAYER_ENABLE = yes diff --git a/keyboards/sofle_pico/readme.md b/keyboards/sofle_pico/readme.md new file mode 100644 index 00000000000..1dcfeea3cbf --- /dev/null +++ b/keyboards/sofle_pico/readme.md @@ -0,0 +1,33 @@ +# Sofle Pico Keyboard + +![Sofle Pico](https://raw.githubusercontent.com/JellyTitan/Sofle-Pico/main/docs/images/qmk/sofle_pico_hero_image.jpeg) +![Sofle Pico PCB](https://raw.githubusercontent.com/JellyTitan/Sofle-Pico/main/docs/images/qmk/sofle_pico_pcb_hero_image.jpeg) +Sofle Pico is a 60% Raspberry Pi Pico powered split keyboard boasting a 4x6 layout with an aggressive columnar stagger. It has 5 "thumb" keys on either side, support for 2-4 rotary encoders, per-key RGB lighting, 128x64 OLEDs and a tenting puck mount. + +- Keyboard Maintainer: [Ryan Neff](https://github.com/JellyTitan) +- Hardware Supported: Sofle Pico PCB v3.5.x, Raspberry Pi Pico +- Hardware Availability: [PCB, Case, Parts List](https://github.com/JellyTitan/Sofle-Pico) + +Remember you have to flash both halves of the keyboard for it to work! + +Make example for this keyboard (after setting up your build environment): + + make sofle_pico:default + +Flashing example for this keyboard: + + make sofle_pico: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** (works after you have flashed once): Hold down the top far corner key while plugging in the keyboard (`~` left half, `-` right half). This will also clear the EEPROM. +- **Physical reset button**: Hold the `BOOT` button on the Pico and press the `RST` button on the Pico, release the the `RST` button before the `BOOT` button. +- **Keycode in layout**: In the default layout, the `Bootloader` keycode is above home row pinky on the right side's adjust layer. + +Once you enter the bootloader, the keyboard will show up as a USB device on your computer, you could drag and drop a `.uf2` firmware file to flash it. + +[Keyboard-layout-editor.com](http://www.keyboard-layout-editor.com/#/gists/2fa0527caf2f6e527e4f46787a74a9d2) diff --git a/keyboards/sofle_pico/sofle_pico.c b/keyboards/sofle_pico/sofle_pico.c new file mode 100644 index 00000000000..b237dfc5997 --- /dev/null +++ b/keyboards/sofle_pico/sofle_pico.c @@ -0,0 +1,32 @@ +// Copyright 2024 Ryan Neff (@JellyTitan) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +#ifdef OLED_ENABLE + +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_90; +} + +static void render_logo(void) { + static const char PROGMEM sofle_pico_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0x70, 0xf0, 0xf0, 0xe0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf0, 0xf8, 0xfc, 0x3c, 0x3c, 0x3c, 0x7c, 0xf8, 0xf8, 0xf0, 0x80, 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, 0x3f, 0x3f, 0x7c, 0x78, 0xf8, 0xf8, 0xf0, 0xe0, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xfc, 0x3c, 0x1c, 0x1e, 0x1e, 0x3c, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x1c, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xfc, 0xfc, 0xce, 0xce, 0xce, 0xdc, 0xfc, 0xfc, 0xf8, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1e, 0x1e, 0x1e, 0x3c, 0x3c, 0x3c, 0x3e, 0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x00, 0x01, 0x07, + 0x0f, 0x1f, 0x1e, 0x3c, 0x3c, 0x3c, 0x1e, 0x1f, 0x0f, 0x07, 0x03, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f, 0x3c, 0x38, 0x38, 0x3c, 0x1c, 0x1c, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x06, 0x06, 0x06, 0x0e, 0x9e, 0xfc, 0xf8, 0x00, 0x00, 0x8e, 0x8e, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7c, 0xfe, 0xff, 0x83, 0x01, 0x01, 0x01, 0x83, 0x83, 0x00, 0x00, 0x7e, 0xff, 0xc7, 0x83, 0x01, 0x01, 0x01, + 0x83, 0xff, 0xff, 0x7c, 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, 0xc3, 0xe3, 0xe0, 0xe0, 0xe0, 0xf0, 0x70, 0x70, 0x70, 0x70, 0x30, 0x33, 0x73, 0xe0, 0x60, 0xe0, 0xe0, 0xc0, 0xc1, 0x83, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0x70, 0x30, 0x70, 0x70, 0x70, 0x70, 0x70, 0xf0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1f, 0xff, 0xf8, 0xd0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x20, 0x40, 0xc0, 0x80, 0x00, 0x01, 0x87, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xff, 0xff, 0x03, 0x01, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xf0, 0xf8, 0x7f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x1c, 0x1c, 0x38, 0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x70, 0x38, 0x39, 0xdf, 0xef, 0xf7, 0x7b, 0x39, 0x1c, 0x1c, 0x0e, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0e, 0x0e, 0x1e, 0x1c, 0x3c, 0x79, 0xfb, 0xf7, 0xef, 0x9f, 0x38, 0x30, 0x70, 0x60, 0x60, 0x60, 0x60, 0x70, 0x38, 0x3c, 0x1c, 0x0f, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf8, 0xfc, 0x7e, 0x7f, 0xff, 0xff, 0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xff, 0x7f, 0x7f, 0x3f, 0x7c, 0xf8, 0xf0, 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, 0x7f, 0xff, 0x81, 0x00, 0x00, 0x00, 0x00, 0x01, 0xcf, 0xff, 0xfe, 0x7c, 0x78, 0x78, 0x38, 0x30, 0x30, 0x30, 0x30, 0x30, 0x38, 0x78, 0x78, 0x7c, 0xfe, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x03, 0x07, 0x0f, 0x0e, 0x1e, 0x3f, 0x7f, 0xf1, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xe1, 0xf3, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x07, 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, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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(sofle_pico_logo, sizeof(sofle_pico_logo)); +} + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + render_logo(); + return false; +} + +#endif