From c23dbe3afb9ed2165c048367ac896c4f4e0bc72f Mon Sep 17 00:00:00 2001 From: Sadek Baroudi Date: Thu, 14 Dec 2023 02:49:59 -0800 Subject: [PATCH] added first attempt at kucheza firmware --- keyboards/fingerpunch/FP_LIBRARY_SUPPORT.md | 1 + keyboards/fingerpunch/kucheza/config.h | 144 ++++++++++++++++++ keyboards/fingerpunch/kucheza/fp_build.json | 7 + .../kucheza/fp_build.more_options.json | 17 +++ keyboards/fingerpunch/kucheza/halconf.h | 13 ++ keyboards/fingerpunch/kucheza/info.json | 11 ++ .../kucheza/keymaps/default/keymap.c | 72 +++++++++ .../kucheza/keymaps/sadekbaroudi/keymap.c | 120 +++++++++++++++ keyboards/fingerpunch/kucheza/kucheza.c | 44 ++++++ keyboards/fingerpunch/kucheza/kucheza.h | 68 +++++++++ keyboards/fingerpunch/kucheza/mcuconf.h | 18 +++ keyboards/fingerpunch/kucheza/readme.md | 22 +++ .../fingerpunch/kucheza/rgb_matrix_kb.inc | 2 + keyboards/fingerpunch/kucheza/rules.mk | 52 +++++++ users/sadekbaroudi/wrappers.h | 5 + 15 files changed, 596 insertions(+) create mode 100644 keyboards/fingerpunch/kucheza/config.h create mode 100644 keyboards/fingerpunch/kucheza/fp_build.json create mode 100644 keyboards/fingerpunch/kucheza/fp_build.more_options.json create mode 100644 keyboards/fingerpunch/kucheza/halconf.h create mode 100644 keyboards/fingerpunch/kucheza/info.json create mode 100644 keyboards/fingerpunch/kucheza/keymaps/default/keymap.c create mode 100644 keyboards/fingerpunch/kucheza/keymaps/sadekbaroudi/keymap.c create mode 100644 keyboards/fingerpunch/kucheza/kucheza.c create mode 100644 keyboards/fingerpunch/kucheza/kucheza.h create mode 100644 keyboards/fingerpunch/kucheza/mcuconf.h create mode 100644 keyboards/fingerpunch/kucheza/readme.md create mode 100644 keyboards/fingerpunch/kucheza/rgb_matrix_kb.inc create mode 100644 keyboards/fingerpunch/kucheza/rules.mk diff --git a/keyboards/fingerpunch/FP_LIBRARY_SUPPORT.md b/keyboards/fingerpunch/FP_LIBRARY_SUPPORT.md index 2a20b3e79c..020f37eec8 100644 --- a/keyboards/fingerpunch/FP_LIBRARY_SUPPORT.md +++ b/keyboards/fingerpunch/FP_LIBRARY_SUPPORT.md @@ -60,6 +60,7 @@ For an example, see `keyboards/fingerpunch/ximi/config.h`, which uses the `FP_ST #define FP_STARTUP_LIGHT HALF_NOTE(_E6), HALF_NOTE(_F6), HALF_NOTE(_C6), WHOLE_NOTE(_A5), WHOLE_DOT_NOTE(_F5), #define FP_STARTUP_LIGHT_EXT HALF_NOTE(_E6), HALF_NOTE(_F6), HALF_NOTE(_C6), WHOLE_NOTE(_A5), WHOLE_DOT_NOTE(_F5), WHOLE_DOT_NOTE(_D5), WHOLE_DOT_NOTE(_G5), WHOLE_DOT_NOTE(_C5), #define FP_STARTUP_DARK HALF_DOT_NOTE(_B5), QUARTER_NOTE(_B5), HALF_NOTE(_E6), HALF_NOTE(_REST), QUARTER_NOTE(_C6), QUARTER_NOTE(_REST), QUARTER_NOTE(_G5), QUARTER_NOTE(_E5), QUARTER_NOTE(_F5), QUARTER_NOTE(_GS5), QUARTER_NOTE(_G5), QUARTER_NOTE(_F5), WHOLE_NOTE(_G5), +#define FP_MARIO QUARTER_NOTE(_E5), QUARTER_NOTE(_E5), QUARTER_NOTE(_REST), QUARTER_NOTE(_E5), QUARTER_NOTE(_REST), QUARTER_NOTE(_C5), QUARTER_NOTE(_E5), QUARTER_NOTE(_REST), QUARTER_NOTE(_G5), HALF_DOT_NOTE(_REST), QUARTER_NOTE(_G4), ``` ### Shared RGB effects diff --git a/keyboards/fingerpunch/kucheza/config.h b/keyboards/fingerpunch/kucheza/config.h new file mode 100644 index 0000000000..26024d6245 --- /dev/null +++ b/keyboards/fingerpunch/kucheza/config.h @@ -0,0 +1,144 @@ +/* +Copyright 2021 Sadek Baroudi + +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 "keyboards/fingerpunch/src/config_pre.h" + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* 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 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { GP0, GP1, GP2, GP3, GP4, GP16 } +#define MATRIX_COL_PINS { GP7, GP8, GP10, GP11, GP12, GP13, GP14, GP15 } + +// VIK pin config +#define VIK_SPI_DRIVER SPID0 +#define VIK_SPI_SCK_PIN GP22 +#define VIK_SPI_MOSI_PIN GP23 +#define VIK_SPI_MISO_PIN GP20 +#define VIK_SPI_CS GP21 +#define VIK_I2C_DRIVER I2CD0 +#define VIK_I2C_SDA_PIN GP24 +#define VIK_I2C_SCL_PIN GP25 +#define VIK_GPIO_1 GP10 +#define VIK_GPIO_2 GP24 +#define VIK_WS2812_DI_PIN GP9 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* encoder config */ +#define ENCODERS_PAD_A {GP6} +#define ENCODERS_PAD_B {GP5} +#define ENCODER_RESOLUTION 2 + +#define WS2812_DI_PIN GP9 +#ifdef RGBLIGHT_ENABLE + #define RGBLED_NUM 42 + #define RGBLIGHT_HUE_STEP 16 + #define RGBLIGHT_SAT_STEP 16 + #define RGBLIGHT_VAL_STEP 16 + #define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level for RGBLIGHT_ENABLE */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + #define RGBLIGHT_EFFECT_ALTERNATING + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_TWINKLE +#endif + +#ifdef RGB_MATRIX_ENABLE + #define RGB_MATRIX_LED_COUNT 42 + #define RGB_MATRIX_CENTER {112, 32} + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 /* The maximum brightness level for RGB_MATRIX */ + #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set + #define RGB_MATRIX_KEYPRESSES + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS + #define RGB_MATRIX_KEYREACTIVE_ENABLED + #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_DUAL_BEACON + #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL + #define ENABLE_RGB_MATRIX_RAINBOW_BEACON + #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define ENABLE_RGB_MATRIX_RAINDROPS + #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + #define ENABLE_RGB_MATRIX_DIGITAL_RAIN + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #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 +#endif + +#ifdef AUDIO_ENABLE + #define AUDIO_VOICES + #define AUDIO_PIN GP18 + #define AUDIO_PWM_DRIVER PWMD1 + #define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A + // #define AUDIO_PWM_PAL_MODE 42 // only if using AUDIO_DRIVER = pwm_hardware + // #define NO_MUSIC_MODE + #define AUDIO_ENABLE_TONE_MULTIPLEXING + #define AUDIO_TONE_MULTIPLEXING_RATE_DEFAULT 10 + #define FP_AUDIO_MOUSE_BUTTONS + #define FP_AUDIO_CUT_COPY_PASTE + #define FP_AUDIO_SAVE + #define FP_MARIO QUARTER_NOTE(_E5), QUARTER_NOTE(_E5), QUARTER_NOTE(_REST), QUARTER_NOTE(_E5), QUARTER_NOTE(_REST), QUARTER_NOTE(_C5), QUARTER_NOTE(_E5), QUARTER_NOTE(_REST), QUARTER_NOTE(_G5), HALF_DOT_NOTE(_REST), QUARTER_NOTE(_G4), + #define STARTUP_SONG SONG(FP_MARIO) + #define DEFAULT_LAYER_SONGS \ + { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND) } +#endif + +// #ifdef VIK_PMW3360 +// #define POINTING_DEVICE_INVERT_Y +// #endif + +#include "keyboards/fingerpunch/src/config_post.h" \ No newline at end of file diff --git a/keyboards/fingerpunch/kucheza/fp_build.json b/keyboards/fingerpunch/kucheza/fp_build.json new file mode 100644 index 0000000000..d3c99ca0d7 --- /dev/null +++ b/keyboards/fingerpunch/kucheza/fp_build.json @@ -0,0 +1,7 @@ +[ + { + "type" : "single", + "name" : "ENCODER_ENABLE", + "user_input": "Do you have a rotary encoder?" + } +] diff --git a/keyboards/fingerpunch/kucheza/fp_build.more_options.json b/keyboards/fingerpunch/kucheza/fp_build.more_options.json new file mode 100644 index 0000000000..eca9bc2c03 --- /dev/null +++ b/keyboards/fingerpunch/kucheza/fp_build.more_options.json @@ -0,0 +1,17 @@ +[ + { + "type" : "one-of", + "names" : [ "RGBLIGHT_ENABLE", "RGB_MATRIX_ENABLE" ], + "user_input": "Disable RGB, RGB light, RGB matrix?" + }, + { + "type" : "single", + "name" : "ENCODER_ENABLE", + "user_input": "Do you have a rotary encoder?" + }, + { + "type" : "single", + "name" : "AUDIO_ENABLE", + "user_input": "Do you want to enable the audio buzzer?" + } +] diff --git a/keyboards/fingerpunch/kucheza/halconf.h b/keyboards/fingerpunch/kucheza/halconf.h new file mode 100644 index 0000000000..859baec118 --- /dev/null +++ b/keyboards/fingerpunch/kucheza/halconf.h @@ -0,0 +1,13 @@ +/* + * Copyright 2023 Sadek Baroudi (@sadekbaroudi) + */ + +#pragma once + +#define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE +#define HAL_USE_PAL TRUE +// #define HAL_USE_SERIAL TRUE // not supported on rp2040, as it seems +#define HAL_USE_SPI TRUE + +#include_next \ No newline at end of file diff --git a/keyboards/fingerpunch/kucheza/info.json b/keyboards/fingerpunch/kucheza/info.json new file mode 100644 index 0000000000..4bda6221d4 --- /dev/null +++ b/keyboards/fingerpunch/kucheza/info.json @@ -0,0 +1,11 @@ +{ + "manufacturer": "sadekbaroudi", + "keyboard_name": "kucheza", + "url": "https://fingerpunch.xyz/product/kucheza/", + "maintainer": "Sadek Baroudi ", + "usb": { + "vid": "0xFEFE", + "pid": "0x17C8", + "device_version": "1.0.0" + } +} diff --git a/keyboards/fingerpunch/kucheza/keymaps/default/keymap.c b/keyboards/fingerpunch/kucheza/keymaps/default/keymap.c new file mode 100644 index 0000000000..7a091698ab --- /dev/null +++ b/keyboards/fingerpunch/kucheza/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY, + _COLEMAK, + _RGB +}; + +// +-------+-------+-------+-------+-------+-------+-------+ +// | | | | | | | | +// +-------+-------+-------+-------+-------+-------+-------+ +// | | | | | | | | +// +-------+-------+-------+-------+-------+-------+-------+ +// | | | | | | | | +// +-------+-------+-------+-------+-------+-------+-------+ +-------+ +// | | | | | | | | | +// +-------+-------+-------+-------+-------+-------+-------+ +-------+-------+-------+ +// | | | | | | | | | | | | <--- 5 way nav +// +-------+-------+-------+ +-------+-------+-------+ +-------+-------+-------+ +// | | +// +-------+ +// +-------+-------+-------+ +// | | | | <--- 3 way thumb +// +-------+-------+-------+ + +// ----. +// '.. +// ' +// +-------+ +// | | +// | | <---- foot pedal via TRRS +// | | +// +-------+ + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +[_QWERTY] = LAYOUT_kucheza( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LCBR, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_VOLU, + KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(_RGB), KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, + KC_VOLD, + KC_VOLD, KC_MUTE, KC_VOLU, + KC_LSFT +), + +[_COLEMAK] = LAYOUT_kucheza( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, + KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_LCBR, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_VOLU, + KC_LCTL, KC_LGUI, KC_LALT, KC_DEL, MO(_RGB), KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, + KC_VOLD, + KC_VOLD, KC_MUTE, KC_VOLU, + KC_LSFT +), + +[_RGB] = LAYOUT_kucheza( + QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, RGB_TOG, RGB_RMOD, RGB_MOD, _______, TG(_QWERTY), _______, + _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, KC_END, _______, + _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, TG(_COLEMAK), _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, + _______, _______, _______, + _______ +) +}; diff --git a/keyboards/fingerpunch/kucheza/keymaps/sadekbaroudi/keymap.c b/keyboards/fingerpunch/kucheza/keymaps/sadekbaroudi/keymap.c new file mode 100644 index 0000000000..a40608926e --- /dev/null +++ b/keyboards/fingerpunch/kucheza/keymaps/sadekbaroudi/keymap.c @@ -0,0 +1,120 @@ +#include "sadekbaroudi.h" + +#include QMK_KEYBOARD_H + +#define _GAME 0 +#define _FUNCTION 1 +#define _KICAD 2 +#define _FUSION 3 +#define _ALPHA 4 + +enum custom_keycodes { + GAME = SAFE_RANGE, + FUNCTION, + KICAD, + FUSION, + ALPHA, +}; + +// +-------+-------+-------+-------+-------+-------+-------+ +// | | | | | | | | +// +-------+-------+-------+-------+-------+-------+-------+ +// | | | | | | | | +// +-------+-------+-------+-------+-------+-------+-------+ +// | | | | | | | | +// +-------+-------+-------+-------+-------+-------+-------+ +-------+ +// | | | | | | | | | +// +-------+-------+-------+-------+-------+-------+-------+ +-------+-------+-------+ +// | | | | | | | | | | | | <--- 5 way nav +// +-------+-------+-------+ +-------+-------+-------+ +-------+-------+-------+ +// | | +// +-------+ +// +-------+-------+-------+ +// | | | | <--- 3 way thumb +// +-------+-------+-------+ + +// ----. +// '.. +// ' +// +-------+ +// | | +// | | <---- foot pedal via TRRS +// | | +// +-------+ + +// clang-format off +#define LAYOUT_halfdash_base( \ + K01, K02, K03, K04, K05, K06, K07, \ + K11, K12, K13, K14, K15, K16, K17, \ + K21, K22, K23, K24, K25, K26, K27, \ + K31, K32, K33, K34, K35, K36, \ + K41, K42, K43, K44, K45, K46, K47 \ + ) \ + LAYOUT_wrapper( \ + K01, K02, K03, K04, K05, K06, K07, \ + K11, K12, K13, K14, K15, K16, K17, \ + K21, K22, K23, K24, K25, K26, K27, \ + K31, K32, K33, K34, K35, K36, \ + K41, K42, K43, K44, K45, K46, K47 \ + ) + +/* Re-pass though to allow templates to be used */ +#define LAYOUT_halfdash_base_wrapper(...) LAYOUT_halfdash_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_GAME] = LAYOUT_wrapper( \ + __GAMES_R0_L__, ___________________GAMES_0_________________, __GAMES_R0_R__, \ + __GAMES_R1_L__, ___________________GAMES_1_________________, __GAMES_R1_R__, \ + __GAMES_R2_L__, ___________________GAMES_2_________________, __GAMES_R2_R__, \ + __GAMES_R3_L__, ___________________GAMES_3_________________, KC_VOLU, \ + __GAMES_R4_1__, __GAMES_R4_2__, MO(_FUNCTION), __GAMES_R4_3__, __GAMES_TH_L__, __GAMES_TH_C__, KC_MPRV, KC_MPLY, KC_MNXT, \ + KC_VOLD, \ + KC_VOLD, KC_MUTE, KC_VOLU, \ + KC_LSFT \ + ), + + [_FUNCTION] = LAYOUT_wrapper( \ + QK_BOOT, TG(_KICAD), TG(_FUSION), TG(_ALPHA), KC_4, KC_5, KC_LBRC, \ + KC_TAB, RGB_TOG, RGB_MODE_REVERSE, RGB_MODE_FORWARD, _______, RGB_SPI, BL_ON, \ + KC_CAPS, KC_RGB_BLT, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, BL_OFF, \ + KC_LSFT, KC_RGB_T, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_VOLU, \ + KC_LCTL, KC_LGUI, _______, KC_LALT, KC_BSPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, \ + KC_VOLD, \ + KC_VOLD, KC_MUTE, KC_VOLU, \ + KC_LSFT \ + ), + + [_KICAD] = LAYOUT_wrapper( \ + __KICAD_R0_L__, ___________________KICAD_0_________________, __KICAD_R0_R__, \ + __KICAD_R1_L__, ___________________KICAD_1_________________, __KICAD_R1_R__, \ + __KICAD_R2_L__, ___________________KICAD_2_________________, __KICAD_R2_R__, \ + __KICAD_R3_L__, ___________________KICAD_3_________________, KC_VOLU, \ + __KICAD_R4_1__, __KICAD_R4_2__, TG(_KICAD), __KICAD_R4_3__, __KICAD_TH_L__, __KICAD_TH_C__, KC_MPRV, KC_MPLY, KC_MNXT, \ + KC_VOLD, \ + KC_VOLD, KC_MUTE, KC_VOLU, \ + KC_LSFT \ + ), + + [_FUSION] = LAYOUT_wrapper( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL , \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_VOLU, \ + KC_LCTL, KC_LGUI, TG(_FUSION), KC_LALT, KC_BSPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, \ + KC_VOLD, \ + KC_VOLD, KC_MUTE, KC_VOLU, \ + KC_LSFT \ + ), + + [_ALPHA] = LAYOUT_wrapper( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_MINS, \ + KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_DEL , \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_VOLU, \ + KC_LCTL, KC_LGUI, TG(_ALPHA), KC_LALT, KC_BSPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, \ + KC_VOLD, \ + KC_VOLD, KC_MUTE, KC_VOLU, \ + KC_LSFT \ + ), +}; diff --git a/keyboards/fingerpunch/kucheza/kucheza.c b/keyboards/fingerpunch/kucheza/kucheza.c new file mode 100644 index 0000000000..c30b6c9f77 --- /dev/null +++ b/keyboards/fingerpunch/kucheza/kucheza.c @@ -0,0 +1,44 @@ +/* Copyright 2021 Sadek Baroudi + * + * 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 "kucheza.h" + +#define NLD NO_LED + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 6, 5, 4, 3, 2, 1, 0, NLD }, + { 7, 8, 9, 10, 11, 12, 13, NLD }, + { 20, 19, 18, 17, 16, 15, 14, NLD }, + { 21, 22, 23, 24, 25, 26, NLD, NLD }, + { 32, 31, 30, 29, 28, 27, NLD, NLD }, + { NLD, NLD, NLD, NLD, NLD, NLD, NLD, NLD } +}, { + // This section is complete, see google doc + {223, 11}, {187, 4}, {152, 3}, {116, 0}, {80, 3}, {45, 4}, {9, 4}, + {9, 18}, {45, 18}, {80, 16}, {116, 12}, {152, 16}, {187, 18}, {223, 24}, + {223, 38}, {187, 31}, {152, 29}, {116, 26}, {80, 29}, {45, 31}, {9, 31}, + {9, 44}, {4, 44}, {80, 43}, {116, 39}, {152, 43}, {187, 44}, + {212, 59}, {173, 58}, {137, 58}, {80, 58}, {45, 58}, {9, 58}, + {0, 68}, {10, 68}, {22, 68}, {33, 68}, {45, 68}, {56, 68}, {68, 68}, {79, 68}, {91, 68} // accent lights +}, { + 1, 4, 4, 4, 4, 4, 1, // row 1 - right to left + 1, 4, 4, 4, 4, 4, 1, // row 2 - left to right + 1, 4, 12, 12, 12, 12, 1, // row 3 - right to left + 1, 4, 4, 4, 4, 4, // row 4 - left to right + 1, 1, 1, 1, 1, 1, // row 5 - right to left + 1, 1, 1, 1, 1, 1, 1, 1, 1 // accent lights - left to right +} }; +#endif diff --git a/keyboards/fingerpunch/kucheza/kucheza.h b/keyboards/fingerpunch/kucheza/kucheza.h new file mode 100644 index 0000000000..767b9230d2 --- /dev/null +++ b/keyboards/fingerpunch/kucheza/kucheza.h @@ -0,0 +1,68 @@ +/* Copyright 2021 Sadek Baroudi + * + * 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 "quantum.h" + +#define ___ KC_NO + +// +-------+-------+-------+-------+-------+-------+-------+ +// | | | | | | | | +// +-------+-------+-------+-------+-------+-------+-------+ +// | | | | | | | | +// +-------+-------+-------+-------+-------+-------+-------+ +// | | | | | | | | +// +-------+-------+-------+-------+-------+-------+-------+ +-------+ +// | | | | | | | | | +// +-------+-------+-------+-------+-------+-------+-------+ +-------+-------+-------+ +// | | | | | | | | | | | | <--- 5 way nav +// +-------+-------+-------+ +-------+-------+-------+ +-------+-------+-------+ +// | | +// +-------+ +// +-------+-------+-------+ +// | | | | <--- 3 way thumb +// +-------+-------+-------+ + +// ----. +// '.. +// ' +// +-------+ +// | | +// | | <---- foot pedal via TRRS +// | | +// +-------+ + +#define LAYOUT_kucheza( \ + K00, K01, K02, K03, K04, K05, K06, \ + K10, K11, K12, K13, K14, K15, K16, \ + K20, K21, K22, K23, K24, K25, K26, \ + K30, K31, K32, K33, K34, K35, K52, \ + K40, K41, K42, K43, K44, K45, K53, K56, K55, \ + K54, \ + K17, K27, K37, \ + K07 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, ___, K37 }, \ + { K40, K41, K42, K43, K44, K45, ___, ___ }, \ + { ___, ___, K52, K53, K54, K55, K56, ___ } \ +} + + +#include "keyboards/fingerpunch/src/fp.h" diff --git a/keyboards/fingerpunch/kucheza/mcuconf.h b/keyboards/fingerpunch/kucheza/mcuconf.h new file mode 100644 index 0000000000..0a3224cce9 --- /dev/null +++ b/keyboards/fingerpunch/kucheza/mcuconf.h @@ -0,0 +1,18 @@ +#pragma once + +#include_next + +#undef RP_I2C_USE_I2C0 +#define RP_I2C_USE_I2C0 TRUE + +#undef RP_PWM_USE_PWM1 +#define RP_PWM_USE_PWM1 TRUE + +#undef RP_SPI_USE_SPI0 +#define RP_SPI_USE_SPI0 TRUE + +// #undef RP_PWM_USE_PWM0 +// #define RP_PWM_USE_PWM0 TRUE + +// #undef RP_SIO_USE_UART0 +// #define RP_SIO_USE_UART0 TRUE diff --git a/keyboards/fingerpunch/kucheza/readme.md b/keyboards/fingerpunch/kucheza/readme.md new file mode 100644 index 0000000000..f3292d928d --- /dev/null +++ b/keyboards/fingerpunch/kucheza/readme.md @@ -0,0 +1,22 @@ +# kucheza + +An ergonomic 65% keyboard + +* Keyboard Maintainer: [sadekbaroudi](https://github.com/sadekbaroudi) + +To build the firmware for this keyboard (after setting up your build environment): +``` + make fingerpunch/kucheza/v3:default RGB_MATRIX_ENABLE=yes AUDIO_ENABLE=yes +``` + +Options are: +``` + CIRQUE_ENABLE=yes + RGBLIGHT_ENABLE=yes + RGB_MATRIX_ENABLE=yes + ENCODER_ENABLE=yes + AUDIO_ENABLE=yes + HAPTIC_ENABLE=yes +``` + +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). diff --git a/keyboards/fingerpunch/kucheza/rgb_matrix_kb.inc b/keyboards/fingerpunch/kucheza/rgb_matrix_kb.inc new file mode 100644 index 0000000000..1e6d96bf74 --- /dev/null +++ b/keyboards/fingerpunch/kucheza/rgb_matrix_kb.inc @@ -0,0 +1,2 @@ +#include "keyboards/fingerpunch/src/rgb_matrix_effects/alpha_mod_homerow.inc" +#include "keyboards/fingerpunch/src/rgb_matrix_effects/alpha_mod_homerow_cycle.inc" \ No newline at end of file diff --git a/keyboards/fingerpunch/kucheza/rules.mk b/keyboards/fingerpunch/kucheza/rules.mk new file mode 100644 index 0000000000..cbe3ab7b92 --- /dev/null +++ b/keyboards/fingerpunch/kucheza/rules.mk @@ -0,0 +1,52 @@ +# MCU name +MCU = RP2040 + +# Bootloader selection +BOOTLOADER = rp2040 + +# LTO must be disabled for RP2040 builds +LTO_ENABLE = no + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MOUSEKEY_ENABLE = yes + +# Either do RGBLIGHT_ENABLE or RGB_MATRIX_ENABLE and RGB_MATRIX_DRIVER +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE ?= yes +RGB_MATRIX_DRIVER = ws2812 + +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +ENCODER_ENABLE = no +# EXTRAFLAGS += -flto # macros disabled, if you need the extra space +MOUSEKEY_ENABLE = no + +AUDIO_ENABLE ?= yes +AUDIO_DRIVER = pwm_hardware + +# PIO serial/WS2812 drivers must be used on RP2040 +SERIAL_DRIVER = vendor +WS2812_DRIVER = vendor + +ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) + RGB_MATRIX_CUSTOM_KB = yes + OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB +endif + +VIK_ENABLE = yes + +include keyboards/fingerpunch/src/rules.mk diff --git a/users/sadekbaroudi/wrappers.h b/users/sadekbaroudi/wrappers.h index 259c814d81..5b504f2d65 100755 --- a/users/sadekbaroudi/wrappers.h +++ b/users/sadekbaroudi/wrappers.h @@ -196,6 +196,11 @@ expanded before being used as arguments to the LAYOUT_xxx macro. # define LAYOUT LAYOUT_baboon38 #endif +// Since LAYOUT_kucheza uses the name LAYOUT_kucheza instead of LAYOUT +#if (!defined(LAYOUT) && defined(LAYOUT_kucheza)) +# define LAYOUT LAYOUT_kucheza +#endif + // clang-format off #define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) #define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__)