From 93b2f23bba16348e2ea5d8c83d928e3a45e2b7cc Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 19 Apr 2017 01:38:08 +0700 Subject: Promethium rev2 * 10 more indicator LEDs * Piezo buzzer * Uses HC138 decoder to free up 5 pins * Trackpoint buttons are now part of matrix --- .../handwired/promethium/keymaps/priyadi/Makefile | 1 + .../handwired/promethium/keymaps/priyadi/keymap.c | 48 ++++++++++++++-------- 2 files changed, 32 insertions(+), 17 deletions(-) (limited to 'keyboards/handwired/promethium/keymaps') diff --git a/keyboards/handwired/promethium/keymaps/priyadi/Makefile b/keyboards/handwired/promethium/keymaps/priyadi/Makefile index 46fdfa0118..e3428254f6 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/Makefile +++ b/keyboards/handwired/promethium/keymaps/priyadi/Makefile @@ -19,6 +19,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes +FAUXCLICKY_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 diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index cf7c67339d..61af0a8893 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -574,7 +574,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT , KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, EMPTY, NUM, LSPACE, RSPACE, FUN, GREEK, KC_RGUI, C_RALT, KC_RCTL, + _______, _______, _______ ), /* Dvorak @@ -593,7 +594,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______, _______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ ), #endif @@ -614,7 +616,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______, _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ ), #endif @@ -635,7 +638,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______, _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ ), #endif @@ -656,7 +660,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______, _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ ), #endif @@ -675,7 +680,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______, + _______, _______, _______ ), /* Num @@ -690,10 +696,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_NUM] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_7, KC_8, KC_9, S(KC_D), _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_1, KC_2, KC_3, S(KC_D), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, - KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_1, KC_2, KC_3, S(KC_F), _______, - _______, _______, KC_X, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_COLN, _______ + KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_7, KC_8, KC_9, S(KC_F), _______, + _______, _______, KC_X, _______, _______, _______, _______, FUN0 , KC_COMM, KC_DOT, KC_COLN, _______, + _______, _______, _______ ), /* Func @@ -711,7 +718,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ ), /* Uppercase Greek @@ -729,7 +737,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______, _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ ), /* Lowercase Greek @@ -747,7 +756,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______, _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ ), /* Empty @@ -765,7 +775,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______ ), /* Emoji @@ -783,7 +794,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), - X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK) + X(POO), X(EYES), X(HUNRD),_______, X(SKULL),X(HORNS), X(HALO), X(FEAR),_______,X(YUMMY),X(DISAP),X(NOEVK), + _______, _______, _______ ), /* GUI @@ -801,7 +813,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______ ), /* Sys @@ -816,10 +829,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_SYS] = KEYMAP( - XXXXXXX, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______ ), -- cgit v1.2.3 From 3fa0b66289770ccc4d8a5b39eaf66ff3b7c67529 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 19 Apr 2017 02:52:57 +0700 Subject: Keymap updates and some adjustment for latest version of QMK --- .../handwired/promethium/keymaps/priyadi/Makefile | 1 + .../handwired/promethium/keymaps/priyadi/README.md | 4 +- .../handwired/promethium/keymaps/priyadi/keymap.c | 142 ++++++++++++++++++--- 3 files changed, 124 insertions(+), 23 deletions(-) (limited to 'keyboards/handwired/promethium/keymaps') diff --git a/keyboards/handwired/promethium/keymaps/priyadi/Makefile b/keyboards/handwired/promethium/keymaps/priyadi/Makefile index e3428254f6..bd1a06734c 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/Makefile +++ b/keyboards/handwired/promethium/keymaps/priyadi/Makefile @@ -20,6 +20,7 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes FAUXCLICKY_ENABLE = yes +BLUETOOTH = AdafruitBLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/promethium/keymaps/priyadi/README.md b/keyboards/handwired/promethium/keymaps/priyadi/README.md index ddeaed939e..48824b9f73 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/README.md +++ b/keyboards/handwired/promethium/keymaps/priyadi/README.md @@ -37,8 +37,8 @@ On Promethium, USB or Bluetooth output is detected on startup. If USB is connect SYS-W, SYS-L, SYS-M switch Unicode input method. SYS-Q, SYS-D, SYS-C, SYS-K, SYS-N switch to QWERTY, DVORAK, Colemak, Workman and Norman, respectively. -On Planck, SYS-A (mnemonic: audio) toggles faux clicky: use buzzer to emit clicks on key presses and releases. +SYS-A (mnemonic: audio) toggles faux clicky: use buzzer to emit clicks on key presses and releases. -On Promethium there are 6 indicator LEDs, and under switch LEDs on each switches, including Trackpoint buttons. Totaling 57 LEDs. Output is limited to 0xF for each LEDs to conserve power. SYS-G (mnemonic: glow) toggles various backlighting modes. +On Promethium there are 16 indicator LEDs, and under switch LEDs on each switches, including Trackpoint buttons. Totaling 67 LEDs. Output is limited to 0xF for each LEDs to conserve power. SYS-G (mnemonic: glow) toggles various backlighting modes. On Promethium, there's a LED to indicate battery level. Hue indicates level: green is full, red is empty. \ No newline at end of file diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 61af0a8893..55e028f184 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -38,6 +38,19 @@ along with this program. If not, see . #endif #ifdef FAUXCLICKY_ENABLE #include "fauxclicky.h" +#ifdef RGBSPS_ENABLE +#undef FAUXCLICKY_OFF +#define FAUXCLICKY_OFF do { \ + fauxclicky_enabled = false; \ + rgbsps_set(LED_AUDIO, 0, 0, 0); \ + fauxclicky_stop(); \ +} while (0) +#undef FAUXCLICKY_ON +#define FAUXCLICKY_ON do { \ + fauxclicky_enabled = true; \ + rgbsps_set(LED_AUDIO, 8, 0, 8); \ +} while (0) +#endif #endif #include "outputselect.h" #include "led.h" @@ -128,8 +141,8 @@ enum planck_keycodes { #ifndef FAUXCLICKY_ENABLE FC_TOG, #endif -#ifndef ADAFRUIT_BLE_ENABLE - OUT_BLE, +#ifndef MODULE_ADAFRUIT_BLE + OUT_BT, #endif KEYCODE_END }; @@ -428,12 +441,23 @@ const uint8_t PROGMEM LED_FN[] = { }; const uint8_t PROGMEM LED_INDICATORS[] = { - LED_IND_EMOJI, - LED_IND_NUM, - LED_IND_FUN, - LED_IND_BATTERY, - LED_IND_USB, + LED_IND_LINUX, + LED_IND_APPLE, + LED_IND_WINDOWS, + LED_IND_QWERTY, + LED_IND_ALT, + LED_IND_AUDIO, LED_IND_BLUETOOTH, + LED_IND_USB, + + LED_IND_BATTERY, + LED_IND_CAPSLOCK, + LED_IND_GUI, + LED_IND_FUN, + LED_IND_NUM, + LED_IND_PUNC, + LED_IND_EMOJI, + LED_IND_GREEK, }; const uint8_t PROGMEM LED_TRACKPOINT[] = { @@ -486,15 +510,31 @@ void led_reset(void) { } } +void led_set_default_layer_indicator(void) { + uint8_t default_layer = biton32(default_layer_state); + if (default_layer == _QWERTY) { + rgbsps_set(LED_IND_QWERTY, 15, 10, 0); + rgbsps_set(LED_IND_ALT, 0, 0, 0); + } else { + rgbsps_set(LED_IND_QWERTY, 0, 0, 0); + rgbsps_set(LED_IND_ALT, 15, 10, 0); + } + rgbsps_send(); + return; +} + void led_set_layer_indicator(void) { static uint8_t oldlayer = 255; + led_reset(); + + rgbsps_set(LED_IND_GUI, 0, 0, 0); rgbsps_set(LED_IND_FUN, 0, 0, 0); - // rgbsps_set(LED_IND_NUM, 0, 0, 0); + rgbsps_set(LED_IND_NUM, 0, 0, 0); + rgbsps_set(LED_IND_PUNC, 0, 0, 0); + rgbsps_set(LED_IND_GREEK, 0, 0, 0); rgbsps_set(LED_IND_EMOJI, 0, 0, 0); - led_reset(); - uint8_t layer = biton32(layer_state); if (oldlayer == layer) { return; @@ -508,24 +548,57 @@ void led_set_layer_indicator(void) { } switch(layer) { + case _GUI: + rgbsps_set(LED_IND_GUI, 15, 0, 15); + break; case _FUN: rgbsps_set(LED_IND_FUN, 15, 0, 0); break; - // case _NUM: - // rgbsps_set(LED_IND_NUM, 0, 0, 15); - // break; + case _NUM: + rgbsps_set(LED_IND_NUM, 0, 0, 15); + break; + case _PUNC: + rgbsps_set(LED_IND_PUNC, 0, 15, 0); + break; + case _GREEKL: + case _GREEKU: + rgbsps_set(LED_IND_GREEK, 0, 15, 15); + break; case _EMOJI: rgbsps_set(LED_IND_EMOJI, 15, 15, 0); break; default: + rgbsps_set(LED_IND_GUI, 3, 3, 3); rgbsps_set(LED_IND_FUN, 3, 3, 3); - // rgbsps_set(LED_IND_NUM, 3, 3, 3); + rgbsps_set(LED_IND_NUM, 3, 3, 3); + rgbsps_set(LED_IND_PUNC, 3, 3, 3); + rgbsps_set(LED_IND_GREEK, 3, 3, 3); rgbsps_set(LED_IND_EMOJI, 3, 3, 3); } rgbsps_send(); } +void led_set_unicode_input_mode(void) { + rgbsps_set(LED_IND_LINUX, 0, 0, 0); + rgbsps_set(LED_IND_APPLE, 0, 0, 0); + rgbsps_set(LED_IND_WINDOWS, 0, 0, 0); + + switch (get_unicode_input_mode()) { + case UC_LNX: + rgbsps_set(LED_IND_LINUX, 15, 15, 15); + break; + case UC_OSX: + rgbsps_set(LED_IND_APPLE, 15, 15, 15); + break; + case UC_WIN: + case UC_WINC: + rgbsps_set(LED_IND_WINDOWS, 15, 15, 15); + break; + } + rgbsps_send(); +} + void led_set_output_ble(void) { rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15); rgbsps_set(LED_IND_USB, 0, 0, 0); @@ -552,7 +625,16 @@ void led_init(void) { rgbsps_set(LED_TRACKPOINT1, 15, 0, 0); rgbsps_set(LED_TRACKPOINT2, 0, 0, 15); rgbsps_set(LED_TRACKPOINT3, 15, 0, 0); + + // unicode input mode + led_set_unicode_input_mode(); + + // layer indicator + led_set_layer_indicator(); + led_set_default_layer_indicator(); } + + #endif // RGBSPS_ENABLE // keymaps @@ -831,7 +913,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SYS] = KEYMAP( DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BLE, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BT, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______ ), @@ -842,6 +924,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void persistant_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); + led_set_default_layer_indicator(); } #ifdef DOUBLESPACE_LAYER_ENABLE @@ -1086,14 +1169,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // OS switchers case LINUX: set_unicode_input_mode(UC_LNX); +#ifdef RGBSPS_ENABLE + led_set_unicode_input_mode(); +#endif return false; break; case WIN: set_unicode_input_mode(UC_WINC); +#ifdef RGBSPS_ENABLE + led_set_unicode_input_mode(); +#endif return false; break; case OSX: set_unicode_input_mode(UC_OSX); +#ifdef RGBSPS_ENABLE + led_set_unicode_input_mode(); +#endif return false; break; @@ -1115,6 +1207,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // faux clicky indicator #ifdef FAUXCLICKY_ENABLE case FC_TOG: +#ifdef RGBSPS_ENABLE + if (fauxclicky_enabled) { + rgbsps_set(LED_IND_AUDIO, 0, 0, 0); + } else { + rgbsps_set(LED_IND_AUDIO, 5, 11, 13); + } + rgbsps_send(); +#endif return true; break; #endif @@ -1123,12 +1223,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void set_output_user(uint8_t output) { -#ifdef ADAFRUIT_BLE_ENABLE +#ifdef MODULE_ADAFRUIT_BLE switch(output) { case OUTPUT_USB: led_set_output_usb(); break; - case OUTPUT_ADAFRUIT_BLE: + case OUTPUT_BLUETOOTH: led_set_output_ble(); break; default: @@ -1147,12 +1247,12 @@ void matrix_init_user() { #endif // auto detect output on init -#ifdef ADAFRUIT_BLE_ENABLE +#ifdef MODULE_ADAFRUIT_BLE uint8_t output = auto_detect_output(); if (output == OUTPUT_USB) { set_output(OUTPUT_USB); } else { - set_output(OUTPUT_ADAFRUIT_BLE); + set_output(OUTPUT_BLUETOOTH); } #endif } @@ -1178,9 +1278,9 @@ void turn_off_capslock() { bool new_capslock = usb_led & (1< Date: Wed, 19 Apr 2017 02:55:19 +0700 Subject: Fix Planck compatibility --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'keyboards/handwired/promethium/keymaps') diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 55e028f184..efa5d9756e 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -924,7 +924,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void persistant_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); +#ifdef RGBSPS_ENABLE led_set_default_layer_indicator(); +#endif } #ifdef DOUBLESPACE_LAYER_ENABLE -- cgit v1.2.3 From ce0efa6b9a92387af395fded796e8ccb8927b52d Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Wed, 19 Apr 2017 12:03:48 +0700 Subject: Fix LED sequence; bug fixes --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'keyboards/handwired/promethium/keymaps') diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index efa5d9756e..7a18b02fd4 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -434,10 +434,10 @@ const uint8_t PROGMEM LED_MODS[] = { }; const uint8_t PROGMEM LED_FN[] = { - LED_PUNC, + LED_EMPTY, LED_NUM, LED_FUN, - LED_EMOJI + LED_GREEK }; const uint8_t PROGMEM LED_INDICATORS[] = { @@ -632,6 +632,14 @@ void led_init(void) { // layer indicator led_set_layer_indicator(); led_set_default_layer_indicator(); + + // clicky + if (fauxclicky_enabled) { + rgbsps_set(LED_IND_AUDIO, 5, 11, 13); + } else { + rgbsps_set(LED_IND_AUDIO, 0, 0, 0); + } + rgbsps_send(); } @@ -1211,9 +1219,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case FC_TOG: #ifdef RGBSPS_ENABLE if (fauxclicky_enabled) { - rgbsps_set(LED_IND_AUDIO, 0, 0, 0); - } else { rgbsps_set(LED_IND_AUDIO, 5, 11, 13); + } else { + rgbsps_set(LED_IND_AUDIO, 0, 0, 0); } rgbsps_send(); #endif -- cgit v1.2.3 From d8f1949029297b0bec395606bbaedf4f6d4c0760 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 29 Apr 2017 13:21:27 +0700 Subject: Promethium update: demo LED, fix PS2 delay, fix LED ordering, change click frequency --- .../handwired/promethium/keymaps/priyadi/config.h | 1 + .../handwired/promethium/keymaps/priyadi/keymap.c | 34 +++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) (limited to 'keyboards/handwired/promethium/keymaps') diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 3f5dd5817d..fa86e22479 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/config.h +++ b/keyboards/handwired/promethium/keymaps/priyadi/config.h @@ -14,6 +14,7 @@ #define PREVENT_STUCK_MODIFIERS #define RGBSPS_ENABLE +#define RGBSPS_DEMO_ENABLE #define UNICODE_TYPE_DELAY 0 diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 7a18b02fd4..4cc3d6d60a 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -144,6 +144,7 @@ enum planck_keycodes { #ifndef MODULE_ADAFRUIT_BLE OUT_BT, #endif + RGBDEMO, KEYCODE_END }; @@ -478,6 +479,27 @@ void led_turnoff_keys(void) { } } +#ifdef RGBSPS_DEMO_ENABLE +void led_demo(void) { + rgbsps_set(LED_IND_LINUX, 15, 15, 15); + rgbsps_set(LED_IND_APPLE, 15, 15, 15); + rgbsps_set(LED_IND_WINDOWS, 15, 15, 15); + rgbsps_set(LED_IND_QWERTY, 15, 10, 0); + rgbsps_set(LED_IND_ALT, 15, 10, 0); + rgbsps_set(LED_IND_AUDIO, 5, 11, 13); + rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15); + rgbsps_set(LED_IND_USB, 15, 15, 15); + rgbsps_set(LED_IND_CAPSLOCK, 15, 0, 0); + rgbsps_set(LED_IND_GUI, 15, 0, 15); + rgbsps_set(LED_IND_FUN, 15, 0, 0); + rgbsps_set(LED_IND_NUM, 0, 0, 15); + rgbsps_set(LED_IND_PUNC, 0, 15, 0); + rgbsps_set(LED_IND_GREEK, 0, 15, 15); + rgbsps_set(LED_IND_EMOJI, 15, 15, 0); + rgbsps_send(); +} +#endif + void led_reset(void) { switch (glow_mode) { case GLOW_NONE: @@ -634,11 +656,14 @@ void led_init(void) { led_set_default_layer_indicator(); // clicky +#ifdef FAUXCLICKY_ENABLE if (fauxclicky_enabled) { rgbsps_set(LED_IND_AUDIO, 5, 11, 13); } else { rgbsps_set(LED_IND_AUDIO, 0, 0, 0); } +#endif + rgbsps_send(); } @@ -919,7 +944,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_SYS] = KEYMAP( - DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, RGBDEMO, XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BT, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, @@ -1228,6 +1253,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; break; #endif + +#ifdef RGBSPS_DEMO_ENABLE + case RGBDEMO: + led_demo(); + return false; + break; +#endif } return true; } -- cgit v1.2.3 From 343f8d368e7ce51a3b34705147b890445a12e3ea Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 30 Apr 2017 18:04:58 +0700 Subject: Simple RGB backlight theming --- .../handwired/promethium/keymaps/priyadi/keymap.c | 145 +++++++++++---------- .../promethium/keymaps/priyadi/rgbtheme.h | 1 + .../promethium/keymaps/priyadi/rgbtheme_carbon.h | 36 +++++ .../promethium/keymaps/priyadi/rgbtheme_default.h | 36 +++++ 4 files changed, 146 insertions(+), 72 deletions(-) create mode 100644 keyboards/handwired/promethium/keymaps/priyadi/rgbtheme.h create mode 100644 keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_carbon.h create mode 100644 keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_default.h (limited to 'keyboards/handwired/promethium/keymaps') diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 4cc3d6d60a..d562c7bbf8 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -31,6 +31,7 @@ along with this program. If not, see . #include "quantum.h" #ifdef RGBSPS_ENABLE #include "rgbsps.h" +#include "rgbtheme.h" #endif #ifdef PS2_MOUSE_ENABLE #include "ps2_mouse.h" @@ -42,13 +43,13 @@ along with this program. If not, see . #undef FAUXCLICKY_OFF #define FAUXCLICKY_OFF do { \ fauxclicky_enabled = false; \ - rgbsps_set(LED_AUDIO, 0, 0, 0); \ + rgbsps_set(LED_AUDIO, COLOR_BLANK); \ fauxclicky_stop(); \ } while (0) #undef FAUXCLICKY_ON #define FAUXCLICKY_ON do { \ fauxclicky_enabled = true; \ - rgbsps_set(LED_AUDIO, 8, 0, 8); \ + rgbsps_set(LED_AUDIO, THEME_COLOR_AUDIO); \ } while (0) #endif #endif @@ -469,33 +470,33 @@ const uint8_t PROGMEM LED_TRACKPOINT[] = { void led_turnoff_keys(void) { for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { - rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 0, 0, 0); + rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), COLOR_BLACK); } for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { - rgbsps_set(pgm_read_byte(&LED_MODS[i]), 0, 0, 0); + rgbsps_set(pgm_read_byte(&LED_MODS[i]), COLOR_BLACK); } for(uint8_t i = 0; i < COUNT(LED_FN); i++) { - rgbsps_set(pgm_read_byte(&LED_FN[i]), 0, 0, 0); + rgbsps_set(pgm_read_byte(&LED_FN[i]), COLOR_BLACK); } } #ifdef RGBSPS_DEMO_ENABLE void led_demo(void) { - rgbsps_set(LED_IND_LINUX, 15, 15, 15); - rgbsps_set(LED_IND_APPLE, 15, 15, 15); - rgbsps_set(LED_IND_WINDOWS, 15, 15, 15); - rgbsps_set(LED_IND_QWERTY, 15, 10, 0); - rgbsps_set(LED_IND_ALT, 15, 10, 0); - rgbsps_set(LED_IND_AUDIO, 5, 11, 13); - rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15); - rgbsps_set(LED_IND_USB, 15, 15, 15); - rgbsps_set(LED_IND_CAPSLOCK, 15, 0, 0); - rgbsps_set(LED_IND_GUI, 15, 0, 15); - rgbsps_set(LED_IND_FUN, 15, 0, 0); - rgbsps_set(LED_IND_NUM, 0, 0, 15); - rgbsps_set(LED_IND_PUNC, 0, 15, 0); - rgbsps_set(LED_IND_GREEK, 0, 15, 15); - rgbsps_set(LED_IND_EMOJI, 15, 15, 0); + rgbsps_set(LED_IND_LINUX, THEME_COLOR_LINUX); + rgbsps_set(LED_IND_APPLE, THEME_COLOR_APPLE); + rgbsps_set(LED_IND_WINDOWS, THEME_COLOR_WINDOWS); + rgbsps_set(LED_IND_QWERTY, THEME_COLOR_QWERTY); + rgbsps_set(LED_IND_ALT, THEME_COLOR_ALT); + rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO); + rgbsps_set(LED_IND_BLUETOOTH, THEME_COLOR_BLUETOOTH); + rgbsps_set(LED_IND_USB, THEME_COLOR_USB); + rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK); + rgbsps_set(LED_IND_GUI, THEME_COLOR_GUI); + rgbsps_set(LED_IND_FUN, THEME_COLOR_FUN); + rgbsps_set(LED_IND_NUM, THEME_COLOR_NUM); + rgbsps_set(LED_IND_PUNC, THEME_COLOR_PUNC); + rgbsps_set(LED_IND_GREEK, THEME_COLOR_GREEK); + rgbsps_set(LED_IND_EMOJI, THEME_COLOR_EMOJI); rgbsps_send(); } #endif @@ -508,26 +509,26 @@ void led_reset(void) { case GLOW_MIN: led_turnoff_keys(); for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) { - rgbsps_set(pgm_read_byte(&LED_HOMING[i]), 8, 8, 8); + rgbsps_set(pgm_read_byte(&LED_HOMING[i]), THEME_COLOR_GLOW1_HOME); } - rgbsps_set(LED_F, 15, 0, 0); - rgbsps_set(LED_J, 15, 0, 0); + rgbsps_set(LED_F, THEME_COLOR_GLOW1_HOMING); + rgbsps_set(LED_J, THEME_COLOR_GLOW1_HOMING); break; case GLOW_FULL: for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { - rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 8, 8, 8); + rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), THEME_COLOR_GLOW2_ALPHA); } for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { - rgbsps_set(pgm_read_byte(&LED_MODS[i]), 0, 15, 0); + rgbsps_set(pgm_read_byte(&LED_MODS[i]), THEME_COLOR_GLOW2_MODS); } for(uint8_t i = 0; i < COUNT(LED_FN); i++) { - rgbsps_set(pgm_read_byte(&LED_FN[i]), 0, 0, 15); + rgbsps_set(pgm_read_byte(&LED_FN[i]), THEME_COLOR_GLOW2_FN); } for(uint8_t i = 0; i < COUNT(LED_HOMING); i++) { - rgbsps_set(pgm_read_byte(&LED_HOMING[i]), 15, 0, 0); + rgbsps_set(pgm_read_byte(&LED_HOMING[i]), THEME_COLOR_GLOW2_HOME); } - rgbsps_set(LED_F, 15, 15, 0); - rgbsps_set(LED_J, 15, 15, 0); + rgbsps_set(LED_F, THEME_COLOR_GLOW2_HOMING); + rgbsps_set(LED_J, THEME_COLOR_GLOW2_HOMING); break; } } @@ -535,11 +536,11 @@ void led_reset(void) { void led_set_default_layer_indicator(void) { uint8_t default_layer = biton32(default_layer_state); if (default_layer == _QWERTY) { - rgbsps_set(LED_IND_QWERTY, 15, 10, 0); - rgbsps_set(LED_IND_ALT, 0, 0, 0); + rgbsps_set(LED_IND_QWERTY, THEME_COLOR_QWERTY); + rgbsps_set(LED_IND_ALT, COLOR_BLANK); } else { - rgbsps_set(LED_IND_QWERTY, 0, 0, 0); - rgbsps_set(LED_IND_ALT, 15, 10, 0); + rgbsps_set(LED_IND_QWERTY, COLOR_BLANK); + rgbsps_set(LED_IND_ALT, THEME_COLOR_ALT); } rgbsps_send(); return; @@ -550,12 +551,12 @@ void led_set_layer_indicator(void) { led_reset(); - rgbsps_set(LED_IND_GUI, 0, 0, 0); - rgbsps_set(LED_IND_FUN, 0, 0, 0); - rgbsps_set(LED_IND_NUM, 0, 0, 0); - rgbsps_set(LED_IND_PUNC, 0, 0, 0); - rgbsps_set(LED_IND_GREEK, 0, 0, 0); - rgbsps_set(LED_IND_EMOJI, 0, 0, 0); + rgbsps_set(LED_IND_GUI, COLOR_BLANK); + rgbsps_set(LED_IND_FUN, COLOR_BLANK); + rgbsps_set(LED_IND_NUM, COLOR_BLANK); + rgbsps_set(LED_IND_PUNC, COLOR_BLANK); + rgbsps_set(LED_IND_GREEK, COLOR_BLANK); + rgbsps_set(LED_IND_EMOJI, COLOR_BLANK); uint8_t layer = biton32(layer_state); if (oldlayer == layer) { @@ -571,71 +572,71 @@ void led_set_layer_indicator(void) { switch(layer) { case _GUI: - rgbsps_set(LED_IND_GUI, 15, 0, 15); + rgbsps_set(LED_IND_GUI, THEME_COLOR_GUI); break; case _FUN: - rgbsps_set(LED_IND_FUN, 15, 0, 0); + rgbsps_set(LED_IND_FUN, THEME_COLOR_FUN); break; case _NUM: - rgbsps_set(LED_IND_NUM, 0, 0, 15); + rgbsps_set(LED_IND_NUM, THEME_COLOR_NUM); break; case _PUNC: - rgbsps_set(LED_IND_PUNC, 0, 15, 0); + rgbsps_set(LED_IND_PUNC, THEME_COLOR_PUNC); break; case _GREEKL: case _GREEKU: - rgbsps_set(LED_IND_GREEK, 0, 15, 15); + rgbsps_set(LED_IND_GREEK, THEME_COLOR_GREEK); break; case _EMOJI: - rgbsps_set(LED_IND_EMOJI, 15, 15, 0); + rgbsps_set(LED_IND_EMOJI, THEME_COLOR_EMOJI); break; default: - rgbsps_set(LED_IND_GUI, 3, 3, 3); - rgbsps_set(LED_IND_FUN, 3, 3, 3); - rgbsps_set(LED_IND_NUM, 3, 3, 3); - rgbsps_set(LED_IND_PUNC, 3, 3, 3); - rgbsps_set(LED_IND_GREEK, 3, 3, 3); - rgbsps_set(LED_IND_EMOJI, 3, 3, 3); + rgbsps_set(LED_IND_GUI, THEME_COLOR_OTHERLAYER); + rgbsps_set(LED_IND_FUN, THEME_COLOR_OTHERLAYER); + rgbsps_set(LED_IND_NUM, THEME_COLOR_OTHERLAYER); + rgbsps_set(LED_IND_PUNC, THEME_COLOR_OTHERLAYER); + rgbsps_set(LED_IND_GREEK, THEME_COLOR_OTHERLAYER); + rgbsps_set(LED_IND_EMOJI, THEME_COLOR_OTHERLAYER); } rgbsps_send(); } void led_set_unicode_input_mode(void) { - rgbsps_set(LED_IND_LINUX, 0, 0, 0); - rgbsps_set(LED_IND_APPLE, 0, 0, 0); - rgbsps_set(LED_IND_WINDOWS, 0, 0, 0); + rgbsps_set(LED_IND_LINUX, COLOR_BLANK); + rgbsps_set(LED_IND_APPLE, COLOR_BLANK); + rgbsps_set(LED_IND_WINDOWS, COLOR_BLANK); switch (get_unicode_input_mode()) { case UC_LNX: - rgbsps_set(LED_IND_LINUX, 15, 15, 15); + rgbsps_set(LED_IND_LINUX, THEME_COLOR_LINUX); break; case UC_OSX: - rgbsps_set(LED_IND_APPLE, 15, 15, 15); + rgbsps_set(LED_IND_APPLE, THEME_COLOR_APPLE); break; case UC_WIN: case UC_WINC: - rgbsps_set(LED_IND_WINDOWS, 15, 15, 15); + rgbsps_set(LED_IND_WINDOWS, THEME_COLOR_WINDOWS); break; } rgbsps_send(); } void led_set_output_ble(void) { - rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 15); - rgbsps_set(LED_IND_USB, 0, 0, 0); + rgbsps_set(LED_IND_BLUETOOTH, THEME_COLOR_BLUETOOTH); + rgbsps_set(LED_IND_USB, COLOR_BLANK); rgbsps_send(); } void led_set_output_usb(void) { - rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 0); - rgbsps_set(LED_IND_USB, 15, 15, 15); + rgbsps_set(LED_IND_BLUETOOTH, COLOR_BLANK); + rgbsps_set(LED_IND_USB, THEME_COLOR_USB); rgbsps_send(); } void led_set_output_none(void) { - rgbsps_set(LED_IND_BLUETOOTH, 0, 0, 0); - rgbsps_set(LED_IND_USB, 0, 0, 0); + rgbsps_set(LED_IND_BLUETOOTH, COLOR_BLANK); + rgbsps_set(LED_IND_USB, COLOR_BLANK); rgbsps_send(); } @@ -644,9 +645,9 @@ void led_init(void) { rgbsps_turnoff(); // set trackpoint color - rgbsps_set(LED_TRACKPOINT1, 15, 0, 0); - rgbsps_set(LED_TRACKPOINT2, 0, 0, 15); - rgbsps_set(LED_TRACKPOINT3, 15, 0, 0); + rgbsps_set(LED_TRACKPOINT1, THEME_COLOR_TP1); + rgbsps_set(LED_TRACKPOINT2, THEME_COLOR_TP2); + rgbsps_set(LED_TRACKPOINT3, THEME_COLOR_TP3); // unicode input mode led_set_unicode_input_mode(); @@ -658,9 +659,9 @@ void led_init(void) { // clicky #ifdef FAUXCLICKY_ENABLE if (fauxclicky_enabled) { - rgbsps_set(LED_IND_AUDIO, 5, 11, 13); + rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO); } else { - rgbsps_set(LED_IND_AUDIO, 0, 0, 0); + rgbsps_set(LED_IND_AUDIO, COLOR_BLANK); } #endif @@ -1244,9 +1245,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case FC_TOG: #ifdef RGBSPS_ENABLE if (fauxclicky_enabled) { - rgbsps_set(LED_IND_AUDIO, 5, 11, 13); + rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO); } else { - rgbsps_set(LED_IND_AUDIO, 0, 0, 0); + rgbsps_set(LED_IND_AUDIO, COLOR_BLANK); } rgbsps_send(); #endif @@ -1320,9 +1321,9 @@ void turn_off_capslock() { bool new_capslock = usb_led & (1< Date: Thu, 11 May 2017 15:32:35 -0400 Subject: Fix spelling of "persistent" Fixes #1201. --- keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'keyboards/handwired/promethium/keymaps') diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index d562c7bbf8..763fa5a27a 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -955,7 +955,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void persistant_default_layer_set(uint16_t default_layer) { +void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); #ifdef RGBSPS_ENABLE @@ -1134,14 +1134,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // layout switchers case QWERTY: if (record->event.pressed) { - persistant_default_layer_set(1UL<<_QWERTY); + persistent_default_layer_set(1UL<<_QWERTY); } return false; break; #ifdef LAYOUT_DVORAK case DVORAK: if (record->event.pressed) { - persistant_default_layer_set(1UL<<_DVORAK); + persistent_default_layer_set(1UL<<_DVORAK); } return false; break; @@ -1149,7 +1149,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef LAYOUT_COLEMAK case COLEMAK: if (record->event.pressed) { - persistant_default_layer_set(1UL<<_COLEMAK); + persistent_default_layer_set(1UL<<_COLEMAK); } return false; break; @@ -1157,7 +1157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef LAYOUT_WORKMAN case WORKMAN: if (record->event.pressed) { - persistant_default_layer_set(1UL<<_WORKMAN); + persistent_default_layer_set(1UL<<_WORKMAN); } return false; break; @@ -1165,7 +1165,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef LAYOUT_NORMAN case NORMAN: if (record->event.pressed) { - persistant_default_layer_set(1UL<<_NORMAN); + persistent_default_layer_set(1UL<<_NORMAN); } return false; break; -- cgit v1.2.3