summaryrefslogtreecommitdiff
path: root/keyboards/planck
diff options
context:
space:
mode:
authorChristopher Browne <cbbrowne@ca.afilias.info>2016-06-30 12:38:48 -0400
committerChristopher Browne <cbbrowne@ca.afilias.info>2016-06-30 12:38:48 -0400
commit44a5f7630f18b40b36270d49449a43cd42b802f0 (patch)
tree9d29ee26496a458bf161eeb59dab5e12d85cb3aa /keyboards/planck
parentc9f509f0168f6d11e743a9d2e37964c05e45672b (diff)
parenta8b55f8c858933a0f7641f7bf2dede640235aa70 (diff)
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'keyboards/planck')
-rw-r--r--keyboards/planck/Makefile1
-rw-r--r--keyboards/planck/config.h8
-rw-r--r--keyboards/planck/keymaps/experimental/config.h1
-rw-r--r--keyboards/planck/keymaps/experimental/keymap.c66
-rw-r--r--keyboards/planck/keymaps/yang/Makefile1
-rw-r--r--keyboards/planck/planck.h7
-rw-r--r--keyboards/planck/rev3/Makefile5
-rw-r--r--keyboards/planck/rev3/config.h8
-rw-r--r--keyboards/planck/rev3/rev3.c1
-rw-r--r--keyboards/planck/rev3/rev3.h6
-rw-r--r--keyboards/planck/rev4/Makefile5
-rw-r--r--keyboards/planck/rev4/config.h8
-rw-r--r--keyboards/planck/rev4/rev4.c1
-rw-r--r--keyboards/planck/rev4/rev4.h6
14 files changed, 100 insertions, 24 deletions
diff --git a/keyboards/planck/Makefile b/keyboards/planck/Makefile
index 08e9205cbf..23944f92ea 100644
--- a/keyboards/planck/Makefile
+++ b/keyboards/planck/Makefile
@@ -1,4 +1,5 @@
+SUBPROJECT_DEFAULT = rev4
# MCU name
#MCU = at90usb1287
diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h
index da2b000f63..4dd1d22a95 100644
--- a/keyboards/planck/config.h
+++ b/keyboards/planck/config.h
@@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
-#define DEVICE_VER 0x0001
#define MANUFACTURER Ortholinear Keyboards
#define PRODUCT The Planck Keyboard
#define DESCRIPTION A compact ortholinear keyboard
@@ -79,4 +78,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
+#ifdef SUBPROJECT_rev3
+ #include "rev3/config.h"
+#endif
+#ifdef SUBPROJECT_rev4
+ #include "rev4/config.h"
+#endif
+
#endif
diff --git a/keyboards/planck/keymaps/experimental/config.h b/keyboards/planck/keymaps/experimental/config.h
index a9117e0eea..985e250ab5 100644
--- a/keyboards/planck/keymaps/experimental/config.h
+++ b/keyboards/planck/keymaps/experimental/config.h
@@ -4,5 +4,6 @@
#include "../../config.h"
#define LEADER_TIMEOUT 300
+#define BACKLIGHT_BREATHING
#endif
diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c
index 041285684a..8ec335d7d2 100644
--- a/keyboards/planck/keymaps/experimental/keymap.c
+++ b/keyboards/planck/keymaps/experimental/keymap.c
@@ -23,15 +23,16 @@ extern keymap_config_t keymap_config;
#define _PLOVER 5
#define _ADJUST 16
-// Macro name shortcuts
-#define QWERTY M(_QWERTY)
-#define COLEMAK M(_COLEMAK)
-#define DVORAK M(_DVORAK)
-#define LOWER M(_LOWER)
-#define RAISE M(_RAISE)
-#define M_BL 5
-#define PLOVER M(12)
-#define EXT_PLV M(13)
+enum planck_keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK,
+ PLOVER,
+ LOWER,
+ RAISE,
+ BACKLIT,
+ EXT_PLV
+};
// Fillers to make layering more clear
#define _______ KC_TRNS
@@ -54,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
- {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+ {KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Colemak
@@ -90,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
- {M(M_BL), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
+ {KC_LEAD, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Lower
@@ -193,10 +194,10 @@ void persistant_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- switch(id) {
- case _QWERTY:
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
@@ -204,7 +205,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
persistant_default_layer_set(1UL<<_QWERTY);
}
break;
- case _COLEMAK:
+ return false;
+ case COLEMAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
@@ -212,7 +214,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
persistant_default_layer_set(1UL<<_COLEMAK);
}
break;
- case _DVORAK:
+ return false;
+ case DVORAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
@@ -220,7 +223,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
persistant_default_layer_set(1UL<<_DVORAK);
}
break;
- case _LOWER:
+ return false;
+ case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
#ifdef BACKLIGHT_ENABLE
@@ -233,7 +237,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
- case _RAISE:
+ return false;
+ case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
#ifdef BACKLIGHT_ENABLE
@@ -246,7 +251,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
- case M_BL:
+ return false;
+ case BACKLIT:
if (record->event.pressed) {
register_code(KC_RSFT);
#ifdef BACKLIGHT_ENABLE
@@ -256,7 +262,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
unregister_code(KC_RSFT);
}
break;
- case 12:
+ return false;
+ case PLOVER:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
stop_all_notes();
@@ -274,7 +281,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
eeconfig_update_keymap(keymap_config.raw);
}
break;
- case 13:
+ return false;
+ case EXT_PLV:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_plover_gb, false, 0);
@@ -282,9 +290,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
layer_off(_PLOVER);
}
break;
+ return false;
}
- return MACRO_NONE;
+ return true;
};
void matrix_init_user(void) {
@@ -326,6 +335,17 @@ void matrix_scan_user(void) {
leading = false;
leader_end();
+ SEQ_ONE_KEY (KC_R) {
+ tap_random_base64();
+ tap_random_base64();
+ tap_random_base64();
+ tap_random_base64();
+ tap_random_base64();
+ tap_random_base64();
+ tap_random_base64();
+ tap_random_base64();
+ tap_random_base64();
+ }
SEQ_ONE_KEY (KC_V) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
diff --git a/keyboards/planck/keymaps/yang/Makefile b/keyboards/planck/keymaps/yang/Makefile
index f4908d7037..6b18762fa7 100644
--- a/keyboards/planck/keymaps/yang/Makefile
+++ b/keyboards/planck/keymaps/yang/Makefile
@@ -3,6 +3,7 @@
# the appropriate keymap folder that will get included automatically
#
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+AUDIO_ENABLE = no
ifndef QUANTUM_DIR
include ../../../../Makefile
diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h
index 81c0e8cb44..8cfee5d1cc 100644
--- a/keyboards/planck/planck.h
+++ b/keyboards/planck/planck.h
@@ -1,6 +1,13 @@
#ifndef PLANCK_H
#define PLANCK_H
+#ifdef SUBPROJECT_rev3
+ #include "rev3.h"
+#endif
+#ifdef SUBPROJECT_rev4
+ #include "rev4.h"
+#endif
+
#include "quantum.h"
#define PLANCK_MIT( \
diff --git a/keyboards/planck/rev3/Makefile b/keyboards/planck/rev3/Makefile
new file mode 100644
index 0000000000..3ed1445e43
--- /dev/null
+++ b/keyboards/planck/rev3/Makefile
@@ -0,0 +1,5 @@
+AUDIO_ENABLE ?= no # Audio output on port C6
+
+ifndef QUANTUM_DIR
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/planck/rev3/config.h b/keyboards/planck/rev3/config.h
new file mode 100644
index 0000000000..cc37874e83
--- /dev/null
+++ b/keyboards/planck/rev3/config.h
@@ -0,0 +1,8 @@
+#ifndef REV3_CONFIG_H
+#define REV3_CONFIG_H
+
+#include "../config.h"
+
+#define DEVICE_VER 0x0003
+
+#endif
diff --git a/keyboards/planck/rev3/rev3.c b/keyboards/planck/rev3/rev3.c
new file mode 100644
index 0000000000..9ccd1d8803
--- /dev/null
+++ b/keyboards/planck/rev3/rev3.c
@@ -0,0 +1 @@
+#include "rev3.h" \ No newline at end of file
diff --git a/keyboards/planck/rev3/rev3.h b/keyboards/planck/rev3/rev3.h
new file mode 100644
index 0000000000..628951d97d
--- /dev/null
+++ b/keyboards/planck/rev3/rev3.h
@@ -0,0 +1,6 @@
+#ifndef REV3_H
+#define REV3_H
+
+#include "../planck.h"
+
+#endif \ No newline at end of file
diff --git a/keyboards/planck/rev4/Makefile b/keyboards/planck/rev4/Makefile
new file mode 100644
index 0000000000..ed09f85a4d
--- /dev/null
+++ b/keyboards/planck/rev4/Makefile
@@ -0,0 +1,5 @@
+AUDIO_ENABLE ?= yes # Audio output on port C6
+
+ifndef QUANTUM_DIR
+ include ../../../Makefile
+endif \ No newline at end of file
diff --git a/keyboards/planck/rev4/config.h b/keyboards/planck/rev4/config.h
new file mode 100644
index 0000000000..98189fba71
--- /dev/null
+++ b/keyboards/planck/rev4/config.h
@@ -0,0 +1,8 @@
+#ifndef REV4_CONFIG_H
+#define REV4_CONFIG_H
+
+#include "../config.h"
+
+#define DEVICE_VER 0x0004
+
+#endif \ No newline at end of file
diff --git a/keyboards/planck/rev4/rev4.c b/keyboards/planck/rev4/rev4.c
new file mode 100644
index 0000000000..98a75d2ed1
--- /dev/null
+++ b/keyboards/planck/rev4/rev4.c
@@ -0,0 +1 @@
+#include "rev4.h" \ No newline at end of file
diff --git a/keyboards/planck/rev4/rev4.h b/keyboards/planck/rev4/rev4.h
new file mode 100644
index 0000000000..e4cf1800b8
--- /dev/null
+++ b/keyboards/planck/rev4/rev4.h
@@ -0,0 +1,6 @@
+#ifndef REV4_H
+#define REV4_H
+
+#include "../planck.h"
+
+#endif \ No newline at end of file