Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
This commit is contained in:
		
						commit
						f4fbfe6e54
					
				
					 56 changed files with 1343 additions and 747 deletions
				
			
		| 
						 | 
				
			
			@ -10,12 +10,12 @@ EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
 | 
			
		|||
CONSOLE_ENABLE = no         # Console for debug(+400)
 | 
			
		||||
COMMAND_ENABLE = yes        # Commands for debug and configuration
 | 
			
		||||
NKRO_ENABLE = yes            # 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
 | 
			
		||||
BACKLIGHT_ENABLE = no      # Enable keyboard backlight functionality
 | 
			
		||||
MIDI_ENABLE = no            # MIDI controls
 | 
			
		||||
AUDIO_ENABLE = yes           # Audio output on port C6
 | 
			
		||||
AUDIO_ENABLE = no           # Audio output on port C6
 | 
			
		||||
UNICODE_ENABLE = no         # Unicode
 | 
			
		||||
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.
 | 
			
		||||
RGBLIGHT_ENABLE = yes        # Enable WS2812 RGB underlight.  Do not enable this with audio at the same time.
 | 
			
		||||
 | 
			
		||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
 | 
			
		||||
SLEEP_LED_ENABLE = no    # Breathing sleep LED during USB suspend
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,4 +6,12 @@
 | 
			
		|||
#define LEADER_TIMEOUT 300
 | 
			
		||||
#define BACKLIGHT_BREATHING
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* ws2812 RGB LED */
 | 
			
		||||
#define RGB_DI_PIN B1
 | 
			
		||||
#define RGBLIGHT_TIMER
 | 
			
		||||
#define RGBLED_NUM 8     // Number of LEDs
 | 
			
		||||
#define RGBLIGHT_HUE_STEP 10
 | 
			
		||||
#define RGBLIGHT_SAT_STEP 17
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,7 +15,7 @@ extern keymap_config_t keymap_config;
 | 
			
		|||
// 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 _QWERTY 0
 | 
			
		||||
#define _QWERTY 10
 | 
			
		||||
#define _COLEMAK 1
 | 
			
		||||
#define _DVORAK 2
 | 
			
		||||
#define _LOWER 3
 | 
			
		||||
| 
						 | 
				
			
			@ -31,7 +31,15 @@ enum planck_keycodes {
 | 
			
		|||
  LOWER,
 | 
			
		||||
  RAISE,
 | 
			
		||||
  BACKLIT,
 | 
			
		||||
  EXT_PLV
 | 
			
		||||
  EXT_PLV,
 | 
			
		||||
  RGBLED_TOGGLE,
 | 
			
		||||
  RGBLED_STEP_MODE,
 | 
			
		||||
  RGBLED_INCREASE_HUE,
 | 
			
		||||
  RGBLED_DECREASE_HUE,
 | 
			
		||||
  RGBLED_INCREASE_SAT,
 | 
			
		||||
  RGBLED_DECREASE_SAT,
 | 
			
		||||
  RGBLED_INCREASE_VAL,
 | 
			
		||||
  RGBLED_DECREASE_VAL,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// Fillers to make layering more clear
 | 
			
		||||
| 
						 | 
				
			
			@ -39,14 +47,20 @@ enum planck_keycodes {
 | 
			
		|||
#define XXXXXXX KC_NO
 | 
			
		||||
 | 
			
		||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		||||
[0] = {
 | 
			
		||||
  {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL},
 | 
			
		||||
  {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL},
 | 
			
		||||
  {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL},
 | 
			
		||||
  {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}
 | 
			
		||||
},
 | 
			
		||||
 | 
			
		||||
/* Qwerty
 | 
			
		||||
 * ,-----------------------------------------------------------------------------------.
 | 
			
		||||
 ,-----------------------------------------------------------------------------------.
 | 
			
		||||
 * | Tab  |   Q  |   W  |   E  |   R  |   T  |   Y  |   U  |   I  |   O  |   P  | Bksp |
 | 
			
		||||
 * |------+------+------+------+------+-------------+------+------+------+------+------|
 | 
			
		||||
 * | Esc  |   A  |   S  |   D  |   F  |   G  |   H  |   J  |   K  |   L  |   ;  |  "   |
 | 
			
		||||
 * |------+------+------+------+------+------|------+------+------+------+------+------|
 | 
			
		||||
 * | Shift|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |   ,  |   .  |   /  |Enter |
 | 
			
		||||
 * | Shift|   Z  |   X  |   C  |   V  |   B  |   N  |   M  |,  |   .  |   /  |Enter |
 | 
			
		||||
 * |------+------+------+------+------+------+------+------+------+------+------+------|
 | 
			
		||||
 * | Brite| Ctrl | Alt  | GUI  |Lower |    Space    |Raise | Left | Down |  Up  |Right |
 | 
			
		||||
 * `-----------------------------------------------------------------------------------'
 | 
			
		||||
| 
						 | 
				
			
			@ -292,6 +306,57 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
			
		|||
        break;
 | 
			
		||||
      return false;
 | 
			
		||||
 | 
			
		||||
    case RGBLED_TOGGLE:
 | 
			
		||||
      //led operations
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        rgblight_toggle();
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
      break;
 | 
			
		||||
    case RGBLED_INCREASE_HUE:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        rgblight_increase_hue();
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
      break;
 | 
			
		||||
    case RGBLED_DECREASE_HUE:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        rgblight_decrease_hue();
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
      break;
 | 
			
		||||
    case RGBLED_INCREASE_SAT:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        rgblight_increase_sat();
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
      break;
 | 
			
		||||
    case RGBLED_DECREASE_SAT:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        rgblight_decrease_sat();
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
      break;
 | 
			
		||||
    case RGBLED_INCREASE_VAL:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        rgblight_increase_val();
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
      break;
 | 
			
		||||
    case RGBLED_DECREASE_VAL:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        rgblight_decrease_val();
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
      break;
 | 
			
		||||
    case RGBLED_STEP_MODE:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        rgblight_step();
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      }
 | 
			
		||||
  return true;
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -60,9 +60,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		|||
)
 | 
			
		||||
 | 
			
		||||
/* ws2812 RGB LED */
 | 
			
		||||
#define ws2812_PORTREG  PORTD
 | 
			
		||||
#define ws2812_DDRREG   DDRD
 | 
			
		||||
#define ws2812_pin PD1
 | 
			
		||||
#define RGB_DI_PIN D1
 | 
			
		||||
#define RGBLIGHT_TIMER
 | 
			
		||||
#define RGBLED_NUM 28     // Number of LEDs
 | 
			
		||||
#define RGBLIGHT_HUE_STEP 10
 | 
			
		||||
#define RGBLIGHT_SAT_STEP 17
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,9 +4,8 @@
 | 
			
		|||
#include "../../config.h"
 | 
			
		||||
 | 
			
		||||
/* ws2812 RGB LED */
 | 
			
		||||
#define ws2812_PORTREG  PORTD
 | 
			
		||||
#define ws2812_DDRREG   DDRD
 | 
			
		||||
#define ws2812_pin PD1
 | 
			
		||||
#define RGB_DI_PIN D1
 | 
			
		||||
#define RGBLIGHT_TIMER
 | 
			
		||||
#define RGBLED_NUM 28     // Number of LEDs
 | 
			
		||||
#define RGBLIGHT_HUE_STEP 10
 | 
			
		||||
#define RGBLIGHT_SAT_STEP 17
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,33 +51,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
[_RGB] = { /* RGBLIGHT */
 | 
			
		||||
  {KC_TRNS,  KC_PGUP,  KC_UP,    KC_PGDN,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_DEL},
 | 
			
		||||
  {KC_TRNS,  KC_LEFT,  KC_DOWN,  KC_RGHT,  KC_TRNS,  KC_HOME,  KC_LEFT,  KC_DOWN,  KC_UP,    KC_RGHT,  KC_END,   KC_TRNS},
 | 
			
		||||
  {KC_TRNS,  F(1),     F(2),     F(3),     F(4),     F(5),     F(6),     F(7),     F(8),     KC_TRNS,  KC_TRNS,  KC_TRNS},
 | 
			
		||||
  {KC_TRNS,  RGB_TOG,  RGB_MOD,  RGB_HUI,  RGB_HUD,  RGB_SAI,  RGB_SAD,  RGB_VAI,  RGB_VAD,  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}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
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_LAYER_TAP_KEY(_RGB, KC_SPC),
 | 
			
		||||
  [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),
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
 | 
			
		||||
| 
						 | 
				
			
			@ -100,47 +85,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
 | 
			
		|||
 | 
			
		||||
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;
 | 
			
		||||
  
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue