From 5069efc2abb0487129c92ac25e1f6dcada23b080 Mon Sep 17 00:00:00 2001 From: Sadek Baroudi Date: Fri, 15 Oct 2021 17:48:50 -0700 Subject: [PATCH] fixed encoder issue --- bin/build-ffkb-rgb-matrix-evq-ec11.sh | 3 + bin/build-ffkb-rgblight-evq-ec11.sh | 3 + .../xoiviox/ffkb/config-rgb-matrix-evq-ec11.h | 157 ++++++++++++++++++ .../xoiviox/ffkb/config-rgblight-evq-ec11.h | 157 ++++++++++++++++++ 4 files changed, 320 insertions(+) create mode 100644 keyboards/xoiviox/ffkb/config-rgb-matrix-evq-ec11.h create mode 100644 keyboards/xoiviox/ffkb/config-rgblight-evq-ec11.h diff --git a/bin/build-ffkb-rgb-matrix-evq-ec11.sh b/bin/build-ffkb-rgb-matrix-evq-ec11.sh index ef7abdddda..9ea52d85f5 100755 --- a/bin/build-ffkb-rgb-matrix-evq-ec11.sh +++ b/bin/build-ffkb-rgb-matrix-evq-ec11.sh @@ -2,8 +2,11 @@ # TODO: consolidate all the build files into one +cp keyboards/xoiviox/ffkb/config.h keyboards/xoiviox/ffkb/config.h.bak cp keyboards/xoiviox/ffkb/rules.mk keyboards/xoiviox/ffkb/rules.mk.bak +cp keyboards/xoiviox/ffkb/config-rgb-matrix-evq-ec11.h keyboards/xoiviox/ffkb/config.h cp keyboards/xoiviox/ffkb/rules-rgb-matrix-evq-ec11.mk keyboards/xoiviox/ffkb/rules.mk make xoiviox/ffkb:sadekbaroudi +mv keyboards/xoiviox/ffkb/config.h.bak keyboards/xoiviox/ffkb/config.h mv keyboards/xoiviox/ffkb/rules.mk.bak keyboards/xoiviox/ffkb/rules.mk cp .build/xoiviox_ffkb_sadekbaroudi* /mnt/g/My\ Drive/qmk-keyboards/ffkb-rgb-matrix-evq-ec11/ diff --git a/bin/build-ffkb-rgblight-evq-ec11.sh b/bin/build-ffkb-rgblight-evq-ec11.sh index 6673c2502c..00c03034f3 100755 --- a/bin/build-ffkb-rgblight-evq-ec11.sh +++ b/bin/build-ffkb-rgblight-evq-ec11.sh @@ -2,8 +2,11 @@ # TODO: consolidate all the build files into one +cp keyboards/xoiviox/ffkb/config.h keyboards/xoiviox/ffkb/config.h.bak cp keyboards/xoiviox/ffkb/rules.mk keyboards/xoiviox/ffkb/rules.mk.bak +cp keyboards/xoiviox/ffkb/config-rgblight-evq-ec11.h keyboards/xoiviox/ffkb/config.h cp keyboards/xoiviox/ffkb/rules-rgblight-evq-ec11.mk keyboards/xoiviox/ffkb/rules.mk make xoiviox/ffkb:sadekbaroudi +mv keyboards/xoiviox/ffkb/config.h.bak keyboards/xoiviox/ffkb/config.h mv keyboards/xoiviox/ffkb/rules.mk.bak keyboards/xoiviox/ffkb/rules.mk cp .build/xoiviox_ffkb_sadekbaroudi* /mnt/g/My\ Drive/qmk-keyboards/ffkb-rgblight-evq-ec11/ diff --git a/keyboards/xoiviox/ffkb/config-rgb-matrix-evq-ec11.h b/keyboards/xoiviox/ffkb/config-rgb-matrix-evq-ec11.h new file mode 100644 index 0000000000..d387797a71 --- /dev/null +++ b/keyboards/xoiviox/ffkb/config-rgb-matrix-evq-ec11.h @@ -0,0 +1,157 @@ +/* +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 "config_common.h" + + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0001 +#define VENDOR_ID 0xFEFE +#define PRODUCT_ID 0xFF3B +//#define DEVICE_VER 0x0001 // Now defined in the revX/config.h +#define MANUFACTURER sadekbaroudi +#define PRODUCT sadekbaroudi ffkb +#define DESCRIPTION sadekbaroudi ffkb + +/* key matrix size */ +/* Rows are doubled up */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +// wiring +#define MATRIX_ROW_PINS \ + { B0, B1, C6, B6 } // 8, 9, 31, 30 +#define MATRIX_COL_PINS \ + { F4, F6, F5, F7, F1, B3, B2, D2, D3, D5, B5, B7 } // 39, 37, 38, 36, 40, 11, 10, 20, 21, 22, 29, 12 +#define UNUSED_PINS + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define TAP_CODE_DELAY 25 +#define TAPPING_FORCE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +#define RGB_DI_PIN F0 // 41 +#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 112 /* 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 */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose 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 +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +#ifdef RGB_MATRIX_ENABLE + #define DRIVER_LED_TOTAL 42 + #define RGB_MATRIX_CENTER {100, 32} + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 112 /* 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 DISABLE_RGB_MATRIX_ALPHAS_MODS + #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT + // #define DISABLE_RGB_MATRIX_BREATHING + // #define DISABLE_RGB_MATRIX_BAND_SAT + // #define DISABLE_RGB_MATRIX_BAND_VAL + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL + #define DISABLE_RGB_MATRIX_CYCLE_ALL + // #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + // #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN + #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + // #define DISABLE_RGB_MATRIX_DUAL_BEACON + #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL + #define DISABLE_RGB_MATRIX_RAINBOW_BEACON + #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define DISABLE_RGB_MATRIX_RAINDROPS + #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + #define DISABLE_RGB_MATRIX_DIGITAL_RAIN + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + #define DISABLE_RGB_MATRIX_SPLASH + #define DISABLE_RGB_MATRIX_MULTISPLASH + #define DISABLE_RGB_MATRIX_SOLID_SPLASH + #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif + +// SDA, 27, 25 +// 19, 27, 25 +#define ENCODERS_PAD_A {D7, D4, D1} +// SCL, 28, 26 +// 28, 28, 26 +#define ENCODERS_PAD_B {B4, D6, D0} + +#define ENCODERS_A_REVERSE true +#define ENCODERS_B_REVERSE true + +#define ENCODER_RESOLUTION 4 +// Per encoder settings +//#define ENCODER_RESOLUTIONS { 4, 4 } + +#ifdef THUMBSTICK_ENABLE +# define THUMBSTICK_FLIP_X +# define THUMBSTICK_FLIP_Y +# define THUMBSTICK_PIN_X F7 +# define THUMBSTICK_PIN_Y F0 +#endif + +/* 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 + +#define TRACKBALL_ORIENTATION 2 + +// If using encoder type 2, uncomment this +// #define ENCODERS_B_REVERSE + +#define DYNAMIC_KEYMAP_LAYER_COUNT 5 \ No newline at end of file diff --git a/keyboards/xoiviox/ffkb/config-rgblight-evq-ec11.h b/keyboards/xoiviox/ffkb/config-rgblight-evq-ec11.h new file mode 100644 index 0000000000..d387797a71 --- /dev/null +++ b/keyboards/xoiviox/ffkb/config-rgblight-evq-ec11.h @@ -0,0 +1,157 @@ +/* +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 "config_common.h" + + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0001 +#define VENDOR_ID 0xFEFE +#define PRODUCT_ID 0xFF3B +//#define DEVICE_VER 0x0001 // Now defined in the revX/config.h +#define MANUFACTURER sadekbaroudi +#define PRODUCT sadekbaroudi ffkb +#define DESCRIPTION sadekbaroudi ffkb + +/* key matrix size */ +/* Rows are doubled up */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +// wiring +#define MATRIX_ROW_PINS \ + { B0, B1, C6, B6 } // 8, 9, 31, 30 +#define MATRIX_COL_PINS \ + { F4, F6, F5, F7, F1, B3, B2, D2, D3, D5, B5, B7 } // 39, 37, 38, 36, 40, 11, 10, 20, 21, 22, 29, 12 +#define UNUSED_PINS + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define TAP_CODE_DELAY 25 +#define TAPPING_FORCE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +#define RGB_DI_PIN F0 // 41 +#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 112 /* 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 */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose 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 +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +#ifdef RGB_MATRIX_ENABLE + #define DRIVER_LED_TOTAL 42 + #define RGB_MATRIX_CENTER {100, 32} + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 112 /* 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 DISABLE_RGB_MATRIX_ALPHAS_MODS + #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT + // #define DISABLE_RGB_MATRIX_BREATHING + // #define DISABLE_RGB_MATRIX_BAND_SAT + // #define DISABLE_RGB_MATRIX_BAND_VAL + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL + #define DISABLE_RGB_MATRIX_CYCLE_ALL + // #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + // #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN + #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + // #define DISABLE_RGB_MATRIX_DUAL_BEACON + #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL + #define DISABLE_RGB_MATRIX_RAINBOW_BEACON + #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define DISABLE_RGB_MATRIX_RAINDROPS + #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + #define DISABLE_RGB_MATRIX_DIGITAL_RAIN + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + #define DISABLE_RGB_MATRIX_SPLASH + #define DISABLE_RGB_MATRIX_MULTISPLASH + #define DISABLE_RGB_MATRIX_SOLID_SPLASH + #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif + +// SDA, 27, 25 +// 19, 27, 25 +#define ENCODERS_PAD_A {D7, D4, D1} +// SCL, 28, 26 +// 28, 28, 26 +#define ENCODERS_PAD_B {B4, D6, D0} + +#define ENCODERS_A_REVERSE true +#define ENCODERS_B_REVERSE true + +#define ENCODER_RESOLUTION 4 +// Per encoder settings +//#define ENCODER_RESOLUTIONS { 4, 4 } + +#ifdef THUMBSTICK_ENABLE +# define THUMBSTICK_FLIP_X +# define THUMBSTICK_FLIP_Y +# define THUMBSTICK_PIN_X F7 +# define THUMBSTICK_PIN_Y F0 +#endif + +/* 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 + +#define TRACKBALL_ORIENTATION 2 + +// If using encoder type 2, uncomment this +// #define ENCODERS_B_REVERSE + +#define DYNAMIC_KEYMAP_LAYER_COUNT 5 \ No newline at end of file