Skip to content

Commit

Permalink
Adds support for Planck Rev 6 (#2666)
Browse files Browse the repository at this point in the history
* initial files for rev 6 with encoder

* music map init, dip scan added

* adds ws2812 driver for arm

* flesh out dip and encoder support

* adds default encoder res

* adds default encoder res

* start muse implementation

* muse working with encoder as control

* flip direction

* try mouse wheel again

* dont break other revs

* dont break other revs

* conditional autio

* pwm ws driver (not working)

* update build includes for chibios

* update ws2812 driver/config

* last commit for glasser code

* working example

* remove rgb for now

* finish up rev6

* working encoder keycodes

* add warnings to planck keymaps about the LAYOUT
  • Loading branch information
jackhumbert committed Jul 16, 2018
1 parent 96cb9f4 commit ade22f8
Show file tree
Hide file tree
Showing 122 changed files with 4,141 additions and 688 deletions.
12 changes: 6 additions & 6 deletions common.mk
Expand Up @@ -3,16 +3,16 @@ include message.mk
# Directory common source files exist
TOP_DIR = .
TMK_DIR = tmk_core
TMK_PATH = $(TOP_DIR)/$(TMK_DIR)
LIB_PATH = $(TOP_DIR)/lib
TMK_PATH = $(TMK_DIR)
LIB_PATH = lib

QUANTUM_DIR = quantum
QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR)
QUANTUM_PATH = $(QUANTUM_DIR)

DRIVER_DIR = drivers
DRIVER_PATH = $(TOP_DIR)/$(DRIVER_DIR)
DRIVER_PATH = $(DRIVER_DIR)

BUILD_DIR := $(TOP_DIR)/.build
BUILD_DIR := .build

COMMON_VPATH := $(TOP_DIR)
COMMON_VPATH += $(TMK_PATH)
Expand All @@ -21,4 +21,4 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
COMMON_VPATH += $(QUANTUM_PATH)/audio
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
COMMON_VPATH += $(QUANTUM_PATH)/api
COMMON_VPATH += $(DRIVER_PATH)
COMMON_VPATH += $(DRIVER_PATH)
1 change: 1 addition & 0 deletions keyboards/planck/keymaps/ab/keymap.c
@@ -1,4 +1,5 @@

#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#include "action_layer.h"
#include "eeconfig.h"
Expand Down
1 change: 1 addition & 0 deletions keyboards/planck/keymaps/ajp10304/keymap.c
@@ -1,3 +1,4 @@
#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#include "action_layer.h"
#include "eeconfig.h"
Expand Down
1 change: 1 addition & 0 deletions keyboards/planck/keymaps/alexey/keymap.c
@@ -1,4 +1,5 @@
#include "keymap.h"
#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#include "backlight.h"

Expand Down
1 change: 1 addition & 0 deletions keyboards/planck/keymaps/altgr/keymap.c
Expand Up @@ -67,6 +67,7 @@


#include "config.h"
#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#include "action_layer.h"
#ifdef STENO_ENABLE
Expand Down
1 change: 1 addition & 0 deletions keyboards/planck/keymaps/andylikescandy/keymap.c
Expand Up @@ -14,6 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#include "action_layer.h"

Expand Down
3 changes: 2 additions & 1 deletion keyboards/planck/keymaps/aviator/keymap.c
Expand Up @@ -4,7 +4,8 @@
* Designed for aeronautical data entry on the OLKB Planck.
*/

#include "planck.h"
#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#include "action_layer.h"

extern keymap_config_t keymap_config;
Expand Down
1 change: 1 addition & 0 deletions keyboards/planck/keymaps/basic/keymap.c
@@ -1,3 +1,4 @@
#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"

// Each layer gets a name for readability, which is then used in the keymap matrix below.
Expand Down
1 change: 1 addition & 0 deletions keyboards/planck/keymaps/bbaserdem/keymap.c
Expand Up @@ -6,6 +6,7 @@
* Check qmk_firmware/users/bbaserdem for the main part of the code
*/

#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#include "bbaserdem.h"

Expand Down
79 changes: 40 additions & 39 deletions keyboards/planck/keymaps/bone2planck/keymap.c
@@ -1,4 +1,5 @@
#include "planck.h"
#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#ifdef BACKLIGHT_ENABLE
#include "backlight.h"
#endif
Expand Down Expand Up @@ -36,11 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[0] = {
{ DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q },
//{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
{ MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
{ KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT },
{ KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL }
{ DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q },
//{ LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
{ MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) },
{ KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT },
{ KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL }
},

/* M1 Special Characters
Expand All @@ -56,10 +57,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[1] = {
{ DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT },
{ _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ },
{ _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
{ DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT },
{ _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ },
{ _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
},

/* M2 Navigation & Number Blocks
Expand All @@ -75,10 +76,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[2] = {
{ XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS },
{ KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT },
{ _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ },
{ _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ }
{ XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_INS },
{ KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_ENT },
{ _______, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, DE_0, DE_1, DE_2, DE_3, DE_COMM, _______ },
{ _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ }
},

/* M3 Switched Navigation & Number Blocks for one handed use
Expand All @@ -95,10 +96,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/

[3] = {
{ KC_INS, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX },
{ _______, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ },
{ _______, DE_0, DE_1, DE_2, DE_3, DE_COMM, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, _______ },
{ _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______, _______ }
{ KC_INS, XXXXXXX, DE_7, DE_8, DE_9, XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, XXXXXXX },
{ _______, XXXXXXX, DE_4, DE_5, DE_6, DE_DOT, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ },
{ _______, DE_0, DE_1, DE_2, DE_3, DE_COMM, XXXXXXX, KC_TAB, XXXXXXX, KC_ENT, XXXXXXX, _______ },
{ _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, _______, _______, _______, _______ }
},


Expand All @@ -114,10 +115,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[4] = {
{ XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX },
{ KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT },
{ _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ },
{ _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ }
{ XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX },
{ KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT },
{ _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ },
{ _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ }
},


Expand All @@ -134,10 +135,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------'
*/
[5] = {
{ XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX },
{ _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ },
{ _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ },
{ _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ }
{ XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX },
{ _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ },
{ _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ },
{ _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ }
}
};

Expand All @@ -148,19 +149,19 @@ const uint16_t PROGMEM fn_actions[] = {

const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch (id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
// MACRODOWN only works in this function
switch (id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
#ifdef BACKLIGHT_ENABLE
backlight_step();
backlight_step();
#endif
}
else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
}
else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};
1 change: 1 addition & 0 deletions keyboards/planck/keymaps/brandon/keymap.c
@@ -1,3 +1,4 @@
#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#include "action_layer.h"
#include "eeconfig.h"
Expand Down
1 change: 1 addition & 0 deletions keyboards/planck/keymaps/callum/keymap.c
@@ -1,3 +1,4 @@
#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#include "action_layer.h"

Expand Down
17 changes: 9 additions & 8 deletions keyboards/planck/keymaps/cbbrowne/keymap.c
@@ -1,3 +1,4 @@
#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#ifdef BACKLIGHT_ENABLE
#include "backlight.h"
Expand All @@ -7,7 +8,7 @@
#include "version.h"

/* Each layer is given a name to aid in readability, which is then
used in the keymap matrix below. The underscores do not denote
used in the keymap matrix below. The underscores do not denote
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
Expand All @@ -20,7 +21,7 @@
/* This was originally based on planck/keymaps/default/default.c, and
then cbbrowne has revised things */

/* Things I did not like about the default mapping
/* Things I did not like about the default mapping
- I found control too hard to get to. I use it more than Tab, so
switched it there.
Expand All @@ -33,7 +34,7 @@
- All of the above are done :-)
- Dropped out support for Dvorak and friends. They aren't
- Dropped out support for Dvorak and friends. They aren't
improvements to me
*/

Expand Down Expand Up @@ -177,7 +178,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
} else {
unregister_code(KC_RSFT);
}
break;
break;
case M_USERNAME:
if (record->event.pressed) {
SEND_STRING("cbbrowne");
Expand All @@ -195,7 +196,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
if (record->event.pressed) {
/* Here, we mix the LCRNG with low bits from one of the system
clocks via XOR in the theory that this may be more random
than either separately */
than either separately */
rval = (random_value ^ clockbyte) % 10;
/* Note that KC_1 thru KC_0 are a contiguous range */
register_code (KC_1 + rval);
Expand All @@ -207,7 +208,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
a letter chosen at random */
/* Here, we mix the LCRNG with low bits from one of the system
clocks via XOR in the theory that this may be more random
than either separately */
than either separately */
random_value = ((random_value + randadd) * randmul) % randmod;
if (record->event.pressed) {
rval = (random_value ^ clockbyte) % 26;
Expand Down Expand Up @@ -247,7 +248,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;

}
return MACRO_NONE;
};
Expand Down Expand Up @@ -366,4 +367,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {

return true;
}

1 change: 1 addition & 0 deletions keyboards/planck/keymaps/chance/keymap.c
@@ -1,4 +1,5 @@

#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
#include "planck.h"
#include "action_layer.h"
#ifdef AUDIO_ENABLE
Expand Down

0 comments on commit ade22f8

Please sign in to comment.