From ea4692ce679929386a51985166f07353431c8795 Mon Sep 17 00:00:00 2001 From: NCKiser <37519411+NCKiser@users.noreply.github.com> Date: Mon, 1 Apr 2024 22:55:21 -0500 Subject: [PATCH] Add Keyboard La Somme (#696) * Base QMK and Vial Still need to add RGB indicators and OLED * add PCB render to readme * Add RGB indicators for layers, mods, and capslock * Add some really fun OLED code * add OLED mode switching --- keyboards/kiserdesigns/la_somme/config.h | 27 ++ keyboards/kiserdesigns/la_somme/halconf.h | 5 + keyboards/kiserdesigns/la_somme/info.json | 98 +++++++ .../la_somme/keymaps/default/keymap.c | 46 ++++ .../la_somme/keymaps/default/rules.mk | 1 + .../la_somme/keymaps/vial/config.h | 27 ++ .../la_somme/keymaps/vial/keymap.c | 233 +++++++++++++++++ .../la_somme/keymaps/vial/rules.mk | 4 + .../la_somme/keymaps/vial/vial.json | 245 ++++++++++++++++++ keyboards/kiserdesigns/la_somme/mcuconf.h | 8 + keyboards/kiserdesigns/la_somme/readme.md | 23 ++ keyboards/kiserdesigns/la_somme/rules.mk | 1 + 12 files changed, 718 insertions(+) create mode 100644 keyboards/kiserdesigns/la_somme/config.h create mode 100644 keyboards/kiserdesigns/la_somme/halconf.h create mode 100644 keyboards/kiserdesigns/la_somme/info.json create mode 100644 keyboards/kiserdesigns/la_somme/keymaps/default/keymap.c create mode 100644 keyboards/kiserdesigns/la_somme/keymaps/default/rules.mk create mode 100644 keyboards/kiserdesigns/la_somme/keymaps/vial/config.h create mode 100644 keyboards/kiserdesigns/la_somme/keymaps/vial/keymap.c create mode 100644 keyboards/kiserdesigns/la_somme/keymaps/vial/rules.mk create mode 100644 keyboards/kiserdesigns/la_somme/keymaps/vial/vial.json create mode 100644 keyboards/kiserdesigns/la_somme/mcuconf.h create mode 100644 keyboards/kiserdesigns/la_somme/readme.md create mode 100644 keyboards/kiserdesigns/la_somme/rules.mk diff --git a/keyboards/kiserdesigns/la_somme/config.h b/keyboards/kiserdesigns/la_somme/config.h new file mode 100644 index 0000000000..9f5a48eb4f --- /dev/null +++ b/keyboards/kiserdesigns/la_somme/config.h @@ -0,0 +1,27 @@ +/* Copyright 2021 Noah Kiser (NCKiser) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U + +#define RP2040_FLASH_GENERIC_03H + +#define I2C_DRIVER I2CD1 +#define I2C1_SDA_PIN GP18 +#define I2C1_SCL_PIN GP19 + +#define OLED_BRIGHTNESS 255 diff --git a/keyboards/kiserdesigns/la_somme/halconf.h b/keyboards/kiserdesigns/la_somme/halconf.h new file mode 100644 index 0000000000..c4a7101379 --- /dev/null +++ b/keyboards/kiserdesigns/la_somme/halconf.h @@ -0,0 +1,5 @@ +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/kiserdesigns/la_somme/info.json b/keyboards/kiserdesigns/la_somme/info.json new file mode 100644 index 0000000000..bad4ab62a3 --- /dev/null +++ b/keyboards/kiserdesigns/la_somme/info.json @@ -0,0 +1,98 @@ +{ + "manufacturer": "rubybuilds", + "keyboard_name": "La Somme", + "maintainer": "NCKiser", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "encoder": { + "enabled": true, + "rotary": [ + {"pin_a": "GP29", "pin_b": "GP0"} + ] + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true, + "oled": true + }, + "matrix_pins": { + "cols": ["GP22", "GP23", "GP24", "GP26", "GP27", "GP3", "GP4", "GP5", "GP6", "GP7"], + "rows": ["GP1", "GP28", "GP2", "GP25"] + }, + "processor": "RP2040", + "qmk": { + "tap_keycode_delay": 10 + }, + "rgb_matrix": { + "driver": "ws2812", + "led_count": 2, + "layout": [ + {"flags": 4, "matrix": [3, 3], "x": 92, "y": 32}, + {"flags": 4, "matrix": [3, 6], "x": 132, "y": 32} + ] + }, + "url": "https://qmk.fm/keyboards", + "usb": { + "device_version": "0.0.1", + "pid": "0x1503", + "vid": "0x4B44" + }, + "ws2812": { + "pin": "GP17", + "driver": "vendor" + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0.5 }, + { "matrix": [0, 1], "x": 1, "y": 0.25 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0.25 }, + { "matrix": [0, 4], "x": 4, "y": 0.25 }, + { "matrix": [0, 5], "x": 6.5, "y": 0.25 }, + { "matrix": [0, 6], "x": 7.5, "y": 0.25 }, + { "matrix": [0, 7], "x": 8.5, "y": 0 }, + { "matrix": [0, 8], "x": 9.5, "y": 0.25 }, + { "matrix": [0, 9], "x": 10.5, "y": 0.5 }, + + { "matrix": [1, 0], "x": 0, "y": 1.5 }, + { "matrix": [1, 1], "x": 1, "y": 1.25 }, + { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [1, 3], "x": 3, "y": 1.25 }, + { "matrix": [1, 4], "x": 4, "y": 1.25 }, + { "matrix": [1, 5], "x": 6.5, "y": 1.25 }, + { "matrix": [1, 6], "x": 7.5, "y": 1.25 }, + { "matrix": [1, 7], "x": 8.5, "y": 1 }, + { "matrix": [1, 8], "x": 9.5, "y": 1.25 }, + { "matrix": [1, 9], "x": 10.5, "y": 1.5 }, + + { "matrix": [2, 0], "x": 0, "y": 2.5 }, + { "matrix": [2, 1], "x": 1, "y": 2.25 }, + { "matrix": [2, 2], "x": 2, "y": 2 }, + { "matrix": [2, 3], "x": 3, "y": 2.25 }, + { "matrix": [2, 4], "x": 4, "y": 2.25 }, + { "matrix": [2, 5], "x": 6.5, "y": 2.25 }, + { "matrix": [2, 6], "x": 7.5, "y": 2.25 }, + { "matrix": [2, 7], "x": 8.5, "y": 2 }, + { "matrix": [2, 8], "x": 9.5, "y": 2.25 }, + { "matrix": [2, 9], "x": 10.5, "y": 2.5 }, + + { "matrix": [3, 0], "x": 1, "y": 3.25 }, + { "matrix": [3, 1], "x": 2, "y": 3 }, + { "matrix": [3, 2], "x": 3, "y": 3.25 }, + { "matrix": [3, 3], "x": 4, "y": 3.25 }, + { "matrix": [3, 6], "x": 6.5, "y": 3.25 }, + { "matrix": [3, 7], "x": 7.5, "y": 3.25 }, + { "matrix": [3, 8], "x": 8.5, "y": 3 }, + { "matrix": [3, 9], "x": 9.5, "y": 3.25 }, + + { "matrix": [3, 4], "x": 5.25, "y": 0.5 } + ] + } + } +} diff --git a/keyboards/kiserdesigns/la_somme/keymaps/default/keymap.c b/keyboards/kiserdesigns/la_somme/keymaps/default/keymap.c new file mode 100644 index 0000000000..26f38a985f --- /dev/null +++ b/keyboards/kiserdesigns/la_somme/keymaps/default/keymap.c @@ -0,0 +1,46 @@ + /* This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#define KC_NUM_SPC LT(1, KC_SPC) +#define KC_GA LGUI_T(KC_A) +#define KC_AS LALT_T(KC_S) +#define KC_CD LCTL_T(KC_D) +#define KC_SF LSFT_T(KC_F) +#define KC_SJ RSFT_T(KC_J) +#define KC_CK RCTL_T(KC_K) +#define KC_AL RALT_T(KC_L) +#define KC_GSCLN RGUI_T(KC_SCLN) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, + KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_NUM_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_ESC + ), + [1] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, + KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_NO, KC_RPRN, KC_RBRC, KC_RCBR, KC_SCLN, KC_QUOTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; +#endif diff --git a/keyboards/kiserdesigns/la_somme/keymaps/default/rules.mk b/keyboards/kiserdesigns/la_somme/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/kiserdesigns/la_somme/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/kiserdesigns/la_somme/keymaps/vial/config.h b/keyboards/kiserdesigns/la_somme/keymaps/vial/config.h new file mode 100644 index 0000000000..498bcfc2c2 --- /dev/null +++ b/keyboards/kiserdesigns/la_somme/keymaps/vial/config.h @@ -0,0 +1,27 @@ + /* This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define VIAL_KEYBOARD_UID {0xD6, 0xB9, 0x37, 0xBF, 0x7E, 0xEF, 0x49, 0x7D} + +#define VIAL_TAP_DANCE_ENTRIES 32 + +#define VIAL_COMBO_ENTRIES 64 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 16 + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 1 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 9 } + + diff --git a/keyboards/kiserdesigns/la_somme/keymaps/vial/keymap.c b/keyboards/kiserdesigns/la_somme/keymaps/vial/keymap.c new file mode 100644 index 0000000000..6faa1be767 --- /dev/null +++ b/keyboards/kiserdesigns/la_somme/keymaps/vial/keymap.c @@ -0,0 +1,233 @@ + /* This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#define KC_NUM_SPC LT(1, KC_SPC) +#define KC_GA LGUI_T(KC_A) +#define KC_AS LALT_T(KC_S) +#define KC_CD LCTL_T(KC_D) +#define KC_SF LSFT_T(KC_F) +#define KC_SJ RSFT_T(KC_J) +#define KC_CK RCTL_T(KC_K) +#define KC_AL RALT_T(KC_L) +#define KC_GSCLN RGUI_T(KC_SCLN) + +void oled_logo_task(void); +void oled_status_task(void); +void oled_matrix_task(void); +void oled_disabled_task(void); + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, + KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_NUM_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_ESC + ), + [1] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, + KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_NO, KC_RPRN, KC_RBRC, KC_RCBR, KC_SCLN, KC_QUOTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) } +}; +#endif + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (rgb_matrix_is_enabled()){ + HSV layer_hsv = {rgb_matrix_get_hue(), ((int)rgb_matrix_get_sat()>>1)+128, rgb_matrix_get_val()}; //get the matrix hue, sat (minimum 50%), and value + HSV mod_hsv = {rgb_matrix_get_hue(), ((int)rgb_matrix_get_sat()>>1)+128, rgb_matrix_get_val()}; + + layer_hsv.h += 16*get_highest_layer(layer_state|default_layer_state); //hue-shift the layer indicator based on highest layer (of 0-15 layers) + layer_hsv.h = layer_hsv.h % 256; //modulo 256 + + int mods = get_mods() | get_oneshot_mods(); //get all modifiers, either held or OSM + mods = ((mods>>4)|mods) & 0x0F; //combine left and right mods, and take just the bottom 4 bits (0-15) + + mod_hsv.h += 16*mods; //hue-shift the modifier indicator based on the modifiers held (of 0-15 combinations) + mod_hsv.h = mod_hsv.h % 256; //modulo 256 + + if (host_keyboard_led_state().caps_lock) { //if capslock is active + layer_hsv.s = 0; //turn both indicators white + mod_hsv.s = 0; + }; + + RGB layer_rgb = hsv_to_rgb(layer_hsv); + RGB mod_rgb = hsv_to_rgb(mod_hsv); + rgb_matrix_set_color(0, layer_rgb.r, layer_rgb.g, layer_rgb.b); + rgb_matrix_set_color(1, mod_rgb.r, mod_rgb.g, mod_rgb.b); + } + return true; +} + +#ifdef OLED_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_90; +} + +bool oled_task_user(void) { + + oled_set_brightness(rgb_matrix_get_speed()); + + switch (via_get_layout_options()&0x03) { + case 1: + oled_logo_task(); + break; + case 2: + oled_status_task(); + break; + case 3: + oled_matrix_task(); + break; + default: + oled_disabled_task(); + } + + return false; +} + +void oled_logo_task(void) { + const unsigned char lasomme [] PROGMEM = { + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0xf0, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0x80, 0x80, 0x00, 0x40, 0x40, 0x01, 0xc0, + 0x1e, 0x03, 0xfc, 0x00, 0x01, 0xf8, 0x1f, 0x81, 0xc3, 0xe3, 0xe0, 0xe1, 0xf1, 0xf0, 0x07, 0xf0, + 0x3e, 0x07, 0xfc, 0x00, 0x01, 0xf0, 0x7f, 0xc1, 0xe7, 0xe7, 0xe0, 0xf3, 0xf3, 0xf0, 0x0f, 0xf0, + 0x3e, 0x0f, 0x8e, 0x00, 0x03, 0xf0, 0x7c, 0xe1, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xf8, 0x1f, 0x30, + 0x3c, 0x1f, 0x06, 0x00, 0x03, 0xf0, 0xf9, 0xe1, 0xfd, 0xfd, 0xf0, 0xfe, 0xfe, 0xf8, 0x3e, 0x30, + 0x3c, 0x1e, 0x06, 0x00, 0x07, 0xe1, 0xf1, 0xf1, 0xf9, 0xf9, 0xe0, 0xfc, 0xfc, 0xf0, 0x7c, 0x30, + 0x7c, 0x3e, 0x0c, 0x00, 0x07, 0xe1, 0xe1, 0xb1, 0xf1, 0xf1, 0xe0, 0xf8, 0xf8, 0xf0, 0x7c, 0x70, + 0x78, 0x3c, 0x0e, 0x00, 0x07, 0xe1, 0xe1, 0x33, 0xf1, 0xf3, 0xe1, 0xf8, 0xf9, 0xf0, 0xf8, 0x60, + 0x78, 0x3c, 0x0f, 0x04, 0x0c, 0xf3, 0xe0, 0x33, 0xe3, 0xe3, 0xe1, 0xf1, 0xf1, 0xf0, 0xf8, 0xe3, + 0x78, 0x7c, 0x0f, 0x0e, 0x0c, 0xf3, 0xc0, 0x33, 0xc3, 0xc3, 0xc1, 0xe1, 0xe1, 0xe0, 0xf1, 0xc3, + 0x78, 0x78, 0x1f, 0x0c, 0x1e, 0xf3, 0xc0, 0x33, 0xc3, 0xc3, 0xc3, 0xe1, 0xe1, 0xe1, 0xf3, 0x86, + 0xf8, 0x78, 0x1f, 0x0c, 0x1e, 0xf3, 0xc0, 0x33, 0xc3, 0xc3, 0xc3, 0xe1, 0xe1, 0xe1, 0xff, 0x06, + 0xf0, 0xf8, 0x3f, 0x18, 0x3e, 0x73, 0xc0, 0x73, 0x83, 0x83, 0xc7, 0xe1, 0xe1, 0xe3, 0xfe, 0x0c, + 0xf1, 0xf8, 0x3e, 0x18, 0x38, 0x7b, 0xe0, 0x73, 0x83, 0x83, 0xc7, 0xc1, 0xc1, 0xe3, 0xf8, 0x1c, + 0xf1, 0xf8, 0x7e, 0x30, 0x38, 0x79, 0xe0, 0xe3, 0x83, 0x83, 0xcf, 0xc1, 0xc1, 0xe7, 0xf0, 0x18, + 0xf3, 0xfc, 0xfe, 0x70, 0x38, 0x79, 0xf1, 0xe3, 0x83, 0x83, 0xdf, 0xc1, 0xc1, 0xee, 0xf8, 0x38, + 0x7f, 0x3f, 0xdf, 0xe0, 0x1c, 0x78, 0xff, 0xc3, 0x83, 0x83, 0xf9, 0xc1, 0xc1, 0xfe, 0xfc, 0xf0, + 0x7e, 0x1f, 0x8f, 0xc0, 0x1f, 0xf0, 0x7f, 0x83, 0x83, 0x83, 0xf9, 0xc1, 0xc1, 0xfc, 0x7f, 0xe0, + 0x3c, 0x0f, 0x0f, 0x80, 0x07, 0xe0, 0x3f, 0x00, 0x80, 0x81, 0xf0, 0x40, 0x40, 0xf8, 0x3f, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x01, 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 + }; + unsigned int x; + unsigned int y; + unsigned char bit; + uint index = 0; + for (y = 0; y < 32; y++){ + for (x = 0; x < 16; x++){ + for (bit = 0; bit < 8; bit++){ + oled_write_pixel(31-y, (8*x)+bit, lasomme[index]&(0x80>>bit)); + } + index++; + } + } +} + +void oled_status_task(void) { + oled_write_pixel(31, 6, 0); + oled_write_pixel(30, 5, 0); + oled_write_pixel(30, 6, 0); + oled_write_pixel(30, 7, 0); + // Host Keyboard Layer Status + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR(" LYR \n"), false); + break; + case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: + case 9: case 10: case 11: case 12: case 13: case 14: case 15: + oled_write_P(PSTR(" "), true); + oled_write_P(get_u8_str(get_highest_layer(layer_state), '0'), true); + oled_write_P(PSTR(" \n"), true); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_P(PSTR(" LRX \n"), true); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(PSTR(" CAP \n"), led_state.caps_lock); + oled_write_P(PSTR(" NUM \n"), led_state.num_lock); + oled_write_P(PSTR(" SCL \n"), led_state.scroll_lock); + + //Host Keyboard Modifier Status + int mods = get_mods() | get_oneshot_mods(); //get all modifiers, either held or OSM + mods = ((mods>>4)|mods) & 0x0F; //combine left and right mods, and take just the bottom 4 bits (0-15) + oled_write_P(PSTR(" CTL \n"), mods & 0x1); + oled_write_P(PSTR(" SFT \n"), mods & 0x2); + oled_write_P(PSTR(" ALT \n"), mods & 0x4); + oled_write_P(PSTR(" GUI \n"), mods & 0x8); +} + +void oled_matrix_task(void) { + oled_write_pixel(31, 6, 0); + oled_write_pixel(30, 5, 0); + oled_write_pixel(30, 6, 0); + oled_write_pixel(30, 7, 0); + + int row; + int col; + for (row = 0; row < MATRIX_ROWS; row++) { + oled_write_P(PSTR("-----"), false); + + for (col = 0; col < MATRIX_COLS; col++){ + if (matrix_get_row(row) & (1 << col)) { + oled_write_char(col+48, false); + } else { + oled_write_P(PSTR(" "), false); + } + + } + + oled_write_P(PSTR("-----"), false); + } + +} + +void oled_disabled_task(void) { + oled_write_pixel(31, 6, 0); + oled_write_pixel(30, 5, 0); + oled_write_pixel(30, 6, 0); + oled_write_pixel(30, 7, 0); + + oled_write_P(PSTR(" \n"), false); + oled_write_P(PSTR(" \n"), false); + oled_write_P(PSTR(" \n"), false); + oled_write_P(PSTR(" \n"), false); + oled_write_P(PSTR(" \n"), false); + oled_write_P(PSTR(" \n"), false); + oled_write_P(PSTR(" \n"), false); + oled_write_P(PSTR(" \n"), false); +} + +#endif diff --git a/keyboards/kiserdesigns/la_somme/keymaps/vial/rules.mk b/keyboards/kiserdesigns/la_somme/keymaps/vial/rules.mk new file mode 100644 index 0000000000..a861132914 --- /dev/null +++ b/keyboards/kiserdesigns/la_somme/keymaps/vial/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes +ENCODER_MAP_ENABLE = yes +VIALRGB_ENABLE = yes diff --git a/keyboards/kiserdesigns/la_somme/keymaps/vial/vial.json b/keyboards/kiserdesigns/la_somme/keymaps/vial/vial.json new file mode 100644 index 0000000000..ee41974c0d --- /dev/null +++ b/keyboards/kiserdesigns/la_somme/keymaps/vial/vial.json @@ -0,0 +1,245 @@ +{ + "matrix": { + "rows": 4, + "cols": 10 + }, + "lighting": "vialrgb", + "layouts": { + "labels": [ + "2u Left Space", + "2u Right Space", + "Remove Encoder", + [ + "OLED Mode", + "Disabled", + "Logo", + "Status", + "Matrix" + ] + ], + "keymap": [ + [ + { + "y": 1.5, + "x": 2 + }, + "0,2", + { + "x": 5.5 + }, + "0,7" + ], + [ + { + "y": -0.75, + "x": 1 + }, + "0,1", + { + "x": 1 + }, + "0,3", + "0,4", + { + "x": 1.5 + }, + "0,5", + "0,6", + { + "x": 1 + }, + "0,8" + ], + [ + { + "y": -0.75 + }, + "0,0", + { + "x": 4.25 + }, + "3,4", + { + "x": 4.25 + }, + "0,9" + ], + [ + { + "y": -0.5, + "x": 2 + }, + "1,2", + { + "x": 5.5 + }, + "1,7" + ], + [ + { + "y": -0.75, + "x": 1 + }, + "1,1", + { + "x": 1 + }, + "1,3", + "1,4", + { + "x": 0.25, + "d": true + }, + "3,5\n\n\n3,0", + { + "x": 0.25 + }, + "1,5", + "1,6", + { + "x": 1 + }, + "1,8" + ], + [ + { + "y": -0.75 + }, + "1,0", + { + "x": 9.5 + }, + "1,9" + ], + [ + { + "y": -0.75, + "x": 5.25 + }, + "0,0\n\n\n2,0\n\n\n\n\n\ne" + ], + [ + { + "y": -0.75, + "x": 2 + }, + "2,2", + { + "x": 5.5 + }, + "2,7" + ], + [ + { + "y": -0.75, + "x": 1 + }, + "2,1", + { + "x": 1 + }, + "2,3", + "2,4", + { + "x": 1.5 + }, + "2,5", + "2,6", + { + "x": 1 + }, + "2,8" + ], + [ + { + "y": -0.75 + }, + "2,0", + { + "x": 9.5 + }, + "2,9" + ], + [ + { + "y": -0.75, + "x": 5.25 + }, + "0,1\n\n\n2,0\n\n\n\n\n\ne" + ], + [ + { + "y": -0.75, + "x": 2 + }, + "3,1", + { + "x": 5.5 + }, + "3,8" + ], + [ + { + "y": -0.75, + "x": 1 + }, + "3,0", + { + "x": 1 + }, + "3,2\n\n\n0,0", + "3,3\n\n\n0,0", + { + "x": 1.5 + }, + "3,6\n\n\n1,0", + "3,7\n\n\n1,0", + { + "x": 1 + }, + "3,9" + ], + [ + { + "y": -0.25, + "x": 5.25, + "d": true + }, + "0,0\n\n\n2,1\n\n\n\n\n\ne" + ], + [ + { + "y": -0.5, + "x": 3, + "w": 2 + }, + "3,3\n\n\n0,1", + { + "x": 1.5, + "w": 2 + }, + "3,6\n\n\n1,1", + { + "d": true + }, + "3,5\n\n\n3,1", + { + "d": true + }, + "3,5\n\n\n3,2", + { + "d": true + }, + "3,5\n\n\n3,3" + ], + [ + { + "y": -0.5, + "x": 5.25, + "d": true + }, + "0,1\n\n\n2,1\n\n\n\n\n\ne" + ] + ] + } +} diff --git a/keyboards/kiserdesigns/la_somme/mcuconf.h b/keyboards/kiserdesigns/la_somme/mcuconf.h new file mode 100644 index 0000000000..d5b4ef6c60 --- /dev/null +++ b/keyboards/kiserdesigns/la_somme/mcuconf.h @@ -0,0 +1,8 @@ +#pragma once + +#include_next + +#undef RP_I2C_USE_I2C0 +#undef RP_I2C_USE_I2C1 +#define RP_I2C_USE_I2C0 FALSE +#define RP_I2C_USE_I2C1 TRUE diff --git a/keyboards/kiserdesigns/la_somme/readme.md b/keyboards/kiserdesigns/la_somme/readme.md new file mode 100644 index 0000000000..c098e61855 --- /dev/null +++ b/keyboards/kiserdesigns/la_somme/readme.md @@ -0,0 +1,23 @@ +# La Somme + +![La Somme](https://i.imgur.com/E9JGFkX.jpg) + +*A unibody-split col-stag 10u board by [rubybuilds](https://github.com/onisage) with the PCB designed by [NoahK](https://github.com/NCKiser)* +* Keyboard Maintainer: [NCKiser](https://github.com/NCKiser) +* Hardware Supported: La Somme PCB, rp2040 +* Hardware Availability: shop.rubybuilds.com + +Make example for this keyboard (after setting up your build environment): + + make kiserdesigns/la_somme:default + +Flashing example for this keyboard: + + make kiserdesigns/la_somme: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 (the top left key or "Q") and plug in the keyboard +* **Physical reset button(s)**: On the back of the PCB: tap the RESET button while holding the BOOT button, or double-tap the RESET button +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/kiserdesigns/la_somme/rules.mk b/keyboards/kiserdesigns/la_somme/rules.mk new file mode 100644 index 0000000000..6e7633bfe0 --- /dev/null +++ b/keyboards/kiserdesigns/la_somme/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank