diff options
author | Christopher Browne <cbbrowne@ca.afilias.info> | 2016-07-12 11:57:15 -0400 |
---|---|---|
committer | Christopher Browne <cbbrowne@ca.afilias.info> | 2016-07-12 11:57:15 -0400 |
commit | f4fbfe6e544bb2beab05464a23ab848ae4c5578a (patch) | |
tree | 3adffe7bfb24ded332e3f8bd0366a2fd2f2db7e3 /keyboards/clueboard | |
parent | 477ed703c88822aea62152d62fb2310267edc48f (diff) | |
parent | a998a48673372e409991066d7d2d9ba282f79d59 (diff) |
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'keyboards/clueboard')
-rw-r--r-- | keyboards/clueboard/clueboard.c | 16 | ||||
-rw-r--r-- | keyboards/clueboard/keymaps/default/keymap.c | 72 | ||||
-rw-r--r-- | keyboards/clueboard/keymaps/max/keymap.c | 70 | ||||
-rw-r--r-- | keyboards/clueboard/rev1/config.h | 5 | ||||
-rw-r--r-- | keyboards/clueboard/rev1/rev1.c | 16 | ||||
-rw-r--r-- | keyboards/clueboard/rev2/config.h | 5 | ||||
-rw-r--r-- | keyboards/clueboard/rev2/rev2.c | 16 | ||||
-rw-r--r-- | keyboards/clueboard/rev2/rev2.h | 2 |
8 files changed, 47 insertions, 155 deletions
diff --git a/keyboards/clueboard/clueboard.c b/keyboards/clueboard/clueboard.c index 13195bda6b..3435202ba1 100644 --- a/keyboards/clueboard/clueboard.c +++ b/keyboards/clueboard/clueboard.c @@ -1,17 +1 @@ #include "clueboard.h" - -void led_init_ports() { - // * Set our LED pins as output - DDRB |= (1<<4); -} - -void led_set_kb(uint8_t usb_led) { - DDRF |= (1<<0); - if (usb_led & (1<<USB_LED_CAPS_LOCK)) { - // Turn capslock on - PORTF |= (1<<0); - } else { - // Turn capslock off - PORTF &= ~(1<<0); - } -} diff --git a/keyboards/clueboard/keymaps/default/keymap.c b/keyboards/clueboard/keymaps/default/keymap.c index 89f71e83a7..896bc7ebcc 100644 --- a/keyboards/clueboard/keymaps/default/keymap.c +++ b/keyboards/clueboard/keymaps/default/keymap.c @@ -67,11 +67,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RS] = KEYMAP( #ifdef RGBLIGHT_ENABLE - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(1), F(7), \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(8), \ + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_VAI, \ + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \ KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), F(5), \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, F(2), F(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(4), F(6), F(3)), + MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \ + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), #else KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ @@ -83,30 +83,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { enum function_id { SHIFT_ESC, - #ifdef RGBLIGHT_ENABLE - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL - #endif }; const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_FUNCTION(SHIFT_ESC), - #ifdef RGBLIGHT_ENABLE - [1] = ACTION_FUNCTION(RGBLED_TOGGLE), - [2] = ACTION_FUNCTION(RGBLED_STEP_MODE), - [3] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [4] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [5] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [6] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), - #endif }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { @@ -132,49 +112,5 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } } break; - //led operations - #ifdef RGBLIGHT_ENABLE - case RGBLED_TOGGLE: - if (record->event.pressed) { - rgblight_toggle(); - } - - break; - case RGBLED_INCREASE_HUE: - if (record->event.pressed) { - rgblight_increase_hue(); - } - break; - case RGBLED_DECREASE_HUE: - if (record->event.pressed) { - rgblight_decrease_hue(); - } - break; - case RGBLED_INCREASE_SAT: - if (record->event.pressed) { - rgblight_increase_sat(); - } - break; - case RGBLED_DECREASE_SAT: - if (record->event.pressed) { - rgblight_decrease_sat(); - } - break; - case RGBLED_INCREASE_VAL: - if (record->event.pressed) { - rgblight_increase_val(); - } - break; - case RGBLED_DECREASE_VAL: - if (record->event.pressed) { - rgblight_decrease_val(); - } - break; - case RGBLED_STEP_MODE: - if (record->event.pressed) { - rgblight_step(); - } - break; - #endif } } diff --git a/keyboards/clueboard/keymaps/max/keymap.c b/keyboards/clueboard/keymaps/max/keymap.c index 82c93401db..193809840b 100644 --- a/keyboards/clueboard/keymaps/max/keymap.c +++ b/keyboards/clueboard/keymaps/max/keymap.c @@ -66,78 +66,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------------------------------------------------------' */ [_RS] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(0), F(6), \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(7), \ + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_VAI, \ + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \ KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), F(4), \ - KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, F(1), F(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(3), F(5), F(2)), + MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \ + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), }; -enum function_id { - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL, -}; +/*enum function_id { +};*/ const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(RGBLED_TOGGLE), - [1] = ACTION_FUNCTION(RGBLED_STEP_MODE), - [2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { switch (id) { - case RGBLED_TOGGLE: - //led operations - if (record->event.pressed) { - rgblight_toggle(); - } - - break; - case RGBLED_INCREASE_HUE: - if (record->event.pressed) { - rgblight_increase_hue(); - } - break; - case RGBLED_DECREASE_HUE: - if (record->event.pressed) { - rgblight_decrease_hue(); - } - break; - case RGBLED_INCREASE_SAT: - if (record->event.pressed) { - rgblight_increase_sat(); - } - break; - case RGBLED_DECREASE_SAT: - if (record->event.pressed) { - rgblight_decrease_sat(); - } - break; - case RGBLED_INCREASE_VAL: - if (record->event.pressed) { - rgblight_increase_val(); - } - break; - case RGBLED_DECREASE_VAL: - if (record->event.pressed) { - rgblight_decrease_val(); - } - break; - case RGBLED_STEP_MODE: - if (record->event.pressed) { - rgblight_step(); - } - break; } } diff --git a/keyboards/clueboard/rev1/config.h b/keyboards/clueboard/rev1/config.h index 9bb58f56e8..8c94972324 100644 --- a/keyboards/clueboard/rev1/config.h +++ b/keyboards/clueboard/rev1/config.h @@ -25,9 +25,8 @@ /* Underlight configuration */ -#define ws2812_PORTREG PORTB -#define ws2812_DDRREG DDRB -#define ws2812_pin 2 +#define RGB_DI_PIN B2 +#define RGBLIGHT_TIMER #define RGBLED_NUM 14 // Number of LEDs #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 diff --git a/keyboards/clueboard/rev1/rev1.c b/keyboards/clueboard/rev1/rev1.c index 520a869e57..90fc6956c9 100644 --- a/keyboards/clueboard/rev1/rev1.c +++ b/keyboards/clueboard/rev1/rev1.c @@ -1 +1,17 @@ #include "rev1.h" + +void led_init_ports() { + // * Set our LED pins as output + DDRF |= (1<<0); +} + +void led_set_kb(uint8_t usb_led) { + DDRF |= (1<<0); + if (usb_led & (1<<USB_LED_CAPS_LOCK)) { + // Turn capslock on + PORTF |= (1<<0); + } else { + // Turn capslock off + PORTF &= ~(1<<0); + } +} diff --git a/keyboards/clueboard/rev2/config.h b/keyboards/clueboard/rev2/config.h index e2f8336beb..02982ff299 100644 --- a/keyboards/clueboard/rev2/config.h +++ b/keyboards/clueboard/rev2/config.h @@ -29,9 +29,8 @@ /* Underlight configuration */ -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD -#define ws2812_pin 7 +#define RGB_DI_PIN D7 +#define RGBLIGHT_TIMER #define RGBLED_NUM 14 // Number of LEDs #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 diff --git a/keyboards/clueboard/rev2/rev2.c b/keyboards/clueboard/rev2/rev2.c index 7a8ec368e6..1a35b87b84 100644 --- a/keyboards/clueboard/rev2/rev2.c +++ b/keyboards/clueboard/rev2/rev2.c @@ -45,3 +45,19 @@ void backlight_set(uint8_t level) { PORTD &= ~(1<<4); // Arrows } } + +void led_init_ports() { + // * Set our LED pins as output + DDRB |= (1<<4); +} + +void led_set_kb(uint8_t usb_led) { + DDRB |= (1<<4); + if (usb_led & (1<<USB_LED_CAPS_LOCK)) { + // Turn capslock on + PORTB |= (1<<4); + } else { + // Turn capslock off + PORTB &= ~(1<<4); + } +} diff --git a/keyboards/clueboard/rev2/rev2.h b/keyboards/clueboard/rev2/rev2.h index 912de405da..2e9cb9dc2e 100644 --- a/keyboards/clueboard/rev2/rev2.h +++ b/keyboards/clueboard/rev2/rev2.h @@ -13,7 +13,7 @@ * |------------------------------------------------------------. * | 30| 31| 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 84| 85|86| * |------------------------------------------------------------------. - * | 40| 41| 42| 43| 45| 46| 90| 91| 92| 93| 94| 95| 96| + * | 40| 41| 42| 43| 45| 46| 90| 92| 93| 94| 95| 96| 97| * `------------------------------------------------------------------' * ,-----------------------------------------------------------. ,---. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Yen| BS| |Ins| |