From 1edce89d6a65fa8441ff9b144177d2b8875a350c Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 26 Jul 2022 17:55:35 -0400 Subject: [PATCH 01/16] Initial work on adding Sinc Rev. 3 --- keyboards/keebio/sinc/rev3/config.h | 134 ++++++++++++++++ keyboards/keebio/sinc/rev3/rev3.c | 35 +++++ keyboards/keebio/sinc/rev3/rev3.h | 227 ++++++++++++++++++++++++++++ keyboards/keebio/sinc/rev3/rules.mk | 32 ++++ keyboards/keebio/sinc/sinc.h | 3 + 5 files changed, 431 insertions(+) create mode 100644 keyboards/keebio/sinc/rev3/config.h create mode 100644 keyboards/keebio/sinc/rev3/rev3.c create mode 100644 keyboards/keebio/sinc/rev3/rev3.h create mode 100644 keyboards/keebio/sinc/rev3/rules.mk diff --git a/keyboards/keebio/sinc/rev3/config.h b/keyboards/keebio/sinc/rev3/config.h new file mode 100644 index 000000000000..a578a5a19aa3 --- /dev/null +++ b/keyboards/keebio/sinc/rev3/config.h @@ -0,0 +1,134 @@ +/* Copyright 2022 Danny Nguyen + +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 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x3267 +#define DEVICE_VER 0x0300 +#define MANUFACTURER Keebio +#define PRODUCT Sinc Rev. 3 + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +#define DIODE_DIRECTION COL2ROW +// wiring of each half +#define MATRIX_ROW_PINS { GP25, GP19, GP24, GP17, GP16, GP26 } +#define MATRIX_COL_PINS { GP29, GP28, GP27, GP7, GP2, GP3, GP11, GP12, GP13 } +#define MATRIX_ROW_PINS_RIGHT { GP26, GP25, GP19, GP24, GP17, GP16 } +#define MATRIX_COL_PINS_RIGHT { GP29, GP28, GP27, GP7, GP2, GP3, GP11, GP12, GP13 } +//#define SPLIT_HAND_PIN F7 +#define MASTER_LEFT +#define ENCODERS_PAD_A { GP21 } +#define ENCODERS_PAD_B { GP20 } +#define ENCODERS_PAD_A_RIGHT { GP21 } +#define ENCODERS_PAD_B_RIGHT { GP20 } + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP4 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN GP0 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN GP18 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 112 +# define RGBLED_SPLIT { 56, 56 } +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 100 /* The maximum brightness level */ +# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== enabled 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 +# define RGBLIGHT_EFFECT_TWINKLE +# define RGBLIGHT_DEFAULT_VAL 100 +# define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) +// RGB Matrix +//# ifdef RGB_MATRIX_ENABLE +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 160 +# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define DRIVER_LED_TOTAL RGBLED_NUM +# define RGB_MATRIX_SPLIT { 34, 34 } +# define RGB_DISABLE_WHEN_USB_SUSPENDED +# define RGB_MATRIX_KEYPRESSES +//# endif +#endif + +#define VIA_QMK_RGBLIGHT_ENABLE + +// Enable the workaround for the speed parameter mismatch between RGBLIGHT and +// RGB Matrix, so that the speed slider in VIA behaves in a more useful way. +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/keebio/sinc/rev3/rev3.c b/keyboards/keebio/sinc/rev3/rev3.c new file mode 100644 index 000000000000..7db7fc9430c6 --- /dev/null +++ b/keyboards/keebio/sinc/rev3/rev3.c @@ -0,0 +1,35 @@ +/* Copyright 2022 Danny Nguyen + +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 "sinc.h" + +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (index == 0) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + return false; +} diff --git a/keyboards/keebio/sinc/rev3/rev3.h b/keyboards/keebio/sinc/rev3/rev3.h new file mode 100644 index 000000000000..62f60a2193e8 --- /dev/null +++ b/keyboards/keebio/sinc/rev3/rev3.h @@ -0,0 +1,227 @@ +/* Copyright 2022 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "sinc.h" +#include "quantum.h" + +#define LAYOUT_75( \ + LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, \ + LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, \ + LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, \ + LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, \ + LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, \ + LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8 \ + ) \ + { \ + { KC_NO, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { KC_NO, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { KC_NO, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { KC_NO, KC_NO, LD3, KC_NO, LD5, LD6, LD7, LD8, LD9 }, \ + { KC_NO, KC_NO, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ + { KC_NO, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, KC_NO }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, KC_NO }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, KC_NO }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \ + { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, KC_NO } \ + } + +#define LAYOUT_80( \ + LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9, \ + LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \ + LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, RC9, \ + LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \ + LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8, RE9 \ + ) \ + { \ + { KC_NO, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { KC_NO, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { KC_NO, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { KC_NO, KC_NO, LD3, KC_NO, LD5, LD6, LD7, LD8, LD9 }, \ + { KC_NO, KC_NO, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ + { KC_NO, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, RC9 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \ + { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9 } \ + } + +#define LAYOUT_75_with_macro( \ + LF1, LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, \ + LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, \ + LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, \ + LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, \ + LD1, LD2, LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, \ + LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { LD1, LD2, LD3, KC_NO, LD5, LD6, LD7, LD8, LD9 }, \ + { LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ + { LF1, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, KC_NO }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, KC_NO }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, KC_NO }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \ + { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, KC_NO } \ + } + +#define LAYOUT_80_with_macro( \ + LF1, LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9, \ + LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \ + LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, RC9, \ + LD1, LD2, LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \ + LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8, RE9 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { LD1, LD2, LD3, KC_NO, LD5, LD6, LD7, LD8, LD9 }, \ + { LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ + { LF1, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, RC9 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \ + { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9 } \ + } + +#define LAYOUT_75_iso( \ + LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, \ + LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, \ + LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, \ + LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, \ + LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, \ + LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8 \ + ) \ + { \ + { KC_NO, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { KC_NO, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { KC_NO, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { KC_NO, KC_NO, LD3, LD4, LD5, LD6, LD7, LD8, LD9 }, \ + { KC_NO, KC_NO, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ + { KC_NO, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, KC_NO }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, KC_NO }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, KC_NO }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \ + { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, KC_NO } \ + } + +#define LAYOUT_80_iso( \ + LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9, \ + LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB9, \ + LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, \ + LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \ + LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8, RE9 \ + ) \ + { \ + { KC_NO, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { KC_NO, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { KC_NO, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { KC_NO, KC_NO, LD3, LD4, LD5, LD6, LD7, LD8, LD9 }, \ + { KC_NO, KC_NO, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ + { KC_NO, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \ + { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9 } \ + } + +#define LAYOUT_75_iso_with_macro( \ + LF1, LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, \ + LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, \ + LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, \ + LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, \ + LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, \ + LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9 }, \ + { LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ + { LF1, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, KC_NO }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, KC_NO }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, KC_NO }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \ + { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, KC_NO } \ + } + +#define LAYOUT_80_iso_with_macro( \ + LF1, LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9, \ + LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB9, \ + LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, \ + LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \ + LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8, RE9 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9 }, \ + { LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ + { LF1, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \ + { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9 } \ + } + +#define LAYOUT_all( \ + LF1, LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9, \ + LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \ + LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, \ + LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD8, RD9, \ + LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE5, RE7, RE8, RE9 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8, LA9 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO }, \ + { LD1, LD2, LD3, LD4, LD5, LD6, LD7, LD8, LD9 }, \ + { LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ + { LF1, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \ + { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9 } \ + } diff --git a/keyboards/keebio/sinc/rev3/rules.mk b/keyboards/keebio/sinc/rev3/rules.mk new file mode 100644 index 000000000000..17c5349136f2 --- /dev/null +++ b/keyboards/keebio/sinc/rev3/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = RP2040 + +# Bootloader selection +BOOTLOADER = rp2040 + +# RP2040-specific options +ALLOW_WARNINGS = yes +PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS. + +# 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 = yes # 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 + +AUDIO_SUPPORTED = no # Audio is not supported +RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default +RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default +RGB_MATRIX_ENABLE = no # Enable keyboard RGB matrix functionality +RGB_MATRIX_DRIVER = WS2812 + +SERIAL_DRIVER = vendor +WS2812_DRIVER = vendor diff --git a/keyboards/keebio/sinc/sinc.h b/keyboards/keebio/sinc/sinc.h index 75f14595bfe9..4607d8125cbc 100644 --- a/keyboards/keebio/sinc/sinc.h +++ b/keyboards/keebio/sinc/sinc.h @@ -23,3 +23,6 @@ along with this program. If not, see . #ifdef KEYBOARD_keebio_sinc_rev2 #include "rev2.h" #endif +#ifdef KEYBOARD_keebio_sinc_rev3 + #include "rev3.h" +#endif From 3d87299bb816644b53ae372ae4d59d2a9dad21c4 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Wed, 27 Jul 2022 13:33:36 -0400 Subject: [PATCH 02/16] Add RGB Matrix support --- keyboards/keebio/sinc/rev3/config.h | 9 +-- keyboards/keebio/sinc/rev3/rev3.c | 111 ++++++++++++++++++++++++++++ keyboards/keebio/sinc/rev3/rules.mk | 4 +- 3 files changed, 117 insertions(+), 7 deletions(-) diff --git a/keyboards/keebio/sinc/rev3/config.h b/keyboards/keebio/sinc/rev3/config.h index a578a5a19aa3..81ffc7cb97d8 100644 --- a/keyboards/keebio/sinc/rev3/config.h +++ b/keyboards/keebio/sinc/rev3/config.h @@ -32,7 +32,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { GP25, GP19, GP24, GP17, GP16, GP26 } #define MATRIX_COL_PINS { GP29, GP28, GP27, GP7, GP2, GP3, GP11, GP12, GP13 } -#define MATRIX_ROW_PINS_RIGHT { GP26, GP25, GP19, GP24, GP17, GP16 } +#define MATRIX_ROW_PINS_RIGHT { GP25, GP19, GP24, GP17, GP16, GP26 } #define MATRIX_COL_PINS_RIGHT { GP29, GP28, GP27, GP7, GP2, GP3, GP11, GP12, GP13 } //#define SPLIT_HAND_PIN F7 #define MASTER_LEFT @@ -42,7 +42,6 @@ along with this program. If not, see . #define ENCODERS_PAD_B_RIGHT { GP20 } #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP4 #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U /* Set 0 if debouncing isn't needed */ @@ -59,8 +58,8 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN GP18 #ifdef RGB_DI_PIN -# define RGBLED_NUM 112 -# define RGBLED_SPLIT { 56, 56 } +# define RGBLED_NUM 113 +# define RGBLED_SPLIT { 56, 57 } # define RGBLIGHT_HUE_STEP 8 # define RGBLIGHT_SAT_STEP 8 # define RGBLIGHT_VAL_STEP 8 @@ -121,7 +120,7 @@ along with this program. If not, see . # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 160 # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS # define DRIVER_LED_TOTAL RGBLED_NUM -# define RGB_MATRIX_SPLIT { 34, 34 } +# define RGB_MATRIX_SPLIT RGBLED_SPLIT # define RGB_DISABLE_WHEN_USB_SUSPENDED # define RGB_MATRIX_KEYPRESSES //# endif diff --git a/keyboards/keebio/sinc/rev3/rev3.c b/keyboards/keebio/sinc/rev3/rev3.c index 7db7fc9430c6..b43b5e6b2035 100644 --- a/keyboards/keebio/sinc/rev3/rev3.c +++ b/keyboards/keebio/sinc/rev3/rev3.c @@ -16,6 +16,117 @@ along with this program. If not, see . #include "sinc.h" +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + // Left Half + { 53, 52, 16, 15, 14, 13, 12, 11, 10 }, + { 50, 51, 17, 18, 19, 20, 21, 22, NO_LED }, + { 49, 48, 28, 27, 26, 25, 24, 23, NO_LED }, + { 46, 47, 29, NO_LED, 30, 31, 32, 33, 34}, + { 45, 43, 42, 40, 39, 37, NO_LED, 36, NO_LED }, + { 54, NO_LED, 0, 2, 3, 5, 6, 7, 9 }, + // Right Half + { 68, 69, 70, 71, 72, 73, 74, 75, 76 }, + { 85, 84, 83, 82, 81, 80, 79, 78, 77 }, + { 86, 87, 88, 89, 90, 91, NO_LED, 92, 93 }, + { 101, 100, 99, 98, 97, NO_LED, 96, 95, 94}, + { NO_LED, 103, 105, 106, 107, 109, 110, 112 }, + { NO_LED, 67, 65, 64, 62, 61, 59, 58, 57 } +}, { + // LED Index to Physical Position + // Left Half + { 30,0 }, { 42,6 }, { 45,0 }, { 58,0 }, { 67,6 }, { 70,0 }, { 82,0 }, { 97,0 }, {103,6 }, + {109,0 }, {103,15 }, { 91,15 }, { 79,15 }, { 67,15 }, { 54,15 }, { 42,15 }, { 30,15 }, { 33,27 }, + { 48,27 }, { 61,27 }, { 73,27 }, { 85,27 }, { 97,27 }, {100,40 }, { 88,40 }, { 76,40 }, { 64,40 }, + { 51,40 }, { 35,40 }, { 38,52 }, { 58,52 }, { 70,52 }, { 82,52 }, { 94,52 }, {106,52 }, {106,64 }, + { 98,64 }, { 77,64 }, { 67,64 }, { 62,64 }, { 47,64 }, { 39,64 }, { 32,64 }, { 12,64 }, { 6,64 }, + { 0,64 }, { 0,52 }, { 12,52 }, { 12,40 }, { 0,40 }, { 0,27 }, { 12,27 }, { 12,15 }, { 0,15 }, + { 0,0 }, { 9,0 }, + // Right Half + {224,6 }, {224,0 }, {212,0 }, {197,0 }, {191,6 }, {185,0 }, {173,0 }, + {166,6 }, {160,0 }, {145,0 }, {139,6 }, {133,0 }, {127,15 }, {139,15 }, {151,15 }, {163,15 }, + {176,15 }, {188,15 }, {200,15 }, {212,15 }, {224,15 }, {224,27 }, {209,27 }, {194,27 }, {182,27 }, + {170,27 }, {157,27 }, {145,27 }, {133,27 }, {121,27 }, {124,40 }, {136,40 }, {148,40 }, {160,40 }, + {173,40 }, {185,40 }, {204,40 }, {224,40 }, {224,52 }, {212,52 }, {195,52 }, {179,52 }, {166,52 }, + {154,52 }, {142,52 }, {130,52 }, {133,64 }, {141,64 }, {160,64 }, {163,64 }, {176,64 }, {188,64 }, + {194,64 }, {200,64 }, {212,64 }, {218,64 }, {224,64 } +}, { + // LED Index to Flag + // Left Half + 4, 2, 4, 4, 2, 4, 4, 4, 2, 4, + 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 2, 4, 4, 2, 4, 4, 2, 4, + 4, 2, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, + // Right Half + 2, 4, 4, 4, 2, 4, 4, 2, 4, 4, 2, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 2, 4, 2, 4, 4, 4, 2, 4, 4, 2, 4 +} }; + +# if defined(VIA_ENABLE) && defined(VIA_CUSTOM_LIGHTING_ENABLE) + +// VIA supports only 4 discrete values for effect speed; map these to some +// useful speed values for RGB Matrix. +enum speed_values { + RGBLIGHT_SPEED_0 = UINT8_MAX / 16, // not 0 to avoid really slow effects + RGBLIGHT_SPEED_1 = UINT8_MAX / 4, + RGBLIGHT_SPEED_2 = UINT8_MAX / 2, // matches the default value + RGBLIGHT_SPEED_3 = UINT8_MAX / 4 * 3, // UINT8_MAX is really fast +}; + +static uint8_t speed_from_rgblight(uint8_t rgblight_speed) { + switch (rgblight_speed) { + case 0: + return RGBLIGHT_SPEED_0; + case 1: + return RGBLIGHT_SPEED_1; + case 2: + default: + return RGBLIGHT_SPEED_2; + case 3: + return RGBLIGHT_SPEED_3; + } +} + +static uint8_t speed_to_rgblight(uint8_t rgb_matrix_speed) { + if (rgb_matrix_speed < ((RGBLIGHT_SPEED_0 + RGBLIGHT_SPEED_1) / 2)) { + return 0; + } else if (rgb_matrix_speed < ((RGBLIGHT_SPEED_1 + RGBLIGHT_SPEED_2) / 2)) { + return 1; + } else if (rgb_matrix_speed < ((RGBLIGHT_SPEED_2 + RGBLIGHT_SPEED_3) / 2)) { + return 2; + } else { + return 3; + } +} + +void raw_hid_receive_kb(uint8_t *data, uint8_t length) { + switch (data[0]) { + case id_lighting_get_value: + if (data[1] == id_qmk_rgblight_effect_speed) { + data[2] = speed_to_rgblight(rgb_matrix_get_speed()); + } + break; + case id_lighting_set_value: + if (data[1] == id_qmk_rgblight_effect_speed) { + rgb_matrix_set_speed_noeeprom(speed_from_rgblight(data[2])); + } + break; + } +} + +# endif // defined(VIA_ENABLE) && defined(VIA_CUSTOM_LIGHTING_ENABLE) + +#endif + bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } if (index == 0) { diff --git a/keyboards/keebio/sinc/rev3/rules.mk b/keyboards/keebio/sinc/rev3/rules.mk index 17c5349136f2..6b66b840fa8f 100644 --- a/keyboards/keebio/sinc/rev3/rules.mk +++ b/keyboards/keebio/sinc/rev3/rules.mk @@ -18,14 +18,14 @@ CONSOLE_ENABLE = yes # 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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes AUDIO_SUPPORTED = no # Audio is not supported RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default -RGB_MATRIX_ENABLE = no # Enable keyboard RGB matrix functionality +RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality RGB_MATRIX_DRIVER = WS2812 SERIAL_DRIVER = vendor From 5fa8e8bf7e5a9d309ce56fd039a36456be8e6c38 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Wed, 27 Jul 2022 14:57:25 -0400 Subject: [PATCH 03/16] Add encoder map support --- keyboards/keebio/sinc/keymaps/via/keymap.c | 9 +++++++++ keyboards/keebio/sinc/keymaps/via/rules.mk | 1 + 2 files changed, 10 insertions(+) diff --git a/keyboards/keebio/sinc/keymaps/via/keymap.c b/keyboards/keebio/sinc/keymaps/via/keymap.c index 225e9c07dff8..946f88ee2789 100644 --- a/keyboards/keebio/sinc/keymaps/via/keymap.c +++ b/keyboards/keebio/sinc/keymaps/via/keymap.c @@ -37,3 +37,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD), ENCODER_CCW_CW(KC_PGUP, KC_PGDN) }, + [1] = { ENCODER_CCW_CW(RGB_MOD, RGB_RMOD), ENCODER_CCW_CW(KC_MNXT, KC_MPRV) }, + [2] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + [3] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, +}; +#endif diff --git a/keyboards/keebio/sinc/keymaps/via/rules.mk b/keyboards/keebio/sinc/keymaps/via/rules.mk index 36b7ba9cbc98..1189f4ad1927 100644 --- a/keyboards/keebio/sinc/keymaps/via/rules.mk +++ b/keyboards/keebio/sinc/keymaps/via/rules.mk @@ -1,2 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes +ENCODER_MAP_ENABLE = yes From 3151183169447e770478d71453f8f7ce85144765 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Sun, 7 Aug 2022 22:05:21 -0400 Subject: [PATCH 04/16] Set I2C pins --- keyboards/keebio/sinc/rev3/config.h | 3 +++ keyboards/keebio/sinc/rev3/halconf.h | 21 +++++++++++++++++++++ keyboards/keebio/sinc/rev3/mcuconf.h | 23 +++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 keyboards/keebio/sinc/rev3/halconf.h create mode 100644 keyboards/keebio/sinc/rev3/mcuconf.h diff --git a/keyboards/keebio/sinc/rev3/config.h b/keyboards/keebio/sinc/rev3/config.h index 81ffc7cb97d8..d5ef98f28d0b 100644 --- a/keyboards/keebio/sinc/rev3/config.h +++ b/keyboards/keebio/sinc/rev3/config.h @@ -43,6 +43,9 @@ along with this program. If not, see . #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U +#define I2C_DRIVER I2CD2 +#define I2C1_SCL_PIN GP22 +#define I2C1_SDA_PIN GP23 /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/keebio/sinc/rev3/halconf.h b/keyboards/keebio/sinc/rev3/halconf.h new file mode 100644 index 000000000000..a4c25c090a2e --- /dev/null +++ b/keyboards/keebio/sinc/rev3/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2022 QMK + * + * 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 HAL_USE_I2C TRUE + +#include_next "halconf.h" diff --git a/keyboards/keebio/sinc/rev3/mcuconf.h b/keyboards/keebio/sinc/rev3/mcuconf.h new file mode 100644 index 000000000000..5e47eac54f95 --- /dev/null +++ b/keyboards/keebio/sinc/rev3/mcuconf.h @@ -0,0 +1,23 @@ +/* + * Copyright 2022 Charly Delay (@0xcharly) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next "mcuconf.h" + +#undef RP_I2C_USE_I2C1 +#define RP_I2C_USE_I2C1 TRUE From c1e5bd469f34cbb63e793cbf61381114475cbff1 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Thu, 25 Aug 2022 11:06:26 -0400 Subject: [PATCH 05/16] Update LED locations for right half --- keyboards/keebio/sinc/rev3/rev3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/keebio/sinc/rev3/rev3.c b/keyboards/keebio/sinc/rev3/rev3.c index b43b5e6b2035..4a241b860de1 100644 --- a/keyboards/keebio/sinc/rev3/rev3.c +++ b/keyboards/keebio/sinc/rev3/rev3.c @@ -31,7 +31,7 @@ led_config_t g_led_config = { { { 85, 84, 83, 82, 81, 80, 79, 78, 77 }, { 86, 87, 88, 89, 90, 91, NO_LED, 92, 93 }, { 101, 100, 99, 98, 97, NO_LED, 96, 95, 94}, - { NO_LED, 103, 105, 106, 107, 109, 110, 112 }, + { NO_LED, 103, 105, 106, 107, 109, 110, 111 }, { NO_LED, 67, 65, 64, 62, 61, 59, 58, 57 } }, { // LED Index to Physical Position @@ -50,7 +50,7 @@ led_config_t g_led_config = { { {170,27 }, {157,27 }, {145,27 }, {133,27 }, {121,27 }, {124,40 }, {136,40 }, {148,40 }, {160,40 }, {173,40 }, {185,40 }, {204,40 }, {224,40 }, {224,52 }, {212,52 }, {195,52 }, {179,52 }, {166,52 }, {154,52 }, {142,52 }, {130,52 }, {133,64 }, {141,64 }, {160,64 }, {163,64 }, {176,64 }, {188,64 }, - {194,64 }, {200,64 }, {212,64 }, {218,64 }, {224,64 } + {194,64 }, {200,64 }, {212,64 }, {224,64 }, {224,55 } }, { // LED Index to Flag // Left Half @@ -68,7 +68,7 @@ led_config_t g_led_config = { { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 2, 4, 2, 4, 4, 4, 2, 4, 4, 2, 4 + 2, 4, 2, 4, 4, 4, 2, 4, 4, 4, 2 } }; # if defined(VIA_ENABLE) && defined(VIA_CUSTOM_LIGHTING_ENABLE) From 52d4b0c3d2d2df927ffb629fd48e1300213a3ba8 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Wed, 28 Sep 2022 12:33:13 -0400 Subject: [PATCH 06/16] Move USB definitions to info.json --- keyboards/keebio/sinc/rev3/config.h | 7 ------- keyboards/keebio/sinc/rev3/info.json | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 keyboards/keebio/sinc/rev3/info.json diff --git a/keyboards/keebio/sinc/rev3/config.h b/keyboards/keebio/sinc/rev3/config.h index d5ef98f28d0b..6ea0c73dc4a9 100644 --- a/keyboards/keebio/sinc/rev3/config.h +++ b/keyboards/keebio/sinc/rev3/config.h @@ -16,13 +16,6 @@ along with this program. If not, see . #pragma once -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xCB10 -#define PRODUCT_ID 0x3267 -#define DEVICE_VER 0x0300 -#define MANUFACTURER Keebio -#define PRODUCT Sinc Rev. 3 - /* key matrix size */ // Rows are doubled-up #define MATRIX_ROWS 12 diff --git a/keyboards/keebio/sinc/rev3/info.json b/keyboards/keebio/sinc/rev3/info.json new file mode 100644 index 000000000000..58af90ef0253 --- /dev/null +++ b/keyboards/keebio/sinc/rev3/info.json @@ -0,0 +1,7 @@ +{ + "keyboard_name": "Sinc Rev. 3", + "usb": { + "pid": "0x3267", + "device_version": "3.0.0" + } +} From 5ad0a932cb043a2ccc52f52b0b339efbc93405a6 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Wed, 28 Sep 2022 12:33:36 -0400 Subject: [PATCH 07/16] Update RGB modes --- keyboards/keebio/sinc/rev3/config.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/keyboards/keebio/sinc/rev3/config.h b/keyboards/keebio/sinc/rev3/config.h index 6ea0c73dc4a9..1f674f99c383 100644 --- a/keyboards/keebio/sinc/rev3/config.h +++ b/keyboards/keebio/sinc/rev3/config.h @@ -113,17 +113,13 @@ along with this program. If not, see . # define ENABLE_RGB_MATRIX_MULTISPLASH # define ENABLE_RGB_MATRIX_SOLID_SPLASH # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 160 +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS # define DRIVER_LED_TOTAL RGBLED_NUM # define RGB_MATRIX_SPLIT RGBLED_SPLIT # define RGB_DISABLE_WHEN_USB_SUSPENDED +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_MATRIX_KEYPRESSES +# define SPLIT_TRANSPORT_MIRROR //# endif #endif - -#define VIA_QMK_RGBLIGHT_ENABLE - -// Enable the workaround for the speed parameter mismatch between RGBLIGHT and -// RGB Matrix, so that the speed slider in VIA behaves in a more useful way. -#define VIA_CUSTOM_LIGHTING_ENABLE From 528fbbd8648f1d08b399747a58e0ed50a5e954e1 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Wed, 28 Sep 2022 12:34:20 -0400 Subject: [PATCH 08/16] Replace pin mappings for right half with correct ones --- keyboards/keebio/sinc/rev3/config.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/keyboards/keebio/sinc/rev3/config.h b/keyboards/keebio/sinc/rev3/config.h index 1f674f99c383..ed61a59cdead 100644 --- a/keyboards/keebio/sinc/rev3/config.h +++ b/keyboards/keebio/sinc/rev3/config.h @@ -25,14 +25,13 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { GP25, GP19, GP24, GP17, GP16, GP26 } #define MATRIX_COL_PINS { GP29, GP28, GP27, GP7, GP2, GP3, GP11, GP12, GP13 } -#define MATRIX_ROW_PINS_RIGHT { GP25, GP19, GP24, GP17, GP16, GP26 } +#define MATRIX_ROW_PINS_RIGHT { GP16, GP19, GP17, GP9, GP8, GP26 } #define MATRIX_COL_PINS_RIGHT { GP29, GP28, GP27, GP7, GP2, GP3, GP11, GP12, GP13 } -//#define SPLIT_HAND_PIN F7 -#define MASTER_LEFT +#define SPLIT_HAND_PIN GP4 #define ENCODERS_PAD_A { GP21 } #define ENCODERS_PAD_B { GP20 } -#define ENCODERS_PAD_A_RIGHT { GP21 } -#define ENCODERS_PAD_B_RIGHT { GP20 } +#define ENCODERS_PAD_A_RIGHT { GP5 } +#define ENCODERS_PAD_B_RIGHT { GP6 } #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U From df903736d337e07aee1f34573343d189aa4f0b27 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 24 Oct 2022 11:20:10 -0400 Subject: [PATCH 09/16] Move config.h back to rev1/rev2 due to addition of rev3 --- keyboards/keebio/sinc/{ => rev1}/config.h | 0 keyboards/keebio/sinc/rev2/config.h | 33 +++++++++++++++++++++++ 2 files changed, 33 insertions(+) rename keyboards/keebio/sinc/{ => rev1}/config.h (100%) create mode 100644 keyboards/keebio/sinc/rev2/config.h diff --git a/keyboards/keebio/sinc/config.h b/keyboards/keebio/sinc/rev1/config.h similarity index 100% rename from keyboards/keebio/sinc/config.h rename to keyboards/keebio/sinc/rev1/config.h diff --git a/keyboards/keebio/sinc/rev2/config.h b/keyboards/keebio/sinc/rev2/config.h new file mode 100644 index 000000000000..92d2fda64498 --- /dev/null +++ b/keyboards/keebio/sinc/rev2/config.h @@ -0,0 +1,33 @@ +/* Copyright 2021 Danny Nguyen + +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 + +// wiring of each half +#define SPLIT_HAND_PIN F7 + +/* 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 + +/* ws2812 RGB LED */ +#define RGBLIGHT_LED_MAP { 1, 2, 3, 12, 13, 14, 15, 0, 7, 6, 5, 4, 11, 10, 9, 8 } +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) + +// Set right column, left macro, 1.75u shift, split spaces, and 5x1u on by default +#define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x00DE +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 From 6f2f6e82129e178c4fb48b6ac925a911806a626e Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 24 Oct 2022 12:54:34 -0400 Subject: [PATCH 10/16] Convert initial Rev. 3 config work to be data-driven --- keyboards/keebio/sinc/info.json | 4 +-- keyboards/keebio/sinc/rev1/info.json | 2 ++ keyboards/keebio/sinc/rev3/config.h | 16 +----------- keyboards/keebio/sinc/rev3/info.json | 38 ++++++++++++++++++++++++++++ keyboards/keebio/sinc/rev3/rev3.c | 18 ------------- keyboards/keebio/sinc/rev3/rules.mk | 24 ------------------ keyboards/keebio/sinc/sinc.c | 4 +++ 7 files changed, 46 insertions(+), 60 deletions(-) diff --git a/keyboards/keebio/sinc/info.json b/keyboards/keebio/sinc/info.json index ad28aaea6b0b..369c9b38189f 100644 --- a/keyboards/keebio/sinc/info.json +++ b/keyboards/keebio/sinc/info.json @@ -5,13 +5,11 @@ "usb": { "vid": "0xCB10" }, - "processor": "atmega32u4", - "bootloader": "atmel-dfu", "features": { "audio": false, "bootmagic": true, "command": false, - "console": false, + "console": true, "extrakey": true, "mousekey": false, "nkro": false, diff --git a/keyboards/keebio/sinc/rev1/info.json b/keyboards/keebio/sinc/rev1/info.json index 3c8a90c206ee..e8bd0a08344d 100644 --- a/keyboards/keebio/sinc/rev1/info.json +++ b/keyboards/keebio/sinc/rev1/info.json @@ -4,6 +4,8 @@ "pid": "0x1267", "device_version": "1.0.0" }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", "debounce": 5, "diode_direction": "COL2ROW", "features": { diff --git a/keyboards/keebio/sinc/rev3/config.h b/keyboards/keebio/sinc/rev3/config.h index ed61a59cdead..0084de41faea 100644 --- a/keyboards/keebio/sinc/rev3/config.h +++ b/keyboards/keebio/sinc/rev3/config.h @@ -21,17 +21,9 @@ along with this program. If not, see . #define MATRIX_ROWS 12 #define MATRIX_COLS 9 -#define DIODE_DIRECTION COL2ROW // wiring of each half -#define MATRIX_ROW_PINS { GP25, GP19, GP24, GP17, GP16, GP26 } -#define MATRIX_COL_PINS { GP29, GP28, GP27, GP7, GP2, GP3, GP11, GP12, GP13 } -#define MATRIX_ROW_PINS_RIGHT { GP16, GP19, GP17, GP9, GP8, GP26 } -#define MATRIX_COL_PINS_RIGHT { GP29, GP28, GP27, GP7, GP2, GP3, GP11, GP12, GP13 } +#undef SPLIT_HAND_PIN #define SPLIT_HAND_PIN GP4 -#define ENCODERS_PAD_A { GP21 } -#define ENCODERS_PAD_B { GP20 } -#define ENCODERS_PAD_A_RIGHT { GP5 } -#define ENCODERS_PAD_B_RIGHT { GP6 } #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U @@ -39,12 +31,6 @@ along with this program. If not, see . #define I2C1_SCL_PIN GP22 #define I2C1_SDA_PIN GP23 -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* serial.c configuration for split keyboard */ -#define SOFT_SERIAL_PIN GP0 - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/keebio/sinc/rev3/info.json b/keyboards/keebio/sinc/rev3/info.json index 58af90ef0253..75fad21a8e14 100644 --- a/keyboards/keebio/sinc/rev3/info.json +++ b/keyboards/keebio/sinc/rev3/info.json @@ -3,5 +3,43 @@ "usb": { "pid": "0x3267", "device_version": "3.0.0" + }, + "processor": "RP2040", + "bootloader": "rp2040", + "debounce": 5, + "diode_direction": "COL2ROW", + "features": { + "rgblight": false, + "backlight": false, + }, + "split": { + "enabled": true, + "soft_serial_pin": "GP0", + "transport": { + "protocol": "serial" + }, + "encoder": { + "right": { + "rotary": [ + {"pin_a": "GP5", "pin_b": "GP6" } + ] + } + }, + "matrix_pins": { + "right":{ + "cols": ["GP29", "GP28", "GP27", "GP7", "GP2", "GP3", "GP11", "GP12", "GP13"], + "rows": ["GP16", "GP19", "GP17", "GP9", "GP8", "GP26"] + }, + }, + }, + "matrix_pins": { + "cols": ["GP29", "GP28", "GP27", "GP7", "GP2", "GP3", "GP11", "GP12", "GP13"], + "rows": ["GP25", "GP19", "GP24", "GP17", "GP16", "GP26"] + }, + "encoder": { + "enabled": true, + "rotary": [ + {"pin_a": "GP21", "pin_b": "GP20" } + ] } } diff --git a/keyboards/keebio/sinc/rev3/rev3.c b/keyboards/keebio/sinc/rev3/rev3.c index 4a241b860de1..8f6a90671d13 100644 --- a/keyboards/keebio/sinc/rev3/rev3.c +++ b/keyboards/keebio/sinc/rev3/rev3.c @@ -126,21 +126,3 @@ void raw_hid_receive_kb(uint8_t *data, uint8_t length) { # endif // defined(VIA_ENABLE) && defined(VIA_CUSTOM_LIGHTING_ENABLE) #endif - -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) { return false; } - if (index == 0) { - if (clockwise) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - } else if (index == 1) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } - return false; -} diff --git a/keyboards/keebio/sinc/rev3/rules.mk b/keyboards/keebio/sinc/rev3/rules.mk index 6b66b840fa8f..5e5384b71e3c 100644 --- a/keyboards/keebio/sinc/rev3/rules.mk +++ b/keyboards/keebio/sinc/rev3/rules.mk @@ -1,28 +1,4 @@ -# MCU name -MCU = RP2040 - -# Bootloader selection -BOOTLOADER = rp2040 - -# RP2040-specific options -ALLOW_WARNINGS = yes -PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS. - # 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 = yes # 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 = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -ENCODER_ENABLE = yes - -AUDIO_SUPPORTED = no # Audio is not supported RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality diff --git a/keyboards/keebio/sinc/sinc.c b/keyboards/keebio/sinc/sinc.c index f6dff42ebba2..9b2f6da51259 100644 --- a/keyboards/keebio/sinc/sinc.c +++ b/keyboards/keebio/sinc/sinc.c @@ -17,6 +17,7 @@ along with this program. If not, see . #include "sinc.h" #include "split_util.h" +#ifdef BACKLIGHT_ENABLE bool led_update_kb(led_t led_state) { if (!led_update_user(led_state)) { return false; } // Only update if left half @@ -25,6 +26,7 @@ bool led_update_kb(led_t led_state) { } return true; } +#endif void eeconfig_init_kb(void) { #ifdef BACKLIGHT_ENABLE @@ -35,6 +37,7 @@ void eeconfig_init_kb(void) { eeconfig_init_user(); } +#ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } if (index == 0) { @@ -52,3 +55,4 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } return true; } +#endif From 4066f65b57cfaf60c156ce54f5bd9b692104a1ed Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 24 Oct 2022 16:32:25 -0400 Subject: [PATCH 11/16] Convert RGB Matrix config to DD format --- keyboards/keebio/sinc/rev3/info.json | 134 ++++++++++++++++++++++++++- keyboards/keebio/sinc/rev3/rev3.c | 128 ------------------------- keyboards/keebio/sinc/rev3/rules.mk | 6 -- 3 files changed, 133 insertions(+), 135 deletions(-) delete mode 100644 keyboards/keebio/sinc/rev3/rev3.c diff --git a/keyboards/keebio/sinc/rev3/info.json b/keyboards/keebio/sinc/rev3/info.json index 75fad21a8e14..42978fbfa565 100644 --- a/keyboards/keebio/sinc/rev3/info.json +++ b/keyboards/keebio/sinc/rev3/info.json @@ -11,6 +11,7 @@ "features": { "rgblight": false, "backlight": false, + "rgb_matrix": true, }, "split": { "enabled": true, @@ -41,5 +42,136 @@ "rotary": [ {"pin_a": "GP21", "pin_b": "GP20" } ] - } + }, + "rgb_matrix": { + "driver": "WS2812", + "layout": [ + { "flags": 4, "matrix": [5, 2], "x": 30, "y": 0 }, + { "flags": 2, "x": 42, "y": 6 }, + { "flags": 4, "matrix": [5, 3], "x": 45, "y": 0 }, + { "flags": 4, "matrix": [5, 4], "x": 58, "y": 0 }, + { "flags": 2, "x": 67, "y": 6 }, + { "flags": 4, "matrix": [5, 5], "x": 70, "y": 0 }, + { "flags": 4, "matrix": [5, 6], "x": 82, "y": 0 }, + { "flags": 4, "matrix": [5, 7], "x": 97, "y": 0 }, + { "flags": 2, "x": 103, "y": 6 }, + { "flags": 4, "matrix": [5, 8], "x": 109, "y": 0 }, + + { "flags": 4, "matrix": [0, 8], "x": 103, "y": 15 }, + { "flags": 4, "matrix": [0, 7], "x": 91, "y": 15 }, + { "flags": 4, "matrix": [0, 6], "x": 79, "y": 15 }, + { "flags": 4, "matrix": [0, 5], "x": 67, "y": 15 }, + { "flags": 4, "matrix": [0, 4], "x": 54, "y": 15 }, + { "flags": 4, "matrix": [0, 3], "x": 42, "y": 15 }, + { "flags": 4, "matrix": [0, 2], "x": 30, "y": 15 }, + + { "flags": 4, "matrix": [1, 2], "x": 33, "y": 27 }, + { "flags": 4, "matrix": [1, 3], "x": 48, "y": 27 }, + { "flags": 4, "matrix": [1, 4], "x": 61, "y": 27 }, + { "flags": 4, "matrix": [1, 5], "x": 73, "y": 27 }, + { "flags": 4, "matrix": [1, 6], "x": 85, "y": 27 }, + { "flags": 4, "matrix": [1, 7], "x": 97, "y": 27 }, + + { "flags": 4, "matrix": [2, 7], "x": 100, "y": 40 }, + { "flags": 4, "matrix": [2, 6], "x": 88, "y": 40 }, + { "flags": 4, "matrix": [2, 5], "x": 76, "y": 40 }, + { "flags": 4, "matrix": [2, 4], "x": 64, "y": 40 }, + { "flags": 4, "matrix": [2, 3], "x": 51, "y": 40 }, + { "flags": 4, "matrix": [2, 2], "x": 35, "y": 40 }, + + { "flags": 4, "matrix": [3, 2], "x": 38, "y": 52 }, + { "flags": 4, "matrix": [3, 4], "x": 58, "y": 52 }, + { "flags": 4, "matrix": [3, 5], "x": 70, "y": 52 }, + { "flags": 4, "matrix": [3, 6], "x": 82, "y": 52 }, + { "flags": 4, "matrix": [3, 7], "x": 94, "y": 52 }, + { "flags": 4, "matrix": [3, 8], "x": 106, "y": 52 }, + + { "flags": 2, "x": 106, "y": 64 }, + { "flags": 4, "matrix": [4, 7], "x": 98, "y": 64 }, + { "flags": 4, "matrix": [4, 5], "x": 77, "y": 64 }, + { "flags": 2, "x": 67, "y": 64 }, + { "flags": 4, "matrix": [4, 4], "x": 62, "y": 64 }, + { "flags": 4, "matrix": [4, 3], "x": 47, "y": 64 }, + { "flags": 2, "x": 39, "y": 64 }, + { "flags": 4, "matrix": [4, 2], "x": 32, "y": 64 }, + + { "flags": 4, "matrix": [4, 1], "x": 12, "y": 64 }, + { "flags": 2, "x": 6, "y": 64 }, + { "flags": 4, "matrix": [4, 0], "x": 0, "y": 64 }, + + { "flags": 4, "matrix": [3, 0], "x": 0, "y": 52 }, + { "flags": 4, "matrix": [3, 1], "x": 12, "y": 52 }, + { "flags": 4, "matrix": [2, 1], "x": 12, "y": 40 }, + { "flags": 4, "matrix": [2, 0], "x": 0, "y": 40 }, + { "flags": 4, "matrix": [1, 0], "x": 0, "y": 27 }, + { "flags": 4, "matrix": [1, 1], "x": 12, "y": 27 }, + { "flags": 4, "matrix": [0, 1], "x": 12, "y": 15 }, + { "flags": 4, "matrix": [0, 0], "x": 0, "y": 15 }, + { "flags": 4, "matrix": [5, 0], "x": 0, "y": 0 }, + { "flags": 2, "x": 9, "y": 0 }, + + { "flags": 2, "x": 224, "y": 6 }, + { "flags": 4, "matrix": [11, 8], "x": 224, "y": 0 }, + { "flags": 4, "matrix": [11, 7], "x": 212, "y": 0 }, + { "flags": 4, "matrix": [11, 6], "x": 197, "y": 0 }, + { "flags": 2, "x": 191, "y": 6 }, + { "flags": 4, "matrix": [11, 5], "x": 185, "y": 0 }, + { "flags": 4, "matrix": [11, 4], "x": 173, "y": 0 }, + { "flags": 2, "x": 166, "y": 6 }, + { "flags": 4, "matrix": [11, 3], "x": 160, "y": 0 }, + { "flags": 4, "matrix": [11, 2], "x": 145, "y": 0 }, + { "flags": 2, "x": 139, "y": 6 }, + { "flags": 4, "matrix": [11, 1], "x": 133, "y": 0 }, + + { "flags": 4, "matrix": [6, 0], "x": 127, "y": 15 }, + { "flags": 4, "matrix": [6, 1], "x": 139, "y": 15 }, + { "flags": 4, "matrix": [6, 2], "x": 151, "y": 15 }, + { "flags": 4, "matrix": [6, 3], "x": 163, "y": 15 }, + { "flags": 4, "matrix": [6, 4], "x": 176, "y": 15 }, + { "flags": 4, "matrix": [6, 5], "x": 188, "y": 15 }, + { "flags": 4, "matrix": [6, 6], "x": 200, "y": 15 }, + { "flags": 4, "matrix": [6, 7], "x": 212, "y": 15 }, + { "flags": 4, "matrix": [6, 8], "x": 224, "y": 15 }, + + { "flags": 4, "matrix": [7, 8], "x": 224, "y": 27 }, + { "flags": 4, "matrix": [7, 7], "x": 209, "y": 27 }, + { "flags": 4, "matrix": [7, 6], "x": 194, "y": 27 }, + { "flags": 4, "matrix": [7, 5], "x": 182, "y": 27 }, + { "flags": 4, "matrix": [7, 4], "x": 170, "y": 27 }, + { "flags": 4, "matrix": [7, 3], "x": 157, "y": 27 }, + { "flags": 4, "matrix": [7, 2], "x": 145, "y": 27 }, + { "flags": 4, "matrix": [7, 1], "x": 133, "y": 27 }, + { "flags": 4, "matrix": [7, 0], "x": 121, "y": 27 }, + + { "flags": 4, "matrix": [8, 0], "x": 124, "y": 40 }, + { "flags": 4, "matrix": [8, 1], "x": 136, "y": 40 }, + { "flags": 4, "matrix": [8, 2], "x": 148, "y": 40 }, + { "flags": 4, "matrix": [8, 3], "x": 160, "y": 40 }, + { "flags": 4, "matrix": [8, 4], "x": 173, "y": 40 }, + { "flags": 4, "matrix": [8, 5], "x": 185, "y": 40 }, + { "flags": 4, "matrix": [8, 7], "x": 204, "y": 40 }, + { "flags": 4, "matrix": [8, 8], "x": 224, "y": 40 }, + + { "flags": 4, "matrix": [9, 8], "x": 224, "y": 52 }, + { "flags": 4, "matrix": [9, 7], "x": 212, "y": 52 }, + { "flags": 4, "matrix": [9, 6], "x": 195, "y": 52 }, + { "flags": 4, "matrix": [9, 4], "x": 179, "y": 52 }, + { "flags": 4, "matrix": [9, 3], "x": 166, "y": 52 }, + { "flags": 4, "matrix": [9, 2], "x": 154, "y": 52 }, + { "flags": 4, "matrix": [9, 1], "x": 142, "y": 52 }, + { "flags": 4, "matrix": [9, 0], "x": 130, "y": 52 }, + + { "flags": 2, "x": 133, "y": 64 }, + { "flags": 4, "matrix": [10, 1], "x": 141, "y": 64 }, + { "flags": 2, "x": 160, "y": 64 }, + { "flags": 4, "matrix": [10, 2], "x": 163, "y": 64 }, + { "flags": 4, "matrix": [10, 3], "x": 176, "y": 64 }, + { "flags": 4, "matrix": [10, 4], "x": 188, "y": 64 }, + { "flags": 2, "x": 194, "y": 64 }, + { "flags": 4, "matrix": [10, 5], "x": 200, "y": 64 }, + { "flags": 4, "matrix": [10, 6], "x": 212, "y": 64 }, + { "flags": 4, "matrix": [10, 7], "x": 224, "y": 64 }, + { "flags": 2, "x": 224, "y": 55 } + ] + }, } diff --git a/keyboards/keebio/sinc/rev3/rev3.c b/keyboards/keebio/sinc/rev3/rev3.c deleted file mode 100644 index 8f6a90671d13..000000000000 --- a/keyboards/keebio/sinc/rev3/rev3.c +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright 2022 Danny Nguyen - -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 "sinc.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - // Left Half - { 53, 52, 16, 15, 14, 13, 12, 11, 10 }, - { 50, 51, 17, 18, 19, 20, 21, 22, NO_LED }, - { 49, 48, 28, 27, 26, 25, 24, 23, NO_LED }, - { 46, 47, 29, NO_LED, 30, 31, 32, 33, 34}, - { 45, 43, 42, 40, 39, 37, NO_LED, 36, NO_LED }, - { 54, NO_LED, 0, 2, 3, 5, 6, 7, 9 }, - // Right Half - { 68, 69, 70, 71, 72, 73, 74, 75, 76 }, - { 85, 84, 83, 82, 81, 80, 79, 78, 77 }, - { 86, 87, 88, 89, 90, 91, NO_LED, 92, 93 }, - { 101, 100, 99, 98, 97, NO_LED, 96, 95, 94}, - { NO_LED, 103, 105, 106, 107, 109, 110, 111 }, - { NO_LED, 67, 65, 64, 62, 61, 59, 58, 57 } -}, { - // LED Index to Physical Position - // Left Half - { 30,0 }, { 42,6 }, { 45,0 }, { 58,0 }, { 67,6 }, { 70,0 }, { 82,0 }, { 97,0 }, {103,6 }, - {109,0 }, {103,15 }, { 91,15 }, { 79,15 }, { 67,15 }, { 54,15 }, { 42,15 }, { 30,15 }, { 33,27 }, - { 48,27 }, { 61,27 }, { 73,27 }, { 85,27 }, { 97,27 }, {100,40 }, { 88,40 }, { 76,40 }, { 64,40 }, - { 51,40 }, { 35,40 }, { 38,52 }, { 58,52 }, { 70,52 }, { 82,52 }, { 94,52 }, {106,52 }, {106,64 }, - { 98,64 }, { 77,64 }, { 67,64 }, { 62,64 }, { 47,64 }, { 39,64 }, { 32,64 }, { 12,64 }, { 6,64 }, - { 0,64 }, { 0,52 }, { 12,52 }, { 12,40 }, { 0,40 }, { 0,27 }, { 12,27 }, { 12,15 }, { 0,15 }, - { 0,0 }, { 9,0 }, - // Right Half - {224,6 }, {224,0 }, {212,0 }, {197,0 }, {191,6 }, {185,0 }, {173,0 }, - {166,6 }, {160,0 }, {145,0 }, {139,6 }, {133,0 }, {127,15 }, {139,15 }, {151,15 }, {163,15 }, - {176,15 }, {188,15 }, {200,15 }, {212,15 }, {224,15 }, {224,27 }, {209,27 }, {194,27 }, {182,27 }, - {170,27 }, {157,27 }, {145,27 }, {133,27 }, {121,27 }, {124,40 }, {136,40 }, {148,40 }, {160,40 }, - {173,40 }, {185,40 }, {204,40 }, {224,40 }, {224,52 }, {212,52 }, {195,52 }, {179,52 }, {166,52 }, - {154,52 }, {142,52 }, {130,52 }, {133,64 }, {141,64 }, {160,64 }, {163,64 }, {176,64 }, {188,64 }, - {194,64 }, {200,64 }, {212,64 }, {224,64 }, {224,55 } -}, { - // LED Index to Flag - // Left Half - 4, 2, 4, 4, 2, 4, 4, 4, 2, 4, - 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, - 2, 4, 4, 2, 4, 4, 2, 4, - 4, 2, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, - // Right Half - 2, 4, 4, 4, 2, 4, 4, 2, 4, 4, 2, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 2, 4, 2, 4, 4, 4, 2, 4, 4, 4, 2 -} }; - -# if defined(VIA_ENABLE) && defined(VIA_CUSTOM_LIGHTING_ENABLE) - -// VIA supports only 4 discrete values for effect speed; map these to some -// useful speed values for RGB Matrix. -enum speed_values { - RGBLIGHT_SPEED_0 = UINT8_MAX / 16, // not 0 to avoid really slow effects - RGBLIGHT_SPEED_1 = UINT8_MAX / 4, - RGBLIGHT_SPEED_2 = UINT8_MAX / 2, // matches the default value - RGBLIGHT_SPEED_3 = UINT8_MAX / 4 * 3, // UINT8_MAX is really fast -}; - -static uint8_t speed_from_rgblight(uint8_t rgblight_speed) { - switch (rgblight_speed) { - case 0: - return RGBLIGHT_SPEED_0; - case 1: - return RGBLIGHT_SPEED_1; - case 2: - default: - return RGBLIGHT_SPEED_2; - case 3: - return RGBLIGHT_SPEED_3; - } -} - -static uint8_t speed_to_rgblight(uint8_t rgb_matrix_speed) { - if (rgb_matrix_speed < ((RGBLIGHT_SPEED_0 + RGBLIGHT_SPEED_1) / 2)) { - return 0; - } else if (rgb_matrix_speed < ((RGBLIGHT_SPEED_1 + RGBLIGHT_SPEED_2) / 2)) { - return 1; - } else if (rgb_matrix_speed < ((RGBLIGHT_SPEED_2 + RGBLIGHT_SPEED_3) / 2)) { - return 2; - } else { - return 3; - } -} - -void raw_hid_receive_kb(uint8_t *data, uint8_t length) { - switch (data[0]) { - case id_lighting_get_value: - if (data[1] == id_qmk_rgblight_effect_speed) { - data[2] = speed_to_rgblight(rgb_matrix_get_speed()); - } - break; - case id_lighting_set_value: - if (data[1] == id_qmk_rgblight_effect_speed) { - rgb_matrix_set_speed_noeeprom(speed_from_rgblight(data[2])); - } - break; - } -} - -# endif // defined(VIA_ENABLE) && defined(VIA_CUSTOM_LIGHTING_ENABLE) - -#endif diff --git a/keyboards/keebio/sinc/rev3/rules.mk b/keyboards/keebio/sinc/rev3/rules.mk index 5e5384b71e3c..8fb51ec82d52 100644 --- a/keyboards/keebio/sinc/rev3/rules.mk +++ b/keyboards/keebio/sinc/rev3/rules.mk @@ -1,8 +1,2 @@ -# Build Options -RGB_MATRIX_SUPPORTED = yes # RGB matrix is supported and enabled by default -RGBLIGHT_SUPPORTED = yes # RGB underglow is supported, but not enabled by default -RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix functionality -RGB_MATRIX_DRIVER = WS2812 - SERIAL_DRIVER = vendor WS2812_DRIVER = vendor From 602e30f03dcda9090d3f8337b1266c509e551cce Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 24 Oct 2022 17:49:31 -0400 Subject: [PATCH 12/16] More config cleanup --- keyboards/keebio/sinc/rev3/config.h | 128 ++++++++++----------------- keyboards/keebio/sinc/rev3/info.json | 8 ++ 2 files changed, 54 insertions(+), 82 deletions(-) diff --git a/keyboards/keebio/sinc/rev3/config.h b/keyboards/keebio/sinc/rev3/config.h index 0084de41faea..8945286ac0c3 100644 --- a/keyboards/keebio/sinc/rev3/config.h +++ b/keyboards/keebio/sinc/rev3/config.h @@ -16,95 +16,59 @@ along with this program. If not, see . #pragma once -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 12 -#define MATRIX_COLS 9 - -// wiring of each half -#undef SPLIT_HAND_PIN #define SPLIT_HAND_PIN GP4 - #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U #define I2C_DRIVER I2CD2 #define I2C1_SCL_PIN GP22 #define I2C1_SDA_PIN GP23 -/* 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 - -/* ws2812 RGB LED */ -#define RGB_DI_PIN GP18 -#ifdef RGB_DI_PIN -# define RGBLED_NUM 113 -# define RGBLED_SPLIT { 56, 57 } -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_LIMIT_VAL 100 /* The maximum brightness level */ -# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -/*== enabled 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 -# define RGBLIGHT_EFFECT_TWINKLE -# define RGBLIGHT_DEFAULT_VAL 100 -# define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) +#define RGBLIGHT_DEFAULT_VAL 120 +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2) // RGB Matrix -//# ifdef RGB_MATRIX_ENABLE -# define ENABLE_RGB_MATRIX_ALPHAS_MODS -# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_BREATHING -# define ENABLE_RGB_MATRIX_BAND_SAT -# define ENABLE_RGB_MATRIX_BAND_VAL -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define ENABLE_RGB_MATRIX_CYCLE_ALL -# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -# define ENABLE_RGB_MATRIX_DUAL_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -# define ENABLE_RGB_MATRIX_TYPING_HEATMAP -# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define ENABLE_RGB_MATRIX_SPLASH -# define ENABLE_RGB_MATRIX_MULTISPLASH -# define ENABLE_RGB_MATRIX_SOLID_SPLASH -# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 -# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS -# define DRIVER_LED_TOTAL RGBLED_NUM -# define RGB_MATRIX_SPLIT RGBLED_SPLIT -# define RGB_DISABLE_WHEN_USB_SUSPENDED -# define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define RGB_MATRIX_KEYPRESSES -# define SPLIT_TRANSPORT_MIRROR -//# endif -#endif +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 +#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +#define DRIVER_LED_TOTAL RGBLED_NUM +#define RGB_MATRIX_SPLIT RGBLED_SPLIT +#define RGB_DISABLE_WHEN_USB_SUSPENDED +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES +#define SPLIT_TRANSPORT_MIRROR diff --git a/keyboards/keebio/sinc/rev3/info.json b/keyboards/keebio/sinc/rev3/info.json index 42978fbfa565..53df8a8040f7 100644 --- a/keyboards/keebio/sinc/rev3/info.json +++ b/keyboards/keebio/sinc/rev3/info.json @@ -43,6 +43,14 @@ {"pin_a": "GP21", "pin_b": "GP20" } ] }, + "rgblight": { + "pin": "GP18", + "led_count": 113, + "max_brightness": 120, + "sleep": true, + "split": true, + "split_count": [56, 57] + }, "rgb_matrix": { "driver": "WS2812", "layout": [ From 0ee91ca668208f905dffe2b62fa1489738adec49 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 25 Oct 2022 11:20:51 -0400 Subject: [PATCH 13/16] Use full-duplex PIO --- keyboards/keebio/sinc/rev3/config.h | 4 ++++ keyboards/keebio/sinc/rev3/info.json | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/keebio/sinc/rev3/config.h b/keyboards/keebio/sinc/rev3/config.h index 8945286ac0c3..5d698b7aecdd 100644 --- a/keyboards/keebio/sinc/rev3/config.h +++ b/keyboards/keebio/sinc/rev3/config.h @@ -17,6 +17,10 @@ along with this program. If not, see . #pragma once #define SPLIT_HAND_PIN GP4 +#define SERIAL_USART_FULL_DUPLEX +#define SERIAL_USART_TX_PIN GP0 +#define SERIAL_USART_RX_PIN GP1 +#define SERIAL_USART_PIN_SWAP #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U #define I2C_DRIVER I2CD2 diff --git a/keyboards/keebio/sinc/rev3/info.json b/keyboards/keebio/sinc/rev3/info.json index 53df8a8040f7..48ffecf2b7e2 100644 --- a/keyboards/keebio/sinc/rev3/info.json +++ b/keyboards/keebio/sinc/rev3/info.json @@ -15,10 +15,6 @@ }, "split": { "enabled": true, - "soft_serial_pin": "GP0", - "transport": { - "protocol": "serial" - }, "encoder": { "right": { "rotary": [ From 5588264947422a114b4a99bb08567d4defbc8d11 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 25 Oct 2022 12:26:15 -0400 Subject: [PATCH 14/16] Add MCU/bootloader settings for Rev. 2 --- keyboards/keebio/sinc/rev2/info.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/keebio/sinc/rev2/info.json b/keyboards/keebio/sinc/rev2/info.json index c3dd1d80ed52..10710d1fcc9b 100644 --- a/keyboards/keebio/sinc/rev2/info.json +++ b/keyboards/keebio/sinc/rev2/info.json @@ -4,6 +4,8 @@ "pid": "0x2267", "device_version": "2.0.0" }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", "debounce": 5, "diode_direction": "COL2ROW", "features": { From aafe13d1a50401049f2d2466f2df8f1388e72a07 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 25 Oct 2022 13:05:10 -0400 Subject: [PATCH 15/16] Change ISO Enter location since it shares location with Backslash --- keyboards/keebio/sinc/rev3/rev3.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/keebio/sinc/rev3/rev3.h b/keyboards/keebio/sinc/rev3/rev3.h index 62f60a2193e8..57d072398afd 100644 --- a/keyboards/keebio/sinc/rev3/rev3.h +++ b/keyboards/keebio/sinc/rev3/rev3.h @@ -127,8 +127,8 @@ along with this program. If not, see . { KC_NO, KC_NO, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ { KC_NO, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, KC_NO }, \ - { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, KC_NO }, \ - { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, KC_NO }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RC8, KC_NO }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, KC_NO, KC_NO }, \ { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \ { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO }, \ { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, KC_NO } \ @@ -150,8 +150,8 @@ along with this program. If not, see . { KC_NO, KC_NO, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ { KC_NO, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ - { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, RB9 }, \ - { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RC8, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, KC_NO, RC9 }, \ { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \ { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 }, \ { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9 } \ @@ -173,8 +173,8 @@ along with this program. If not, see . { LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ { LF1, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, KC_NO }, \ - { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, KC_NO }, \ - { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, KC_NO }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RC8, KC_NO }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, KC_NO, KC_NO }, \ { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, KC_NO }, \ { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO }, \ { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, KC_NO } \ @@ -196,8 +196,8 @@ along with this program. If not, see . { LE1, LE2, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO }, \ { LF1, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9 }, \ - { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, RB9 }, \ - { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RC8, RB9 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, KC_NO, RC9 }, \ { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, RD8, RD9 }, \ { RE1, RE2, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 }, \ { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9 } \ From 0d4452ec06d05006f2f8c8a822077bb7c014eca9 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Tue, 25 Oct 2022 15:35:45 -0400 Subject: [PATCH 16/16] Adjust build settings to reduce flash/EEPROM usage --- keyboards/keebio/sinc/info.json | 2 +- keyboards/keebio/sinc/rev1/config.h | 1 + keyboards/keebio/sinc/rev1/info.json | 11 ++++++++++- keyboards/keebio/sinc/rev2/config.h | 1 + keyboards/keebio/sinc/rev2/info.json | 11 ++++++++++- keyboards/keebio/sinc/rev3/info.json | 1 + 6 files changed, 24 insertions(+), 3 deletions(-) diff --git a/keyboards/keebio/sinc/info.json b/keyboards/keebio/sinc/info.json index 369c9b38189f..d7d7faadd221 100644 --- a/keyboards/keebio/sinc/info.json +++ b/keyboards/keebio/sinc/info.json @@ -9,7 +9,7 @@ "audio": false, "bootmagic": true, "command": false, - "console": true, + "console": false, "extrakey": true, "mousekey": false, "nkro": false, diff --git a/keyboards/keebio/sinc/rev1/config.h b/keyboards/keebio/sinc/rev1/config.h index 92d2fda64498..d00bd12328a1 100644 --- a/keyboards/keebio/sinc/rev1/config.h +++ b/keyboards/keebio/sinc/rev1/config.h @@ -31,3 +31,4 @@ along with this program. If not, see . // Set right column, left macro, 1.75u shift, split spaces, and 5x1u on by default #define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x00DE #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/keebio/sinc/rev1/info.json b/keyboards/keebio/sinc/rev1/info.json index e8bd0a08344d..86af86c3b610 100644 --- a/keyboards/keebio/sinc/rev1/info.json +++ b/keyboards/keebio/sinc/rev1/info.json @@ -53,7 +53,16 @@ "led_count" : 16, "split_count": [8, 8], "animations": { - "all": true, + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "rgb_test": true, + "snake": true, + "static_gradient": true, + "twinkle": true } } } diff --git a/keyboards/keebio/sinc/rev2/config.h b/keyboards/keebio/sinc/rev2/config.h index 92d2fda64498..d00bd12328a1 100644 --- a/keyboards/keebio/sinc/rev2/config.h +++ b/keyboards/keebio/sinc/rev2/config.h @@ -31,3 +31,4 @@ along with this program. If not, see . // Set right column, left macro, 1.75u shift, split spaces, and 5x1u on by default #define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x00DE #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/keebio/sinc/rev2/info.json b/keyboards/keebio/sinc/rev2/info.json index 10710d1fcc9b..4588513d2c66 100644 --- a/keyboards/keebio/sinc/rev2/info.json +++ b/keyboards/keebio/sinc/rev2/info.json @@ -53,7 +53,16 @@ "led_count" : 16, "split_count": [8, 8], "animations": { - "all": true, + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "rgb_test": true, + "snake": true, + "static_gradient": true, + "twinkle": true } } } diff --git a/keyboards/keebio/sinc/rev3/info.json b/keyboards/keebio/sinc/rev3/info.json index 48ffecf2b7e2..37640dbf9b1b 100644 --- a/keyboards/keebio/sinc/rev3/info.json +++ b/keyboards/keebio/sinc/rev3/info.json @@ -9,6 +9,7 @@ "debounce": 5, "diode_direction": "COL2ROW", "features": { + "console": true, "rgblight": false, "backlight": false, "rgb_matrix": true,