diff options
-rw-r--r-- | Dockerfile | 9 | ||||
-rw-r--r-- | keyboards/amj60/amj60.h | 15 | ||||
-rw-r--r-- | keyboards/amj60/keymaps/maximized/keymap.c | 61 | ||||
-rw-r--r-- | keyboards/handwired/promethium/color.h | 15 | ||||
-rw-r--r-- | keyboards/handwired/promethium/config.h | 44 | ||||
-rw-r--r-- | keyboards/handwired/promethium/keymaps/priyadi/config.h | 1 | ||||
-rw-r--r-- | keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 157 | ||||
-rw-r--r-- | keyboards/handwired/promethium/keymaps/priyadi/rgbtheme.h | 1 | ||||
-rw-r--r-- | keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_carbon.h | 36 | ||||
-rw-r--r-- | keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_default.h | 36 | ||||
-rw-r--r-- | keyboards/handwired/promethium/matrix.c | 4 | ||||
-rw-r--r-- | keyboards/handwired/promethium/promethium.c | 6 | ||||
-rw-r--r-- | keyboards/hhkb/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/s60-x/default/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/s60-x/rgb/rules.mk | 56 | ||||
-rw-r--r-- | keyboards/s60-x/s60-x.c | 1 | ||||
-rw-r--r-- | keyboards/s60-x/s60-x_precompiled.zip | bin | 276106 -> 0 bytes | |||
-rw-r--r-- | keyboards/s60_x/Makefile (renamed from keyboards/s60-x/Makefile) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/config.h (renamed from keyboards/s60-x/config.h) | 13 | ||||
-rw-r--r-- | keyboards/s60_x/default/Makefile (renamed from keyboards/s60-x/default/Makefile) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/default/config.h (renamed from keyboards/s60-x/default/config.h) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/default/default.c (renamed from keyboards/s60-x/default/default.c) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/default/default.h (renamed from keyboards/s60-x/default/default.h) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/default/rules.mk | 9 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/ansi_qwertz/Makefile (renamed from keyboards/s60-x/keymaps/ansi_qwertz/Makefile) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/ansi_qwertz/config.h (renamed from keyboards/s60-x/keymaps/ansi_qwertz/config.h) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.png (renamed from keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.png) | bin | 54748 -> 54748 bytes | |||
-rw-r--r-- | keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg (renamed from keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg (renamed from keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.png (renamed from keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International.png) | bin | 54041 -> 54041 bytes | |||
-rw-r--r-- | keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.svg (renamed from keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International.svg) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/ansi_qwertz/docs/base_layer.PNG (renamed from keyboards/s60-x/keymaps/ansi_qwertz/docs/base_layer.PNG) | bin | 29411 -> 29411 bytes | |||
-rw-r--r-- | keyboards/s60_x/keymaps/ansi_qwertz/docs/function_layer.PNG (renamed from keyboards/s60-x/keymaps/ansi_qwertz/docs/function_layer.PNG) | bin | 25567 -> 25567 bytes | |||
-rw-r--r-- | keyboards/s60_x/keymaps/ansi_qwertz/docs/gaming_layer.PNG (renamed from keyboards/s60-x/keymaps/ansi_qwertz/docs/gaming_layer.PNG) | bin | 17895 -> 17895 bytes | |||
-rw-r--r-- | keyboards/s60_x/keymaps/ansi_qwertz/keymap.c (renamed from keyboards/s60-x/keymaps/ansi_qwertz/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/ansi_qwertz/readme.md (renamed from keyboards/s60-x/keymaps/ansi_qwertz/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/custom/keymap.c (renamed from keyboards/s60-x/keymaps/custom/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/custom/readme.md (renamed from keyboards/s60-x/keymaps/custom/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/dbroqua/keymap.c (renamed from keyboards/s60-x/keymaps/dbroqua/keymap.c) | 27 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/default/keymap.c (renamed from keyboards/s60-x/keymaps/default/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/default/readme.md (renamed from keyboards/s60-x/keymaps/default/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/hasu/keymap.c (renamed from keyboards/s60-x/keymaps/hasu/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/hasu/readme.md (renamed from keyboards/s60-x/keymaps/hasu/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/hhkb/keymap.c (renamed from keyboards/s60-x/keymaps/hhkb/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/hhkb/readme.md (renamed from keyboards/s60-x/keymaps/hhkb/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/iso/keymap.c (renamed from keyboards/s60-x/keymaps/iso/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/iso/readme.md (renamed from keyboards/s60-x/keymaps/iso/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/jpec/keymap.c (renamed from keyboards/s60-x/keymaps/jpec/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/jpec/readme.md (renamed from keyboards/s60-x/keymaps/jpec/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/plain/keymap.c (renamed from keyboards/s60-x/keymaps/plain/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/plain/readme.md (renamed from keyboards/s60-x/keymaps/plain/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/poker/keymap.c (renamed from keyboards/s60-x/keymaps/poker/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/poker/readme.md (renamed from keyboards/s60-x/keymaps/poker/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/poker_bit/keymap.c (renamed from keyboards/s60-x/keymaps/poker_bit/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/poker_bit/readme.md (renamed from keyboards/s60-x/keymaps/poker_bit/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/poker_set/keymap.c (renamed from keyboards/s60-x/keymaps/poker_set/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/poker_set/readme.md (renamed from keyboards/s60-x/keymaps/poker_set/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/spacefn/keymap.c (renamed from keyboards/s60-x/keymaps/spacefn/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/s60_x/keymaps/spacefn/readme.md (renamed from keyboards/s60-x/keymaps/spacefn/readme.md) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/readme.md (renamed from keyboards/s60-x/readme.md) | 5 | ||||
-rw-r--r-- | keyboards/s60_x/rgb/Makefile (renamed from keyboards/s60-x/rgb/Makefile) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/rgb/config.h (renamed from keyboards/s60-x/rgb/config.h) | 11 | ||||
-rw-r--r-- | keyboards/s60_x/rgb/rgb.c (renamed from keyboards/s60-x/rgb/rgb.c) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/rgb/rgb.h (renamed from keyboards/s60-x/rgb/rgb.h) | 0 | ||||
-rw-r--r-- | keyboards/s60_x/rgb/rules.mk | 9 | ||||
-rw-r--r-- | keyboards/s60_x/rules.mk (renamed from keyboards/s60-x/rules.mk) | 4 | ||||
-rw-r--r-- | keyboards/s60_x/s60_x.c | 1 | ||||
-rw-r--r-- | keyboards/s60_x/s60_x.h (renamed from keyboards/s60-x/s60-x.h) | 0 | ||||
-rw-r--r-- | tmk_core/avr.mk | 42 | ||||
-rw-r--r-- | tmk_core/chibios.mk | 4 |
70 files changed, 390 insertions, 204 deletions
diff --git a/Dockerfile b/Dockerfile index 744ded857..88da06f02 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,7 @@ FROM debian:jessie MAINTAINER Erik Dasque <erik@frenchguys.com> -RUN apt-get update -RUN apt-get install --no-install-recommends -y build-essential \ +RUN apt-get update && apt-get install --no-install-recommends -y build-essential \ gcc \ unzip \ wget \ @@ -15,10 +14,8 @@ RUN apt-get install --no-install-recommends -y build-essential \ gcc-arm-none-eabi \ binutils-arm-none-eabi \ libnewlib-arm-none-eabi \ - git - -RUN apt-get clean -RUN rm -rf /var/lib/apt/lists/* + git \ + && rm -rf /var/lib/apt/lists/* ENV keyboard=ergodox ENV subproject=ez diff --git a/keyboards/amj60/amj60.h b/keyboards/amj60/amj60.h index a0cb47331..c508e479c 100644 --- a/keyboards/amj60/amj60.h +++ b/keyboards/amj60/amj60.h @@ -147,6 +147,21 @@ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ } +#define KEYMAP_MAX( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49,\ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3c, \ + k40, k41, k42, k45, k4a, k4b, k4c, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d} \ +} + void matrix_init_user(void); void matrix_scan_user(void); diff --git a/keyboards/amj60/keymaps/maximized/keymap.c b/keyboards/amj60/keymaps/maximized/keymap.c new file mode 100644 index 000000000..d2a4be59f --- /dev/null +++ b/keyboards/amj60/keymaps/maximized/keymap.c @@ -0,0 +1,61 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "amj60.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _DEF 0 +#define _SPC 1 + +// dual-role shortcuts +#define SPACEDUAL LT(_SPC, KC_SPACE) + + +// increase readability +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _DEF: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ | ~ | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| bspc| + * |-----------------------------------------------------------| + * |Caps | A| S| D| F| G| H| J| K| L| ;| '| Return | + * |-----------------------------------------------------------| + * |Sft | Fn0| Z| X| C| V| B| N| M| ,| .| /| Sft |Fn2| + * |-----------------------------------------------------------| + * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| + * `-----------------------------------------------------------' + */ + [_DEF] = KEYMAP_MAX( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, F(0), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, F(1), \ + KC_LCTL, KC_LALT, KC_LGUI, SPACEDUAL, KC_RGUI, KC_RALT, KC_RCTL, F(2)), + + /* Keymap 1: F-and-vim Layer, modified with Space (by holding space) + * ,-----------------------------------------------------------. + * |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | + * |-----------------------------------------------------------| + * | |Paus| Up| [ | ] | | | | ( | ) | | | | Del | + * |-----------------------------------------------------------| + * | |Lft|Dwn|Rgt| | |Left|Down|Right|Up| | | PLAY | + * |-----------------------------------------------------------| + * | | | | | < | > | |M0 | | | | | Vol+ | | + * |-----------------------------------------------------------| + * | | | | |Alt |Prev|Vol-|Next| + * `-----------------------------------------------------------' + */ + [_SPC] = KEYMAP_MAX( + KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ + _______, KC_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, \ + _______, _______, _______, _______, _______, _______, KC_SPACE, M(0), _______, _______, _______, _______, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), + +}; diff --git a/keyboards/handwired/promethium/color.h b/keyboards/handwired/promethium/color.h new file mode 100644 index 000000000..077242d5f --- /dev/null +++ b/keyboards/handwired/promethium/color.h @@ -0,0 +1,15 @@ +#define COLOR_BLANK 0, 0, 0 + +#define COLOR_BLACK 0, 0, 0 +#define COLOR_WHITE 15,15,15 +#define COLOR_GRAY 7, 7, 7 + +#define COLOR_RED 15, 0, 0 +#define COLOR_GREEN 0,15, 0 +#define COLOR_BLUE 0, 0,15 + +#define COLOR_YELLOW 15,15, 0 +#define COLOR_MAGENTA 15, 0,15 +#define COLOR_CYAN 0,15,15 + +#define COLOR_ORANGE 15, 5, 0
\ No newline at end of file diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index a13406b0d..efb9ebdd7 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -153,7 +153,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#define PS2_INIT_DELAY 3000 +#define PS2_MOUSE_INIT_DELAY 2000 #define BATTERY_PIN 9 #define BATTERY_POLL 30000 #define MAX_VOLTAGE 4.2 @@ -205,7 +205,7 @@ enum led_sequence { LED_RSFT, LED_RCTL, - LED_RGUI, + LED_RALT, LED_SLSH, LED_SCLN, LED_P, @@ -213,9 +213,9 @@ enum led_sequence { LED_O, LED_L, LED_DOT, - LED_RALT, + LED_RGUI, - LED_EMOJI, + LED_GREEK, LED_COMM, LED_K, LED_I, @@ -234,35 +234,35 @@ enum led_sequence { LED_TRACKPOINT2, LED_TRACKPOINT1, - LED_LSPC, - LED_B, - LED_G, LED_T, + LED_G, + LED_B, + LED_LSPC, - LED_R, - LED_F, - LED_V, LED_NUM, + LED_V, + LED_F, + LED_R, - LED_PUNC, - LED_C, - LED_D, LED_E, + LED_D, + LED_C, + LED_EMPTY, - LED_W, - LED_S, + LED_LGUI, LED_X, - LED_LALT, + LED_S, + LED_W, - LED_LGUI, - LED_Z, - LED_A, LED_Q, + LED_A, + LED_Z, + LED_LALT, - LED_TAB, - LED_ESC, - LED_LSFT, LED_LCTL, + LED_LSFT, + LED_ESC, + LED_TAB, LED_TOTAL }; diff --git a/keyboards/handwired/promethium/keymaps/priyadi/config.h b/keyboards/handwired/promethium/keymaps/priyadi/config.h index 3f5dd5817..fa86e2247 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 efa5d9756..d562c7bbf 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 <http://www.gnu.org/licenses/>. #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 <http://www.gnu.org/licenses/>. #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 @@ -144,6 +145,7 @@ enum planck_keycodes { #ifndef MODULE_ADAFRUIT_BLE OUT_BT, #endif + RGBDEMO, KEYCODE_END }; @@ -434,10 +436,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[] = { @@ -468,16 +470,37 @@ 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, 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 + void led_reset(void) { switch (glow_mode) { case GLOW_NONE: @@ -486,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; } } @@ -513,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; @@ -528,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) { @@ -549,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(); } @@ -622,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(); @@ -632,6 +655,17 @@ void led_init(void) { // layer indicator led_set_layer_indicator(); led_set_default_layer_indicator(); + + // clicky +#ifdef FAUXCLICKY_ENABLE + if (fauxclicky_enabled) { + rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO); + } else { + rgbsps_set(LED_IND_AUDIO, COLOR_BLANK); + } +#endif + + rgbsps_send(); } @@ -911,7 +945,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, _______, @@ -1211,15 +1245,22 @@ 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); + rgbsps_set(LED_IND_AUDIO, THEME_COLOR_AUDIO); } else { - rgbsps_set(LED_IND_AUDIO, 5, 11, 13); + rgbsps_set(LED_IND_AUDIO, COLOR_BLANK); } rgbsps_send(); #endif return true; break; #endif + +#ifdef RGBSPS_DEMO_ENABLE + case RGBDEMO: + led_demo(); + return false; + break; +#endif } return true; } @@ -1280,9 +1321,9 @@ void turn_off_capslock() { bool new_capslock = usb_led & (1<<USB_LED_CAPS_LOCK); if (new_capslock ^ capslock) { // capslock state is different if ((capslock = new_capslock)) { - rgbsps_set(LED_IND_CAPSLOCK, 15, 0, 0); + rgbsps_set(LED_IND_CAPSLOCK, THEME_COLOR_CAPSLOCK); } else { - rgbsps_set(LED_IND_CAPSLOCK, 0, 0, 0); + rgbsps_set(LED_IND_CAPSLOCK, COLOR_BLANK); } rgbsps_send(); } diff --git a/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme.h b/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme.h new file mode 100644 index 000000000..e60971035 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme.h @@ -0,0 +1 @@ +#include "rgbtheme_default.h" diff --git a/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_carbon.h b/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_carbon.h new file mode 100644 index 000000000..8e0a98b09 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_carbon.h @@ -0,0 +1,36 @@ +#include "color.h" + +#define THEME_COLOR_LINUX COLOR_WHITE +#define THEME_COLOR_APPLE COLOR_WHITE +#define THEME_COLOR_WINDOWS COLOR_WHITE + +#define THEME_COLOR_QWERTY COLOR_RED +#define THEME_COLOR_ALT COLOR_RED + +#define THEME_COLOR_AUDIO COLOR_GREEN + +#define THEME_COLOR_BLUETOOTH 7,7,15 +#define THEME_COLOR_USB COLOR_WHITE + +#define THEME_COLOR_CAPSLOCK COLOR_RED + +#define THEME_COLOR_GUI COLOR_MAGENTA +#define THEME_COLOR_FUN COLOR_RED +#define THEME_COLOR_NUM 7,7,15 +#define THEME_COLOR_PUNC COLOR_GREEN +#define THEME_COLOR_GREEK COLOR_CYAN +#define THEME_COLOR_EMOJI COLOR_YELLOW +#define THEME_COLOR_OTHERLAYER COLOR_GRAY + +#define THEME_COLOR_GLOW1_HOME COLOR_ORANGE +#define THEME_COLOR_GLOW1_HOMING COLOR_RED + +#define THEME_COLOR_GLOW2_ALPHA COLOR_ORANGE +#define THEME_COLOR_GLOW2_MODS COLOR_ORANGE +#define THEME_COLOR_GLOW2_FN COLOR_ORANGE +#define THEME_COLOR_GLOW2_HOME COLOR_ORANGE +#define THEME_COLOR_GLOW2_HOMING COLOR_RED + +#define THEME_COLOR_TP1 COLOR_ORANGE +#define THEME_COLOR_TP2 COLOR_RED +#define THEME_COLOR_TP3 COLOR_ORANGE
\ No newline at end of file diff --git a/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_default.h b/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_default.h new file mode 100644 index 000000000..4c3fb1369 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/priyadi/rgbtheme_default.h @@ -0,0 +1,36 @@ +#include "color.h" + +#define THEME_COLOR_LINUX COLOR_WHITE +#define THEME_COLOR_APPLE COLOR_WHITE +#define THEME_COLOR_WINDOWS COLOR_WHITE + +#define THEME_COLOR_QWERTY COLOR_RED +#define THEME_COLOR_ALT COLOR_RED + +#define THEME_COLOR_AUDIO COLOR_GREEN + +#define THEME_COLOR_BLUETOOTH COLOR_BLUE +#define THEME_COLOR_USB COLOR_WHITE + +#define THEME_COLOR_CAPSLOCK COLOR_RED + +#define THEME_COLOR_GUI COLOR_MAGENTA +#define THEME_COLOR_FUN COLOR_RED +#define THEME_COLOR_NUM COLOR_BLUE +#define THEME_COLOR_PUNC COLOR_GREEN +#define THEME_COLOR_GREEK COLOR_CYAN +#define THEME_COLOR_EMOJI COLOR_YELLOW +#define THEME_COLOR_OTHERLAYER COLOR_GRAY + +#define THEME_COLOR_GLOW1_HOME COLOR_GRAY +#define THEME_COLOR_GLOW1_HOMING COLOR_RED + +#define THEME_COLOR_GLOW2_ALPHA COLOR_GRAY +#define THEME_COLOR_GLOW2_MODS COLOR_GREEN +#define THEME_COLOR_GLOW2_FN COLOR_BLUE +#define THEME_COLOR_GLOW2_HOME COLOR_RED +#define THEME_COLOR_GLOW2_HOMING COLOR_YELLOW + +#define THEME_COLOR_TP1 COLOR_RED +#define THEME_COLOR_TP2 COLOR_BLUE +#define THEME_COLOR_TP3 COLOR_RED
\ No newline at end of file diff --git a/keyboards/handwired/promethium/matrix.c b/keyboards/handwired/promethium/matrix.c index 2b7ce2bf5..72dbe8d4d 100644 --- a/keyboards/handwired/promethium/matrix.c +++ b/keyboards/handwired/promethium/matrix.c @@ -133,8 +133,8 @@ void matrix_init(void) { matrix_init_quantum(); } -uint8_t matrix_scan(void -){ +uint8_t matrix_scan(void) +{ // Set row, read cols for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { # if (DEBOUNCING_DELAY > 0) diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c index 8b1a0c71f..3cc0f5a8c 100644 --- a/keyboards/handwired/promethium/promethium.c +++ b/keyboards/handwired/promethium/promethium.c @@ -4,9 +4,9 @@ #include "matrix.h" #include "musical_notes.h" -float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_F3, .03125); -float fauxclicky_released_note[2] = MUSICAL_NOTE(_C3, .03125); -float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C3, .03125); +float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A4, 0.0625); +float fauxclicky_released_note[2] = MUSICAL_NOTE(_A4, 0.0625); +float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C6, 0.25); // cubic fit {3.3, 0}, {3.5, 2.9}, {3.6, 5}, {3.7, 8.6}, {3.8, 36}, {3.9, 62}, {4.0, 73}, {4.05, 83}, {4.1, 89}, {4.15, 94}, {4.2, 100} diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/rules.mk index a46271f02..e4190039f 100644 --- a/keyboards/hhkb/rules.mk +++ b/keyboards/hhkb/rules.mk @@ -53,7 +53,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT #OPT_DEFS += -DBOOTLOADER_SIZE=4096 # as per original hasu settings -OPT_DEFS += -DBOOTLOADER_SIZE=512 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # comment out to disable the options. diff --git a/keyboards/s60-x/default/rules.mk b/keyboards/s60-x/default/rules.mk deleted file mode 100644 index b8ff76260..000000000 --- a/keyboards/s60-x/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -RGBLIGHT_ENABLE ?= no
\ No newline at end of file diff --git a/keyboards/s60-x/rgb/rules.mk b/keyboards/s60-x/rgb/rules.mk deleted file mode 100644 index c303af4bc..000000000 --- a/keyboards/s60-x/rgb/rules.mk +++ /dev/null @@ -1,56 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= no # Commands for debug and configuration -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= yes
\ No newline at end of file diff --git a/keyboards/s60-x/s60-x.c b/keyboards/s60-x/s60-x.c deleted file mode 100644 index f031dd770..000000000 --- a/keyboards/s60-x/s60-x.c +++ /dev/null @@ -1 +0,0 @@ -#include "s60-x.h"
\ No newline at end of file diff --git a/keyboards/s60-x/s60-x_precompiled.zip b/keyboards/s60-x/s60-x_precompiled.zip Binary files differdeleted file mode 100644 index 00d99ca8a..000000000 --- a/keyboards/s60-x/s60-x_precompiled.zip +++ /dev/null diff --git a/keyboards/s60-x/Makefile b/keyboards/s60_x/Makefile index 879e493a2..879e493a2 100644 --- a/keyboards/s60-x/Makefile +++ b/keyboards/s60_x/Makefile diff --git a/keyboards/s60-x/config.h b/keyboards/s60_x/config.h index 8e7bc78be..8b97b3c81 100644 --- a/keyboards/s60-x/config.h +++ b/keyboards/s60_x/config.h @@ -32,6 +32,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROWS 5 #define MATRIX_COLS 15 +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -43,4 +49,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) +#ifdef SUBPROJECT_default + #include "default/config.h" +#endif +#ifdef SUBPROJECT_rgb + #include "rgb/config.h" +#endif + #endif diff --git a/keyboards/s60-x/default/Makefile b/keyboards/s60_x/default/Makefile index 191c6bb66..191c6bb66 100644 --- a/keyboards/s60-x/default/Makefile +++ b/keyboards/s60_x/default/Makefile diff --git a/keyboards/s60-x/default/config.h b/keyboards/s60_x/default/config.h index 436c6fa8b..436c6fa8b 100644 --- a/keyboards/s60-x/default/config.h +++ b/keyboards/s60_x/default/config.h diff --git a/keyboards/s60-x/default/default.c b/keyboards/s60_x/default/default.c index 253f5495c..253f5495c 100644 --- a/keyboards/s60-x/default/default.c +++ b/keyboards/s60_x/default/default.c diff --git a/keyboards/s60-x/default/default.h b/keyboards/s60_x/default/default.h index 86233ef7e..86233ef7e 100644 --- a/keyboards/s60-x/default/default.h +++ b/keyboards/s60_x/default/default.h diff --git a/keyboards/s60_x/default/rules.mk b/keyboards/s60_x/default/rules.mk new file mode 100644 index 000000000..aaa3764df --- /dev/null +++ b/keyboards/s60_x/default/rules.mk @@ -0,0 +1,9 @@ +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no # Commands for debug and configuration +NKRO_ENABLE ?= no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE ?= no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif
\ No newline at end of file diff --git a/keyboards/s60-x/keymaps/ansi_qwertz/Makefile b/keyboards/s60_x/keymaps/ansi_qwertz/Makefile index 6a078bcc3..6a078bcc3 100644 --- a/keyboards/s60-x/keymaps/ansi_qwertz/Makefile +++ b/keyboards/s60_x/keymaps/ansi_qwertz/Makefile diff --git a/keyboards/s60-x/keymaps/ansi_qwertz/config.h b/keyboards/s60_x/keymaps/ansi_qwertz/config.h index 6c01d579f..6c01d579f 100644 --- a/keyboards/s60-x/keymaps/ansi_qwertz/config.h +++ b/keyboards/s60_x/keymaps/ansi_qwertz/config.h diff --git a/keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.png b/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.png Binary files differindex 168780c82..168780c82 100644 --- a/keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.png +++ b/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.png diff --git a/keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg b/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg index f03858993..f03858993 100644 --- a/keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg +++ b/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg diff --git a/keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg b/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg index 2304b2a4c..2304b2a4c 100644 --- a/keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg +++ b/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg diff --git a/keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International.png b/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.png Binary files differindex 875eb3652..875eb3652 100644 --- a/keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International.png +++ b/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.png diff --git a/keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International.svg b/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.svg index 1ca6a9c87..1ca6a9c87 100644 --- a/keyboards/s60-x/keymaps/ansi_qwertz/docs/KB_US-International.svg +++ b/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.svg diff --git a/keyboards/s60-x/keymaps/ansi_qwertz/docs/base_layer.PNG b/keyboards/s60_x/keymaps/ansi_qwertz/docs/base_layer.PNG Binary files differindex c730c2d65..c730c2d65 100644 --- a/keyboards/s60-x/keymaps/ansi_qwertz/docs/base_layer.PNG +++ b/keyboards/s60_x/keymaps/ansi_qwertz/docs/base_layer.PNG diff --git a/keyboards/s60-x/keymaps/ansi_qwertz/docs/function_layer.PNG b/keyboards/s60_x/keymaps/ansi_qwertz/docs/function_layer.PNG Binary files differindex fae2439ca..fae2439ca 100644 --- a/keyboards/s60-x/keymaps/ansi_qwertz/docs/function_layer.PNG +++ b/keyboards/s60_x/keymaps/ansi_qwertz/docs/function_layer.PNG diff --git a/keyboards/s60-x/keymaps/ansi_qwertz/docs/gaming_layer.PNG b/keyboards/s60_x/keymaps/ansi_qwertz/docs/gaming_layer.PNG Binary files differindex 59b202be2..59b202be2 100644 --- a/keyboards/s60-x/keymaps/ansi_qwertz/docs/gaming_layer.PNG +++ b/keyboards/s60_x/keymaps/ansi_qwertz/docs/gaming_layer.PNG diff --git a/keyboards/s60-x/keymaps/ansi_qwertz/keymap.c b/keyboards/s60_x/keymaps/ansi_qwertz/keymap.c index 317a245be..ebb3aece3 100644 --- a/keyboards/s60-x/keymaps/ansi_qwertz/keymap.c +++ b/keyboards/s60_x/keymaps/ansi_qwertz/keymap.c @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "s60-x.h" +#include "s60_x.h" //make keymap a little easier to read #define _______ KC_TRNS diff --git a/keyboards/s60-x/keymaps/ansi_qwertz/readme.md b/keyboards/s60_x/keymaps/ansi_qwertz/readme.md index b22010612..b22010612 100644 --- a/keyboards/s60-x/keymaps/ansi_qwertz/readme.md +++ b/keyboards/s60_x/keymaps/ansi_qwertz/readme.md diff --git a/keyboards/s60-x/keymaps/custom/keymap.c b/keyboards/s60_x/keymaps/custom/keymap.c index fb2a40b85..66eac3335 100644 --- a/keyboards/s60-x/keymaps/custom/keymap.c +++ b/keyboards/s60_x/keymaps/custom/keymap.c @@ -1,4 +1,4 @@ -#include "s60-x.h" +#include "s60_x.h" /* Main layer: Test layout, using all keys. diff --git a/keyboards/s60-x/keymaps/custom/readme.md b/keyboards/s60_x/keymaps/custom/readme.md index cf87bd915..cf87bd915 100644 --- a/keyboards/s60-x/keymaps/custom/readme.md +++ b/keyboards/s60_x/keymaps/custom/readme.md diff --git a/keyboards/s60-x/keymaps/dbroqua/keymap.c b/keyboards/s60_x/keymaps/dbroqua/keymap.c index 940119e52..8d1887e75 100644 --- a/keyboards/s60-x/keymaps/dbroqua/keymap.c +++ b/keyboards/s60_x/keymaps/dbroqua/keymap.c @@ -1,4 +1,4 @@ -#include "s60-x.h" +#include "s60_x.h" #define _DEFAULT 0 #define _FN 1 @@ -66,19 +66,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_SFX] = KEYMAP( ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, BL_TOGG,BL_STEP,BL_DEC, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, F(0), F(1), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, F(2), F(3), F(4), F(5), F(6), F(7), ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______ \ ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - keyevent_t event = record->event; - - switch (id) { - - } +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; } @@ -108,42 +103,58 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { switch (id) { case RGBLED_TOGGLE: if (record->event.pressed) { + #ifdef RGB_ENABLE rgblight_toggle(); + #endif } break; case RGBLED_INCREASE_HUE: if (record->event.pressed) { + #ifdef RGB_ENABLE rgblight_increase_hue(); + #endif } break; case RGBLED_DECREASE_HUE: if (record->event.pressed) { + #ifdef RGB_ENABLE rgblight_decrease_hue(); + #endif } break; case RGBLED_INCREASE_SAT: if (record->event.pressed) { + #ifdef RGB_ENABLE rgblight_increase_sat(); + #endif } break; case RGBLED_DECREASE_SAT: if (record->event.pressed) { + #ifdef RGB_ENABLE rgblight_decrease_sat(); + #endif } break; case RGBLED_INCREASE_VAL: if (record->event.pressed) { + #ifdef RGB_ENABLE rgblight_increase_val(); + #endif } break; case RGBLED_DECREASE_VAL: if (record->event.pressed) { + #ifdef RGB_ENABLE rgblight_decrease_val(); + #endif } break; case RGBLED_STEP_MODE: if (record->event.pressed) { + #ifdef RGB_ENABLE rgblight_step(); + #endif } break; } diff --git a/keyboards/s60-x/keymaps/default/keymap.c b/keyboards/s60_x/keymaps/default/keymap.c index eb0c6b056..a616e79b3 100644 --- a/keyboards/s60-x/keymaps/default/keymap.c +++ b/keyboards/s60_x/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "s60-x.h" +#include "s60_x.h" /* 0: Main layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ diff --git a/keyboards/s60-x/keymaps/default/readme.md b/keyboards/s60_x/keymaps/default/readme.md index 01cda9df9..01cda9df9 100644 --- a/keyboards/s60-x/keymaps/default/readme.md +++ b/keyboards/s60_x/keymaps/default/readme.md diff --git a/keyboards/s60-x/keymaps/hasu/keymap.c b/keyboards/s60_x/keymaps/hasu/keymap.c index cbeaae028..ac90dc6b2 100644 --- a/keyboards/s60-x/keymaps/hasu/keymap.c +++ b/keyboards/s60_x/keymaps/hasu/keymap.c @@ -1,4 +1,4 @@ -#include "s60-x.h" +#include "s60_x.h" /* * Hasu diff --git a/keyboards/s60-x/keymaps/hasu/readme.md b/keyboards/s60_x/keymaps/hasu/readme.md index 64969b616..64969b616 100644 --- a/keyboards/s60-x/keymaps/hasu/readme.md +++ b/keyboards/s60_x/keymaps/hasu/readme.md diff --git a/keyboards/s60-x/keymaps/hhkb/keymap.c b/keyboards/s60_x/keymaps/hhkb/keymap.c index 9afd1247f..dc1bfffc4 100644 --- a/keyboards/s60-x/keymaps/hhkb/keymap.c +++ b/keyboards/s60_x/keymaps/hhkb/keymap.c @@ -1,4 +1,4 @@ -#include "s60-x.h" +#include "s60_x.h" /* * HHKB Layout diff --git a/keyboards/s60-x/keymaps/hhkb/readme.md b/keyboards/s60_x/keymaps/hhkb/readme.md index 2bceb26dd..2bceb26dd 100644 --- a/keyboards/s60-x/keymaps/hhkb/readme.md +++ b/keyboards/s60_x/keymaps/hhkb/readme.md diff --git a/keyboards/s60-x/keymaps/iso/keymap.c b/keyboards/s60_x/keymaps/iso/keymap.c index 43a9c48b0..f6fc74172 100644 --- a/keyboards/s60-x/keymaps/iso/keymap.c +++ b/keyboards/s60_x/keymaps/iso/keymap.c @@ -1,4 +1,4 @@ -#include "s60-x.h" +#include "s60_x.h" /* 0: Main layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ diff --git a/keyboards/s60-x/keymaps/iso/readme.md b/keyboards/s60_x/keymaps/iso/readme.md index 2c06bf86f..2c06bf86f 100644 --- a/keyboards/s60-x/keymaps/iso/readme.md +++ b/keyboards/s60_x/keymaps/iso/readme.md diff --git a/keyboards/s60-x/keymaps/jpec/keymap.c b/keyboards/s60_x/keymaps/jpec/keymap.c index c8fc13328..21e77c10b 100644 --- a/keyboards/s60-x/keymaps/jpec/keymap.c +++ b/keyboards/s60_x/keymaps/jpec/keymap.c @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "s60-x.h" +#include "s60_x.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layout 0: Default Layer diff --git a/keyboards/s60-x/keymaps/jpec/readme.md b/keyboards/s60_x/keymaps/jpec/readme.md index 73318dad7..73318dad7 100644 --- a/keyboards/s60-x/keymaps/jpec/readme.md +++ b/keyboards/s60_x/keymaps/jpec/readme.md diff --git a/keyboards/s60-x/keymaps/plain/keymap.c b/keyboards/s60_x/keymaps/plain/keymap.c index 790ac88e7..d5075a07b 100644 --- a/keyboards/s60-x/keymaps/plain/keymap.c +++ b/keyboards/s60_x/keymaps/plain/keymap.c @@ -1,4 +1,4 @@ -#include "s60-x.h" +#include "s60_x.h" /* Main layer: ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ diff --git a/keyboards/s60-x/keymaps/plain/readme.md b/keyboards/s60_x/keymaps/plain/readme.md index ab13323e3..ab13323e3 100644 --- a/keyboards/s60-x/keymaps/plain/readme.md +++ b/keyboards/s60_x/keymaps/plain/readme.md diff --git a/keyboards/s60-x/keymaps/poker/keymap.c b/keyboards/s60_x/keymaps/poker/keymap.c index 0a8691792..5b917704e 100644 --- a/keyboards/s60-x/keymaps/poker/keymap.c +++ b/keyboards/s60_x/keymaps/poker/keymap.c @@ -1,4 +1,4 @@ -#include "s60-x.h" +#include "s60_x.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty diff --git a/keyboards/s60-x/keymaps/poker/readme.md b/keyboards/s60_x/keymaps/poker/readme.md index 0d8be9d0f..0d8be9d0f 100644 --- a/keyboards/s60-x/keymaps/poker/readme.md +++ b/keyboards/s60_x/keymaps/poker/readme.md diff --git a/keyboards/s60-x/keymaps/poker_bit/keymap.c b/keyboards/s60_x/keymaps/poker_bit/keymap.c index 7626038f4..1f7b1b633 100644 --- a/keyboards/s60-x/keymaps/poker_bit/keymap.c +++ b/keyboards/s60_x/keymaps/poker_bit/keymap.c @@ -1,4 +1,4 @@ -#include "s60-x.h" +#include "s60_x.h" // Poker fix with toggle and bit operation // Fn + Esc = ` diff --git a/keyboards/s60-x/keymaps/poker_bit/readme.md b/keyboards/s60_x/keymaps/poker_bit/readme.md index 0d8be9d0f..0d8be9d0f 100644 --- a/keyboards/s60-x/keymaps/poker_bit/readme.md +++ b/keyboards/s60_x/keymaps/poker_bit/readme.md diff --git a/keyboards/s60-x/keymaps/poker_set/keymap.c b/keyboards/s60_x/keymaps/poker_set/keymap.c index 09423e75b..52eee5321 100644 --- a/keyboards/s60-x/keymaps/poker_set/keymap.c +++ b/keyboards/s60_x/keymaps/poker_set/keymap.c @@ -1,4 +1,4 @@ -#include "s60-x.h" +#include "s60_x.h" // Poker fix with set(state transition) // Fn + Esc = ` diff --git a/keyboards/s60-x/keymaps/poker_set/readme.md b/keyboards/s60_x/keymaps/poker_set/readme.md index 0d8be9d0f..0d8be9d0f 100644 --- a/keyboards/s60-x/keymaps/poker_set/readme.md +++ b/keyboards/s60_x/keymaps/poker_set/readme.md diff --git a/keyboards/s60-x/keymaps/spacefn/keymap.c b/keyboards/s60_x/keymaps/spacefn/keymap.c index b6dc7ca7e..28369580e 100644 --- a/keyboards/s60-x/keymaps/spacefn/keymap.c +++ b/keyboards/s60_x/keymaps/spacefn/keymap.c @@ -1,4 +1,4 @@ -#include "s60-x.h" +#include "s60_x.h" /* * SpaceFN diff --git a/keyboards/s60-x/keymaps/spacefn/readme.md b/keyboards/s60_x/keymaps/spacefn/readme.md index d04bd9486..d04bd9486 100644 --- a/keyboards/s60-x/keymaps/spacefn/readme.md +++ b/keyboards/s60_x/keymaps/spacefn/readme.md diff --git a/keyboards/s60-x/readme.md b/keyboards/s60_x/readme.md index 408ad13ac..e30b2f76c 100644 --- a/keyboards/s60-x/readme.md +++ b/keyboards/s60_x/readme.md @@ -5,11 +5,6 @@ DIY compact keyboard designed by VinnyCordeiro for Sentraq. Most of the keymaps ## S60X Resources - [Massdrop page](https://www.massdrop.com/buy/sentraq-60-diy-keyboard-kit?mode=guest_open) -## Quickstart - -If you just want to test a few layouts, the archive [s60-x_precompiled.zip](s60-x_precompiled.zip) contains pre-compiled .hex-files for all available keymaps. Not all of them are tested. -You only need to flash them onto your keyboard, which is explained below, there's no need to setup a build environment. For a full list - ## Flashing your keyboard The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.atmel.com/tools/FLIP.aspx) (Windows) and [dfu-programmer](http://dfu-programmer.sourceforge.net/) (Linux/Windows). diff --git a/keyboards/s60-x/rgb/Makefile b/keyboards/s60_x/rgb/Makefile index bd09e5885..bd09e5885 100644 --- a/keyboards/s60-x/rgb/Makefile +++ b/keyboards/s60_x/rgb/Makefile diff --git a/keyboards/s60-x/rgb/config.h b/keyboards/s60_x/rgb/config.h index 26b246e57..81efc87d5 100644 --- a/keyboards/s60-x/rgb/config.h +++ b/keyboards/s60_x/rgb/config.h @@ -9,12 +9,13 @@ /* key matrix pins */ #define MATRIX_ROW_PINS { B5, B4, D7, D6, D4 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, B6, C6, C7, F1, F0, E6, B3, B2, B1, B0 } +#define UNUSED_PINS -/* number of backlight levels */ -#define BACKLIGHT_PIN B7 -#ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 3 -#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 /* prevent stuck modifiers */ #define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/s60-x/rgb/rgb.c b/keyboards/s60_x/rgb/rgb.c index 0117e14ae..0117e14ae 100644 --- a/keyboards/s60-x/rgb/rgb.c +++ b/keyboards/s60_x/rgb/rgb.c diff --git a/keyboards/s60-x/rgb/rgb.h b/keyboards/s60_x/rgb/rgb.h index cb7a5f567..cb7a5f567 100644 --- a/keyboards/s60-x/rgb/rgb.h +++ b/keyboards/s60_x/rgb/rgb.h diff --git a/keyboards/s60_x/rgb/rules.mk b/keyboards/s60_x/rgb/rules.mk new file mode 100644 index 000000000..6953cc6d6 --- /dev/null +++ b/keyboards/s60_x/rgb/rules.mk @@ -0,0 +1,9 @@ +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no # Commands for debug and configuration +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE ?= yes # Enable RGB light + +ifndef QUANTUM_DIR + include ../../../Makefile +endif
\ No newline at end of file diff --git a/keyboards/s60-x/rules.mk b/keyboards/s60_x/rules.mk index 7ec93933a..0c568efe9 100644 --- a/keyboards/s60-x/rules.mk +++ b/keyboards/s60_x/rules.mk @@ -56,13 +56,9 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # 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 on B7 by default MIDI_ENABLE ?= no # MIDI controls UNICODE_ENABLE ?= no # Unicode BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/s60_x/s60_x.c b/keyboards/s60_x/s60_x.c new file mode 100644 index 000000000..595418bfa --- /dev/null +++ b/keyboards/s60_x/s60_x.c @@ -0,0 +1 @@ +#include "s60_x.h"
\ No newline at end of file diff --git a/keyboards/s60-x/s60-x.h b/keyboards/s60_x/s60_x.h index 5bf8cfcef..5bf8cfcef 100644 --- a/keyboards/s60-x/s60-x.h +++ b/keyboards/s60_x/s60_x.h diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 5df539def..ccecdb192 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -89,9 +89,9 @@ DEBUG_HOST = localhost #============================================================================ # Autodecct teensy loader ifneq (, $(shell which teensy-loader-cli 2>/dev/null)) - TEENSY_LOADER_CLI = teensy-loader-cli + TEENSY_LOADER_CLI ?= teensy-loader-cli else - TEENSY_LOADER_CLI = teensy_loader_cli + TEENSY_LOADER_CLI ?= teensy_loader_cli endif # Program the device. @@ -100,43 +100,47 @@ program: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep teensy: $(BUILD_DIR)/$(TARGET).hex $(TEENSY_LOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex + +BATCHISP ?= batchisp flip: $(BUILD_DIR)/$(TARGET).hex - batchisp -hardware usb -device $(MCU) -operation erase f - batchisp -hardware usb -device $(MCU) -operation loadbuffer $(BUILD_DIR)/$(TARGET).hex program - batchisp -hardware usb -device $(MCU) -operation start reset 0 + $(BATCHISP) -hardware usb -device $(MCU) -operation erase f + $(BATCHISP) -hardware usb -device $(MCU) -operation loadbuffer $(BUILD_DIR)/$(TARGET).hex program + $(BATCHISP) -hardware usb -device $(MCU) -operation start reset 0 + +DFU_PROGRAMMER ?= dfu-programmer dfu: $(BUILD_DIR)/$(TARGET).hex sizeafter - until dfu-programmer $(MCU) get bootloader-version; do\ + until $(DFU_PROGRAMMER) $(MCU) get bootloader-version; do\ echo "Error: Bootloader not found. Trying again in 5s." ;\ sleep 5 ;\ done -ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1))) - dfu-programmer $(MCU) erase --force +ifneq (, $(findstring 0.7, $(shell $(DFU_PROGRAMMER) --version 2>&1))) + $(DFU_PROGRAMMER) $(MCU) erase --force else - dfu-programmer $(MCU) erase + $(DFU_PROGRAMMER) $(MCU) erase endif - dfu-programmer $(MCU) flash $(BUILD_DIR)/$(TARGET).hex - dfu-programmer $(MCU) reset + $(DFU_PROGRAMMER) $(MCU) flash $(BUILD_DIR)/$(TARGET).hex + $(DFU_PROGRAMMER) $(MCU) reset dfu-start: - dfu-programmer $(MCU) reset - dfu-programmer $(MCU) start + $(DFU_PROGRAMMER) $(MCU) reset + $(DFU_PROGRAMMER) $(MCU) start flip-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep $(COPY) $(BUILD_DIR)/$(TARGET).eep $(BUILD_DIR)/$(TARGET)eep.hex - batchisp -hardware usb -device $(MCU) -operation memory EEPROM erase - batchisp -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(BUILD_DIR)/$(TARGET)eep.hex program - batchisp -hardware usb -device $(MCU) -operation start reset 0 + $(BATCHISP) -hardware usb -device $(MCU) -operation memory EEPROM erase + $(BATCHISP) -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(BUILD_DIR)/$(TARGET)eep.hex program + $(BATCHISP) -hardware usb -device $(MCU) -operation start reset 0 $(REMOVE) $(BUILD_DIR)/$(TARGET)eep.hex dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1))) - dfu-programmer $(MCU) flash --eeprom $(BUILD_DIR)/$(TARGET).eep + $(DFU_PROGRAMMER) $(MCU) flash --eeprom $(BUILD_DIR)/$(TARGET).eep else - dfu-programmer $(MCU) flash-eeprom $(BUILD_DIR)/$(TARGET).eep + $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(BUILD_DIR)/$(TARGET).eep endif - dfu-programmer $(MCU) reset + $(DFU_PROGRAMMER) $(MCU) reset # Convert hex to bin. flashbin: $(BUILD_DIR)/$(TARGET).hex diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index eb0c40138..2a8d32fb9 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -151,5 +151,7 @@ endif # List any extra directories to look for libraries here. EXTRALIBDIRS = $(RULESPATH)/ld +DFU_UTIL ?= dfu-util + dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter - dfu-util $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin + $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin |