summaryrefslogtreecommitdiff
path: root/keyboards/crkbd
diff options
context:
space:
mode:
authorJonas Avellana <14019120+ninjonas@users.noreply.github.com>2019-09-30 11:50:27 -0600
committerDrashna Jaelre <drashna@live.com>2019-09-30 10:50:27 -0700
commitcffe671a61e8187b39a508556c7a5b5f04835d24 (patch)
tree071199e57f8c1db1c18af28aa19dda78595a1c67 /keyboards/crkbd
parentf418efcaf5d681e87bd23b4d28621b87ff61fcb9 (diff)
[Keymap] Updating crkbd RGB keymap implementation & ninjonas userspace updates (#6834)
* [keymap] Updating crkbd RGB implementation & ninjonas userspace updates * [chore] adding process_record_oled method to process_records.h
Diffstat (limited to 'keyboards/crkbd')
-rw-r--r--keyboards/crkbd/keymaps/ninjonas/README.md2
-rw-r--r--keyboards/crkbd/keymaps/ninjonas/config.h64
-rw-r--r--keyboards/crkbd/keymaps/ninjonas/keymap.c10
-rw-r--r--keyboards/crkbd/keymaps/ninjonas/rgb.c27
-rw-r--r--keyboards/crkbd/keymaps/ninjonas/rules.mk6
5 files changed, 61 insertions, 48 deletions
diff --git a/keyboards/crkbd/keymaps/ninjonas/README.md b/keyboards/crkbd/keymaps/ninjonas/README.md
index 24889a221d..4d7434fa7a 100644
--- a/keyboards/crkbd/keymaps/ninjonas/README.md
+++ b/keyboards/crkbd/keymaps/ninjonas/README.md
@@ -51,7 +51,7 @@ More information about the crkbd keyboard can be found [here](https://thomasbaar
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , , KC_BRID, Next, VolUp, , PgDn, Left, Down, Right, K_LOCK,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
- // , , , Prev, VolDn, [, ], , , M_CODE, M_ZOOM, M_PYNV,
+ // , , , Prev, VolDn, [, ], , , M_CODE, M_XXX1, M_PYNV,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
// , , , , ,
//`---------------------' `---------------------'
diff --git a/keyboards/crkbd/keymaps/ninjonas/config.h b/keyboards/crkbd/keymaps/ninjonas/config.h
index ef7ff6c556..5d21446623 100644
--- a/keyboards/crkbd/keymaps/ninjonas/config.h
+++ b/keyboards/crkbd/keymaps/ninjonas/config.h
@@ -32,16 +32,60 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define TAPPING_FORCE_HOLD
-#ifdef RGBLIGHT_ENABLE
- #undef RGBLED_NUM
- #undef RGBLIGHT_ANIMATIONS // https://docs.qmk.fm/#/feature_rgblight?id=effect-and-animation-toggles
- #define RGBLIGHT_EFFECT_BREATHING
- #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
- #define RGBLED_NUM 27
- #define RGBLIGHT_LIMIT_VAL 120
- #define RGBLIGHT_HUE_STEP 10
- #define RGBLIGHT_SAT_STEP 17
- #define RGBLIGHT_VAL_STEP 17
+#ifdef RGB_MATRIX_ENABLE
+ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120
+ #define RGB_MATRIX_HUE_STEP 10
+ #define RGB_MATRIX_SAT_STEP 10
+ #define RGB_MATRIX_VAL_STEP 10
+ #define RGB_MATRIX_SPD_STEP 10
+ // #define RGB_MATRIX_KEYPRESSES
+ #define RGB_MATRIX_FRAMEBUFFER_EFFECTS
+
+ // BEGIN: Disable RGB Effects
+ //#define DISABLE_RGB_MATRIX_SOLID_COLOR
+ //#define DISABLE_RGB_MATRIX_ALPHAS_MODS
+ //#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
+ #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_CYCLE_OUT_IN
+ #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
+ #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
+ #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
+ #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
+ #define DISABLE_RGB_MATRIX_DUAL_BEACON
+ #define DISABLE_RGB_MATRIX_RAINBOW_BEACON
+ #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
+ #define DISABLE_RGB_MATRIX_RAINDROPS
+ #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+
+ // BEGIN: RGB_MATRIX_FRAMEBUFFER_EFFECTS
+ #define DISABLE_RGB_MATRIX_TYPING_HEATMAP
+ // #define DISABLE_RGB_MATRIX_DIGITAL_RAIN
+ // END: RGB_MATRIX_FRAMEBUFFER_EFFECTS
+
+ // BEGIN: RGB_MATRIX_KEYPRESSES
+ #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+ #define DISABLE_RGB_MATRIX_SOLID_REACTIVE
+ #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
+ // END: RGB_MATRIX_KEYPRESSES
+ // END: Disable RGB Effects
#endif
#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
diff --git a/keyboards/crkbd/keymaps/ninjonas/keymap.c b/keyboards/crkbd/keymaps/ninjonas/keymap.c
index 6d19345c44..21f83cc78e 100644
--- a/keyboards/crkbd/keymaps/ninjonas/keymap.c
+++ b/keyboards/crkbd/keymaps/ninjonas/keymap.c
@@ -40,11 +40,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = LAYOUT_wrapper(
//,----------------------------------------------------. ,----------------------------------------------------.
- XXXXXXX, XXXXXXX, _________MEDIA_1_________, K_CSCN, _______________NAV_1______________, XXXXXXX, K_MDSH,
+ M_XXX2, M_XXX3, _________MEDIA_1_________, K_CSCN, _______________NAV_1______________, XXXXXXX, K_MDSH,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
- XXXXXXX, XXXXXXX, _________MEDIA_2_________, XXXXXXX, _______________NAV_2______________, K_LOCK, XXXXXXX,
+ M_XXX4, M_XXX5, _________MEDIA_2_________, XXXXXXX, _______________NAV_2______________, K_LOCK, XXXXXXX,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
- _______, M_SHFT, _________MEDIA_3_________, T_LBRC, T_RBRC, _______, XXXXXXX, M_CODE, M_ZOOM, M_PYNV,
+ KC_LSFT, M_SHFT, _________MEDIA_3_________, T_LBRC, T_RBRC, KC_M, XXXXXXX, M_CODE, M_XXX1, M_PYNV,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_______,_______,_______, _______,_______,_______
//`---------------------' `---------------------'
@@ -66,9 +66,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//,----------------------------------------------------. ,----------------------------------------------------.
M_MAKE, EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, COLEMAK, DVORAK, QWERTY,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
- M_VRSN, M_MALL, XXXXXXX, RGB_SAI, RGB_HUI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ M_VRSN, M_MALL, RGB_SPI, RGB_SAI, RGB_HUI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
- M_FLSH, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_VAD, RGB_M_P, RGB_M_B,RGB_M_SW, XXXXXXX, XXXXXXX, XXXXXXX,
+ M_FLSH, XXXXXXX, RGB_SPD, RGB_SAD, RGB_HUD, RGB_VAD, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+-------| |--------+--------+--------+--------+--------+-------|
_______,_______,_______, _______,_______,_______
//`---------------------' `---------------------'
diff --git a/keyboards/crkbd/keymaps/ninjonas/rgb.c b/keyboards/crkbd/keymaps/ninjonas/rgb.c
deleted file mode 100644
index f9ac3a8610..0000000000
--- a/keyboards/crkbd/keymaps/ninjonas/rgb.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include QMK_KEYBOARD_H
-
-extern keymap_config_t keymap_config;
-
-#ifdef RGBLIGHT_ENABLE
-//Following line allows macro to read current RGB settings
-extern rgblight_config_t rgblight_config;
-#endif
-
-extern uint8_t is_master;
-
-int RGB_current_mode;
-
-// Setting ADJUST layer RGB back to default
-void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
- if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
- layer_on(layer3);
- } else {
- layer_off(layer3);
- }
-}
-
-void keyboard_post_init_user(void) {
- #ifdef RGBLIGHT_ENABLE
- RGB_current_mode = rgblight_config.mode;
- #endif
-} \ No newline at end of file
diff --git a/keyboards/crkbd/keymaps/ninjonas/rules.mk b/keyboards/crkbd/keymaps/ninjonas/rules.mk
index 92e18ed6e2..95cc3fed36 100644
--- a/keyboards/crkbd/keymaps/ninjonas/rules.mk
+++ b/keyboards/crkbd/keymaps/ninjonas/rules.mk
@@ -1,11 +1,7 @@
-RGBLIGHT_ENABLE = yes
+RGB_MATRIX_ENABLE = WS2812
MOUSEKEY_ENABLE = no
OLED_DRIVER_ENABLE = yes
LINK_TIME_OPTIMIZATION_ENABLE = yes
# 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 you want to change the display of OLED, you need to change here
-SRC += ./lib/rgb_state_reader.c \
- rgb.c