Skip to content

Commit

Permalink
Porting Sofle Choc to Vial. (qmk#616)
Browse files Browse the repository at this point in the history
* Porting Sofle Choc to Vial.

* Porting Sofle Choc to Vial.
  • Loading branch information
romones authored Dec 16, 2023
1 parent 0043f1a commit 55db497
Show file tree
Hide file tree
Showing 14 changed files with 925 additions and 0 deletions.
176 changes: 176 additions & 0 deletions keyboards/sofle_choc/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
{
"manufacturer": "Brian Low",
"keyboard_name": "Sofle Choc",
"maintainer": "Brian Low <[email protected]>",
"build": {
"lto": true
},
"diode_direction": "COL2ROW",
"encoder": {
"enabled": true,
"rotary": [
{ "pin_a": "F5", "pin_b": "F4" }
]
},
"features": {
"oled": true,
"rgb_matrix": true,
"extrakey": true
},
"development_board": "promicro",
"rgb_matrix": {
"driver": "ws2812",
"split_count": [29, 29],
"layout": [
{ "flags": 4, "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 }
]
},
"split": {
"enabled": true,
"soft_serial_pin": "D2",
"encoder": {
"right": {
"rotary": [
{ "pin_a": "F4", "pin_b": "F5" }
]
}
}
},
"url": "https://github.com/josefadamcik/SofleKeyboard",
"usb": {
"device_version": "0.0.1",
"pid": "0x0287",
"vid": "0xFC32"
},
"ws2812": {
"pin": "D3"
},
"matrix_pins": {
"cols": ["F6", "F7", "B1", "B3", "B2", "B6"],
"rows": ["C6", "D7", "E6", "B4", "B5"]
},
"layouts": {
"LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0.5},
{"matrix": [0, 1], "x": 1, "y": 0.375},
{"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": [5, 5], "x": 10.5, "y": 0.25},
{"matrix": [5, 4], "x": 11.5, "y": 0.125},
{"matrix": [5, 3], "x": 12.5, "y": 0},
{"matrix": [5, 2], "x": 13.5, "y": 0.125},
{"matrix": [5, 1], "x": 14.5, "y": 0.375},
{"matrix": [5, 0], "x": 15.5, "y": 0.5},
{"matrix": [1, 0], "x": 0, "y": 1.5},
{"matrix": [1, 1], "x": 1, "y": 1.375},
{"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": [6, 5], "x": 10.5, "y": 1.25},
{"matrix": [6, 4], "x": 11.5, "y": 1.125},
{"matrix": [6, 3], "x": 12.5, "y": 1},
{"matrix": [6, 2], "x": 13.5, "y": 1.125},
{"matrix": [6, 1], "x": 14.5, "y": 1.375},
{"matrix": [6, 0], "x": 15.5, "y": 1.5},
{"matrix": [2, 0], "x": 0, "y": 2.5},
{"matrix": [2, 1], "x": 1, "y": 2.375},
{"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": [7, 5], "x": 10.5, "y": 2.25},
{"matrix": [7, 4], "x": 11.5, "y": 2.125},
{"matrix": [7, 3], "x": 12.5, "y": 2},
{"matrix": [7, 2], "x": 13.5, "y": 2.125},
{"matrix": [7, 1], "x": 14.5, "y": 2.375},
{"matrix": [7, 0], "x": 15.5, "y": 2.5},
{"matrix": [3, 0], "x": 0, "y": 3.5},
{"matrix": [3, 1], "x": 1, "y": 3.375},
{"matrix": [3, 2], "x": 2, "y": 3.125},
{"matrix": [3, 3], "x": 3, "y": 3},
{"matrix": [3, 4], "x": 4, "y": 3.125},
{"matrix": [3, 5], "x": 5, "y": 3.25},
{"matrix": [4, 5], "x": 6, "y": 2.75},
{"matrix": [9, 5], "x": 9.5, "y": 2.75},
{"matrix": [8, 5], "x": 10.5, "y": 3.25},
{"matrix": [8, 4], "x": 11.5, "y": 3.125},
{"matrix": [8, 3], "x": 12.5, "y": 3},
{"matrix": [8, 2], "x": 13.5, "y": 3.125},
{"matrix": [8, 1], "x": 14.5, "y": 3.375},
{"matrix": [8, 0], "x": 15.5, "y": 3.5},
{"matrix": [4, 0], "x": 1.5, "y": 4.375},
{"matrix": [4, 1], "x": 2.5, "y": 4.125},
{"matrix": [4, 2], "x": 3.5, "y": 4.15},
{"matrix": [4, 3], "x": 4.5, "y": 4.25},
{"matrix": [4, 4], "x": 6, "y": 4.25, "h": 1.5},
{"matrix": [9, 4], "x": 9.5, "y": 4.25, "h": 1.5},
{"matrix": [9, 3], "x": 11, "y": 4.25},
{"matrix": [9, 2], "x": 12, "y": 4.15},
{"matrix": [9, 1], "x": 13, "y": 4.125},
{"matrix": [9, 0], "x": 14, "y": 4.375}
]
}
}
}
29 changes: 29 additions & 0 deletions keyboards/sofle_choc/keymaps/default/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* Copyright 2023 Brian Low
*
* 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

// Enabling this option changes the startup behavior to listen for an
// active USB communication to delegate which part is master and which
// is slave. With this option enabled and theres’s USB communication,
// then that half assumes it is the master, otherwise it assumes it
// is the slave.
//
// I've found this helps with some ProMicros where the slave does not boot
#define SPLIT_USB_DETECT

#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define SPLIT_TRANSPORT_MIRROR // If LED_MATRIX_KEYPRESSES or LED_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 // limits maximum brightness of LEDs (max 255). Higher may cause the controller to crash.
48 changes: 48 additions & 0 deletions keyboards/sofle_choc/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* Copyright 2023 Brian Low
*
* 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

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* 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 | | Pause |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LCTL | LGUI | LCMD | LALT | /Enter / \Space \ | RALT | RCMD | RGUI | RCTL |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/

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, KC_MPLY,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LCMD, KC_LALT, KC_ENT, KC_SPC, KC_RALT, KC_RCMD, KC_RGUI, KC_RCTL
)
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
{ ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MPRV, KC_MNXT) },
};
#endif
1 change: 1 addition & 0 deletions keyboards/sofle_choc/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes
29 changes: 29 additions & 0 deletions keyboards/sofle_choc/keymaps/via/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* Copyright 2023 Brian Low
*
* 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

// Enabling this option changes the startup behavior to listen for an
// active USB communication to delegate which part is master and which
// is slave. With this option enabled and theres’s USB communication,
// then that half assumes it is the master, otherwise it assumes it
// is the slave.
//
// I've found this helps with some ProMicros where the slave does not boot
#define SPLIT_USB_DETECT

#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define SPLIT_TRANSPORT_MIRROR // If LED_MATRIX_KEYPRESSES or LED_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 // limits maximum brightness of LEDs (max 255). Higher may cause the controller to crash.
48 changes: 48 additions & 0 deletions keyboards/sofle_choc/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* Copyright 2023 Brian Low
*
* 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

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* 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 | | Pause |------+------+------+------+------+------|
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LCTL | LGUI | LCMD | LALT | /Enter / \Space \ | RALT | RCMD | RGUI | RCTL |
* | | | | |/ / \ \ | | | | |
* `----------------------------------' '------''---------------------------'
*/

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, KC_MPLY,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LCMD, KC_LALT, KC_ENT, KC_SPC, KC_RALT, KC_RCMD, KC_RGUI, KC_RCTL
)
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
{ ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MPRV, KC_MNXT) },
};
#endif
2 changes: 2 additions & 0 deletions keyboards/sofle_choc/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENCODER_MAP_ENABLE = yes
VIA_ENABLE = yes
46 changes: 46 additions & 0 deletions keyboards/sofle_choc/keymaps/vial/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* Copyright 2023 Brian Low
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once

#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
// Enabling this option changes the startup behavior to listen for an
// active USB communication to delegate which part is master and which
// is slave. With this option enabled and theres’s USB communication,
// then that half assumes it is the master, otherwise it assumes it
// is the slave.
//
// I've found this helps with some ProMicros where the slave does not boot
#define SPLIT_USB_DETECT

#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define SPLIT_TRANSPORT_MIRROR // If LED_MATRIX_KEYPRESSES or LED_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 // limits maximum brightness of LEDs (max 255). Higher may cause the controller to crash.

// Vial Support
#define VIAL_KEYBOARD_UID {0xA7, 0xA7, 0x9C, 0x4C, 0xE0, 0xB8, 0x00, 0x8D}

// The four corners
#define VIAL_UNLOCK_COMBO_ROWS { 0, 5, 3, 8 }
#define VIAL_UNLOCK_COMBO_COLS { 0, 0, 0, 0 }


#define RGBLED_NUM 70
#define RGBLED_SPLIT {35,35}

#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES

#define BACKLIGHT_BREATHING
Loading

0 comments on commit 55db497

Please sign in to comment.