aboutsummaryrefslogtreecommitdiff
path: root/keyboards/lets_split
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/lets_split')
-rw-r--r--keyboards/lets_split/Makefile4
-rw-r--r--keyboards/lets_split/config.h43
-rw-r--r--keyboards/lets_split/i2c.c3
-rw-r--r--keyboards/lets_split/keymaps/default/keymap.c85
-rw-r--r--keyboards/lets_split/keymaps/i2c/config.h102
-rw-r--r--keyboards/lets_split/keymaps/i2c/keymap.c214
-rw-r--r--keyboards/lets_split/keymaps/serial/config.h102
-rw-r--r--keyboards/lets_split/keymaps/serial/keymap.c214
-rw-r--r--keyboards/lets_split/lets_split.c3
-rw-r--r--keyboards/lets_split/matrix.c23
-rw-r--r--keyboards/lets_split/pro_micro.h64
-rw-r--r--keyboards/lets_split/readme.md13
-rw-r--r--keyboards/lets_split/rev1/Makefile3
-rw-r--r--keyboards/lets_split/rev1/config.h24
-rw-r--r--keyboards/lets_split/rev1/rev1.c8
-rw-r--r--keyboards/lets_split/rev1/rev1.h6
-rw-r--r--keyboards/lets_split/rev1/rules.mk5
-rw-r--r--keyboards/lets_split/rev2/Makefile3
-rw-r--r--keyboards/lets_split/rev2/config.h20
-rw-r--r--keyboards/lets_split/rev2/rev2.c8
-rw-r--r--keyboards/lets_split/rev2/rev2.h6
-rw-r--r--keyboards/lets_split/rev2/rules.mk5
-rw-r--r--keyboards/lets_split/rules.mk75
-rw-r--r--keyboards/lets_split/serial.c5
-rw-r--r--keyboards/lets_split/split_util.c8
25 files changed, 966 insertions, 80 deletions
diff --git a/keyboards/lets_split/Makefile b/keyboards/lets_split/Makefile
index 396d51555..6ce6e4373 100644
--- a/keyboards/lets_split/Makefile
+++ b/keyboards/lets_split/Makefile
@@ -1,3 +1,6 @@
1<<<<<<< HEAD
2ifndef MAKEFILE_INCLUDED
3=======
1SRC += matrix.c \ 4SRC += matrix.c \
2 i2c.c \ 5 i2c.c \
3 split_util.c \ 6 split_util.c \
@@ -74,5 +77,6 @@ SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
74CUSTOM_MATRIX = yes 77CUSTOM_MATRIX = yes
75SUBPROJECT_DEFAULT = rev2 78SUBPROJECT_DEFAULT = rev2
76ifndef QUANTUM_DIR 79ifndef QUANTUM_DIR
80>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
77 include ../../Makefile 81 include ../../Makefile
78endif \ No newline at end of file 82endif \ No newline at end of file
diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h
index 059d45b0c..91b11f03f 100644
--- a/keyboards/lets_split/config.h
+++ b/keyboards/lets_split/config.h
@@ -28,24 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
28#define PRODUCT Lets Split 28#define PRODUCT Lets Split
29#define DESCRIPTION A split keyboard for the cheap makers 29#define DESCRIPTION A split keyboard for the cheap makers
30 30
31/* key matrix size */
32// Rows are doubled-up
33#define MATRIX_ROWS 8
34#define MATRIX_COLS 6
35
36// wiring of each half
37#define MATRIX_ROW_PINS { B5, B4, E6, D7 }
38#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
39
40#define CATERINA_BOOTLOADER
41
42// #define USE_I2C
43
44// #define EE_HANDS
45
46#define I2C_MASTER_LEFT
47// #define I2C_MASTER_RIGHT
48
49/* COL2ROW or ROW2COL */ 31/* COL2ROW or ROW2COL */
50#define DIODE_DIRECTION COL2ROW 32#define DIODE_DIRECTION COL2ROW
51 33
@@ -67,26 +49,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
67#define IS_COMMAND() ( \ 49#define IS_COMMAND() ( \
68 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ 50 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
69) 51)
70
71/* ws2812 RGB LED */
72#define ws2812_PORTREG PORTD
73#define ws2812_DDRREG DDRD
74#define ws2812_pin PD1
75#define RGBLED_NUM 28 // Number of LEDs
76#define RGBLIGHT_HUE_STEP 10
77#define RGBLIGHT_SAT_STEP 17
78#define RGBLIGHT_VAL_STEP 17
79
80/*
81 * Feature disable options
82 * These options are also useful to firmware size reduction.
83 */
84
85/* disable debug print */ 52/* disable debug print */
86// #define NO_DEBUG 53//#define NO_DEBUG
87 54
88/* disable print */ 55/* disable print */
89// #define NO_PRINT 56//#define NO_PRINT
90 57
91/* disable action features */ 58/* disable action features */
92//#define NO_ACTION_LAYER 59//#define NO_ACTION_LAYER
@@ -95,6 +62,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
95//#define NO_ACTION_MACRO 62//#define NO_ACTION_MACRO
96//#define NO_ACTION_FUNCTION 63//#define NO_ACTION_FUNCTION
97<<<<<<< HEAD 64<<<<<<< HEAD
65=======
66<<<<<<< HEAD
67>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
98#ifdef SUBPROJECT_rev1 68#ifdef SUBPROJECT_rev1
99 #include "rev1/config.h" 69 #include "rev1/config.h"
100#endif 70#endif
@@ -102,6 +72,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
102 #include "rev2/config.h" 72 #include "rev2/config.h"
103#endif 73#endif
104#endif 74#endif
75<<<<<<< HEAD
76=======
105 77
106 78
107 79
80>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
diff --git a/keyboards/lets_split/i2c.c b/keyboards/lets_split/i2c.c
index c72789403..084c890c4 100644
--- a/keyboards/lets_split/i2c.c
+++ b/keyboards/lets_split/i2c.c
@@ -6,6 +6,8 @@
6#include <stdbool.h> 6#include <stdbool.h>
7#include "i2c.h" 7#include "i2c.h"
8 8
9#ifdef USE_I2C
10
9// Limits the amount of we wait for any one i2c transaction. 11// Limits the amount of we wait for any one i2c transaction.
10// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is 12// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
11// 9 bits, a single transaction will take around 90μs to complete. 13// 9 bits, a single transaction will take around 90μs to complete.
@@ -157,3 +159,4 @@ ISR(TWI_vect) {
157 // Reset everything, so we are ready for the next TWI interrupt 159 // Reset everything, so we are ready for the next TWI interrupt
158 TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); 160 TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
159} 161}
162#endif
diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c
index d94063816..41b9b8d8f 100644
--- a/keyboards/lets_split/keymaps/default/keymap.c
+++ b/keyboards/lets_split/keymaps/default/keymap.c
@@ -29,24 +29,109 @@ enum custom_keycodes {
29#define XXXXXXX KC_NO 29#define XXXXXXX KC_NO
30 30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32<<<<<<< HEAD
33
34/* Qwerty
35 * ,-----------------------------------------------------------------------------------.
36 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
37 * |------+------+------+------+------+-------------+------+------+------+------+------|
38 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
39 * |------+------+------+------+------+------|------+------+------+------+------+------|
40 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
41 * |------+------+------+------+------+------+------+------+------+------+------+------|
42 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
43 * `-----------------------------------------------------------------------------------'
44 */
45[_QWERTY] = KEYMAP( \
46 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
47 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
48 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
49 KC_LCTL, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, MT(MOD_LSFT, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
50),
51
52/* Colemak
53 * ,-----------------------------------------------------------------------------------.
54 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
55 * |------+------+------+------+------+-------------+------+------+------+------+------|
56 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
57 * |------+------+------+------+------+------|------+------+------+------+------+------|
58 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
59 * |------+------+------+------+------+------+------+------+------+------+------+------|
60 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
61 * `-----------------------------------------------------------------------------------'
62 */
63[_COLEMAK] = KEYMAP( \
64 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
65 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
66 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
67 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
68),
69
70/* Dvorak
71 * ,-----------------------------------------------------------------------------------.
72 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
73 * |------+------+------+------+------+-------------+------+------+------+------+------|
74 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
75 * |------+------+------+------+------+------|------+------+------+------+------+------|
76 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
77 * |------+------+------+------+------+------+------+------+------+------+------+------|
78 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
79 * `-----------------------------------------------------------------------------------'
80 */
81[_DVORAK] = KEYMAP( \
82 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
83 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
84 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
85 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
86=======
32[0] = KEYMAP( \ 87[0] = KEYMAP( \
33 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ 88 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \
34 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ 89 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
35 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ 90 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
36 KC_LCTL, _LOWER, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ 91 KC_LCTL, _LOWER, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
92>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
37), 93),
38[3] = KEYMAP( \ 94[3] = KEYMAP( \
39 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ 95 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
40 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ 96 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
41 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ 97 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
98<<<<<<< HEAD
99 _______, _______, _______, _______, _______, KC_BSPC, MT(MOD_LSFT, KC_BSPC), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
100=======
42 _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ 101 _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
102>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
43), 103),
44[4] = KEYMAP( \ 104[4] = KEYMAP( \
45 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ 105 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
46 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ 106 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
47 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ 107 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
108<<<<<<< HEAD
109 _______, _______, _______, _______, _______, KC_ENT, MT(MOD_LSFT, KC_ENT), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
110),
111
112/* Adjust (Lower + Raise)
113 * ,-----------------------------------------------------------------------------------.
114 * | | Reset| | | | | | | | | | Del |
115 * |------+------+------+------+------+-------------+------+------+------+------+------|
116 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
117 * |------+------+------+------+------+------|------+------+------+------+------+------|
118 * | | | | | | | | | | | | |
119 * |------+------+------+------+------+------+------+------+------+------+------+------|
120 * | | | | | | | | | | | |
121 * `-----------------------------------------------------------------------------------'
122 */
123[_ADJUST] = KEYMAP( \
124 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
125 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
126 _______, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, _______, _______, _______, \
127 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
128)
129
130
131=======
48 _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ 132 _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
49), 133),
134>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
50}; 135};
51 136
52#ifdef AUDIO_ENABLE 137#ifdef AUDIO_ENABLE
diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h
new file mode 100644
index 000000000..2671fabf6
--- /dev/null
+++ b/keyboards/lets_split/keymaps/i2c/config.h
@@ -0,0 +1,102 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x3060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Wootpatoot
28#define PRODUCT Lets Split
29#define DESCRIPTION A split keyboard for the cheap makers
30
31/* key matrix size */
32// Rows are doubled-up
33#define MATRIX_ROWS 8
34#define MATRIX_COLS 6
35
36// wiring of each half
37#define MATRIX_ROW_PINS { B5, B4, E6, D7 }
38#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
39
40#define CATERINA_BOOTLOADER
41
42#define USE_I2C
43
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48
49// #define EE_HANDS
50
51#define I2C_MASTER_LEFT
52// #define I2C_MASTER_RIGHT
53
54/* COL2ROW or ROW2COL */
55#define DIODE_DIRECTION COL2ROW
56
57/* define if matrix has ghost */
58//#define MATRIX_HAS_GHOST
59
60/* number of backlight levels */
61// #define BACKLIGHT_LEVELS 3
62
63/* Set 0 if debouncing isn't needed */
64#define DEBOUNCING_DELAY 5
65
66/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
67#define LOCKING_SUPPORT_ENABLE
68/* Locking resynchronize hack */
69#define LOCKING_RESYNC_ENABLE
70
71/* key combination for command */
72#define IS_COMMAND() ( \
73 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
74)
75
76/* ws2812 RGB LED */
77#define RGB_DI_PIN D4
78#define RGBLIGHT_TIMER
79#define RGBLED_NUM 8 // Number of LEDs
80#define RGBLIGHT_HUE_STEP 10
81#define RGBLIGHT_SAT_STEP 17
82#define RGBLIGHT_VAL_STEP 17
83
84/*
85 * Feature disable options
86 * These options are also useful to firmware size reduction.
87 */
88
89/* disable debug print */
90// #define NO_DEBUG
91
92/* disable print */
93// #define NO_PRINT
94
95/* disable action features */
96//#define NO_ACTION_LAYER
97//#define NO_ACTION_TAPPING
98//#define NO_ACTION_ONESHOT
99//#define NO_ACTION_MACRO
100//#define NO_ACTION_FUNCTION
101
102#endif
diff --git a/keyboards/lets_split/keymaps/i2c/keymap.c b/keyboards/lets_split/keymaps/i2c/keymap.c
new file mode 100644
index 000000000..0d2d94b67
--- /dev/null
+++ b/keyboards/lets_split/keymaps/i2c/keymap.c
@@ -0,0 +1,214 @@
1#include "lets_split.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _QWERTY 0
12#define _COLEMAK 1
13#define _DVORAK 2
14#define _LOWER 3
15#define _RAISE 4
16#define _ADJUST 16
17
18enum custom_keycodes {
19 QWERTY = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE,
24 ADJUST,
25};
26
27// Fillers to make layering more clear
28#define _______ KC_TRNS
29#define XXXXXXX KC_NO
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33/* Qwerty
34 * ,-----------------------------------------------------------------------------------.
35 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
36 * |------+------+------+------+------+-------------+------+------+------+------+------|
37 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
38 * |------+------+------+------+------+------|------+------+------+------+------+------|
39 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
40 * |------+------+------+------+------+------+------+------+------+------+------+------|
41 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
42 * `-----------------------------------------------------------------------------------'
43 */
44[_QWERTY] = KEYMAP( \
45 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
46 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
47 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
48 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
49),
50
51/* Colemak
52 * ,-----------------------------------------------------------------------------------.
53 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
54 * |------+------+------+------+------+-------------+------+------+------+------+------|
55 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
56 * |------+------+------+------+------+------|------+------+------+------+------+------|
57 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
58 * |------+------+------+------+------+------+------+------+------+------+------+------|
59 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
60 * `-----------------------------------------------------------------------------------'
61 */
62[_COLEMAK] = KEYMAP( \
63 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
64 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
65 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
66 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
67),
68
69/* Dvorak
70 * ,-----------------------------------------------------------------------------------.
71 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
72 * |------+------+------+------+------+-------------+------+------+------+------+------|
73 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
74 * |------+------+------+------+------+------|------+------+------+------+------+------|
75 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
76 * |------+------+------+------+------+------+------+------+------+------+------+------|
77 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
78 * `-----------------------------------------------------------------------------------'
79 */
80[_DVORAK] = KEYMAP( \
81 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
82 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
83 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
84 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
85),
86
87/* Lower
88 * ,-----------------------------------------------------------------------------------.
89 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
90 * |------+------+------+------+------+-------------+------+------+------+------+------|
91 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
92 * |------+------+------+------+------+------|------+------+------+------+------+------|
93 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
94 * |------+------+------+------+------+------+------+------+------+------+------+------|
95 * | | | | | | | | Next | Vol- | Vol+ | Play |
96 * `-----------------------------------------------------------------------------------'
97 */
98[_LOWER] = KEYMAP( \
99 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
100 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
101 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
102 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
103),
104
105/* Raise
106 * ,-----------------------------------------------------------------------------------.
107 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
108 * |------+------+------+------+------+-------------+------+------+------+------+------|
109 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
110 * |------+------+------+------+------+------|------+------+------+------+------+------|
111 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
112 * |------+------+------+------+------+------+------+------+------+------+------+------|
113 * | | | | | | | | Next | Vol- | Vol+ | Play |
114 * `-----------------------------------------------------------------------------------'
115 */
116[_RAISE] = KEYMAP( \
117 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
118 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
119 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
120 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
121),
122
123/* Adjust (Lower + Raise)
124 * ,-----------------------------------------------------------------------------------.
125 * | | Reset| | | | | | | | | | Del |
126 * |------+------+------+------+------+-------------+------+------+------+------+------|
127 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
128 * |------+------+------+------+------+------|------+------+------+------+------+------|
129 * | | | | | | | | | | | | |
130 * |------+------+------+------+------+------+------+------+------+------+------+------|
131 * | | | | | | | | | | | |
132 * `-----------------------------------------------------------------------------------'
133 */
134[_ADJUST] = KEYMAP( \
135 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
136 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
137 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
138 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
139)
140
141
142};
143
144#ifdef AUDIO_ENABLE
145float tone_qwerty[][2] = SONG(QWERTY_SOUND);
146float tone_dvorak[][2] = SONG(DVORAK_SOUND);
147float tone_colemak[][2] = SONG(COLEMAK_SOUND);
148#endif
149
150void persistant_default_layer_set(uint16_t default_layer) {
151 eeconfig_update_default_layer(default_layer);
152 default_layer_set(default_layer);
153}
154
155bool process_record_user(uint16_t keycode, keyrecord_t *record) {
156 switch (keycode) {
157 case QWERTY:
158 if (record->event.pressed) {
159 #ifdef AUDIO_ENABLE
160 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
161 #endif
162 persistant_default_layer_set(1UL<<_QWERTY);
163 }
164 return false;
165 break;
166 case COLEMAK:
167 if (record->event.pressed) {
168 #ifdef AUDIO_ENABLE
169 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
170 #endif
171 persistant_default_layer_set(1UL<<_COLEMAK);
172 }
173 return false;
174 break;
175 case DVORAK:
176 if (record->event.pressed) {
177 #ifdef AUDIO_ENABLE
178 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
179 #endif
180 persistant_default_layer_set(1UL<<_DVORAK);
181 }
182 return false;
183 break;
184 case LOWER:
185 if (record->event.pressed) {
186 layer_on(_LOWER);
187 update_tri_layer(_LOWER, _RAISE, _ADJUST);
188 } else {
189 layer_off(_LOWER);
190 update_tri_layer(_LOWER, _RAISE, _ADJUST);
191 }
192 return false;
193 break;
194 case RAISE:
195 if (record->event.pressed) {
196 layer_on(_RAISE);
197 update_tri_layer(_LOWER, _RAISE, _ADJUST);
198 } else {
199 layer_off(_RAISE);
200 update_tri_layer(_LOWER, _RAISE, _ADJUST);
201 }
202 return false;
203 break;
204 case ADJUST:
205 if (record->event.pressed) {
206 layer_on(_ADJUST);
207 } else {
208 layer_off(_ADJUST);
209 }
210 return false;
211 break;
212 }
213 return true;
214} \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h
new file mode 100644
index 000000000..f4d900acc
--- /dev/null
+++ b/keyboards/lets_split/keymaps/serial/config.h
@@ -0,0 +1,102 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x3060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Wootpatoot
28#define PRODUCT Lets Split
29#define DESCRIPTION A split keyboard for the cheap makers
30
31/* key matrix size */
32// Rows are doubled-up
33#define MATRIX_ROWS 8
34#define MATRIX_COLS 6
35
36// wiring of each half
37#define MATRIX_ROW_PINS { B5, B4, E6, D7 }
38#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
39
40#define CATERINA_BOOTLOADER
41
42// #define USE_I2C
43
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48
49// #define EE_HANDS
50
51#define I2C_MASTER_LEFT
52// #define I2C_MASTER_RIGHT
53
54/* COL2ROW or ROW2COL */
55#define DIODE_DIRECTION COL2ROW
56
57/* define if matrix has ghost */
58//#define MATRIX_HAS_GHOST
59
60/* number of backlight levels */
61// #define BACKLIGHT_LEVELS 3
62
63/* Set 0 if debouncing isn't needed */
64#define DEBOUNCING_DELAY 5
65
66/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
67#define LOCKING_SUPPORT_ENABLE
68/* Locking resynchronize hack */
69#define LOCKING_RESYNC_ENABLE
70
71/* key combination for command */
72#define IS_COMMAND() ( \
73 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
74)
75
76/* ws2812 RGB LED */
77#define RGB_DI_PIN D4
78#define RGBLIGHT_TIMER
79#define RGBLED_NUM 8 // Number of LEDs
80#define RGBLIGHT_HUE_STEP 10
81#define RGBLIGHT_SAT_STEP 17
82#define RGBLIGHT_VAL_STEP 17
83
84/*
85 * Feature disable options
86 * These options are also useful to firmware size reduction.
87 */
88
89/* disable debug print */
90// #define NO_DEBUG
91
92/* disable print */
93// #define NO_PRINT
94
95/* disable action features */
96//#define NO_ACTION_LAYER
97//#define NO_ACTION_TAPPING
98//#define NO_ACTION_ONESHOT
99//#define NO_ACTION_MACRO
100//#define NO_ACTION_FUNCTION
101
102#endif
diff --git a/keyboards/lets_split/keymaps/serial/keymap.c b/keyboards/lets_split/keymaps/serial/keymap.c
new file mode 100644
index 000000000..0d2d94b67
--- /dev/null
+++ b/keyboards/lets_split/keymaps/serial/keymap.c
@@ -0,0 +1,214 @@
1#include "lets_split.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7// Each layer gets a name for readability, which is then used in the keymap matrix below.
8// The underscores don't mean anything - you can have a layer called STUFF or any other name.
9// Layer names don't all need to be of the same length, obviously, and you can also skip them
10// entirely and just use numbers.
11#define _QWERTY 0
12#define _COLEMAK 1
13#define _DVORAK 2
14#define _LOWER 3
15#define _RAISE 4
16#define _ADJUST 16
17
18enum custom_keycodes {
19 QWERTY = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE,
24 ADJUST,
25};
26
27// Fillers to make layering more clear
28#define _______ KC_TRNS
29#define XXXXXXX KC_NO
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33/* Qwerty
34 * ,-----------------------------------------------------------------------------------.
35 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
36 * |------+------+------+------+------+-------------+------+------+------+------+------|
37 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
38 * |------+------+------+------+------+------|------+------+------+------+------+------|
39 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
40 * |------+------+------+------+------+------+------+------+------+------+------+------|
41 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
42 * `-----------------------------------------------------------------------------------'
43 */
44[_QWERTY] = KEYMAP( \
45 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
46 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
47 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
48 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
49),
50
51/* Colemak
52 * ,-----------------------------------------------------------------------------------.
53 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
54 * |------+------+------+------+------+-------------+------+------+------+------+------|
55 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
56 * |------+------+------+------+------+------|------+------+------+------+------+------|
57 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
58 * |------+------+------+------+------+------+------+------+------+------+------+------|
59 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
60 * `-----------------------------------------------------------------------------------'
61 */
62[_COLEMAK] = KEYMAP( \
63 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
64 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
65 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
66 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
67),
68
69/* Dvorak
70 * ,-----------------------------------------------------------------------------------.
71 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
72 * |------+------+------+------+------+-------------+------+------+------+------+------|
73 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
74 * |------+------+------+------+------+------|------+------+------+------+------+------|
75 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
76 * |------+------+------+------+------+------+------+------+------+------+------+------|
77 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
78 * `-----------------------------------------------------------------------------------'
79 */
80[_DVORAK] = KEYMAP( \
81 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
82 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
83 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
84 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
85),
86
87/* Lower
88 * ,-----------------------------------------------------------------------------------.
89 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
90 * |------+------+------+------+------+-------------+------+------+------+------+------|
91 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
92 * |------+------+------+------+------+------|------+------+------+------+------+------|
93 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
94 * |------+------+------+------+------+------+------+------+------+------+------+------|
95 * | | | | | | | | Next | Vol- | Vol+ | Play |
96 * `-----------------------------------------------------------------------------------'
97 */
98[_LOWER] = KEYMAP( \
99 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
100 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
101 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
102 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
103),
104
105/* Raise
106 * ,-----------------------------------------------------------------------------------.
107 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
108 * |------+------+------+------+------+-------------+------+------+------+------+------|
109 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
110 * |------+------+------+------+------+------|------+------+------+------+------+------|
111 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
112 * |------+------+------+------+------+------+------+------+------+------+------+------|
113 * | | | | | | | | Next | Vol- | Vol+ | Play |
114 * `-----------------------------------------------------------------------------------'
115 */
116[_RAISE] = KEYMAP( \
117 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
118 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
119 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
120 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
121),
122
123/* Adjust (Lower + Raise)
124 * ,-----------------------------------------------------------------------------------.
125 * | | Reset| | | | | | | | | | Del |
126 * |------+------+------+------+------+-------------+------+------+------+------+------|
127 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
128 * |------+------+------+------+------+------|------+------+------+------+------+------|
129 * | | | | | | | | | | | | |
130 * |------+------+------+------+------+------+------+------+------+------+------+------|
131 * | | | | | | | | | | | |
132 * `-----------------------------------------------------------------------------------'
133 */
134[_ADJUST] = KEYMAP( \
135 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
136 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
137 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
138 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
139)
140
141
142};
143
144#ifdef AUDIO_ENABLE
145float tone_qwerty[][2] = SONG(QWERTY_SOUND);
146float tone_dvorak[][2] = SONG(DVORAK_SOUND);
147float tone_colemak[][2] = SONG(COLEMAK_SOUND);
148#endif
149
150void persistant_default_layer_set(uint16_t default_layer) {
151 eeconfig_update_default_layer(default_layer);
152 default_layer_set(default_layer);
153}
154
155bool process_record_user(uint16_t keycode, keyrecord_t *record) {
156 switch (keycode) {
157 case QWERTY:
158 if (record->event.pressed) {
159 #ifdef AUDIO_ENABLE
160 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
161 #endif
162 persistant_default_layer_set(1UL<<_QWERTY);
163 }
164 return false;
165 break;
166 case COLEMAK:
167 if (record->event.pressed) {
168 #ifdef AUDIO_ENABLE
169 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
170 #endif
171 persistant_default_layer_set(1UL<<_COLEMAK);
172 }
173 return false;
174 break;
175 case DVORAK:
176 if (record->event.pressed) {
177 #ifdef AUDIO_ENABLE
178 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
179 #endif
180 persistant_default_layer_set(1UL<<_DVORAK);
181 }
182 return false;
183 break;
184 case LOWER:
185 if (record->event.pressed) {
186 layer_on(_LOWER);
187 update_tri_layer(_LOWER, _RAISE, _ADJUST);
188 } else {
189 layer_off(_LOWER);
190 update_tri_layer(_LOWER, _RAISE, _ADJUST);
191 }
192 return false;
193 break;
194 case RAISE:
195 if (record->event.pressed) {
196 layer_on(_RAISE);
197 update_tri_layer(_LOWER, _RAISE, _ADJUST);
198 } else {
199 layer_off(_RAISE);
200 update_tri_layer(_LOWER, _RAISE, _ADJUST);
201 }
202 return false;
203 break;
204 case ADJUST:
205 if (record->event.pressed) {
206 layer_on(_ADJUST);
207 } else {
208 layer_off(_ADJUST);
209 }
210 return false;
211 break;
212 }
213 return true;
214} \ No newline at end of file
diff --git a/keyboards/lets_split/lets_split.c b/keyboards/lets_split/lets_split.c
index fe2d4bc19..8bb33f951 100644
--- a/keyboards/lets_split/lets_split.c
+++ b/keyboards/lets_split/lets_split.c
@@ -1,3 +1,6 @@
1#include "lets_split.h" 1#include "lets_split.h"
2 2
3<<<<<<< HEAD
4=======
3 5
6>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
diff --git a/keyboards/lets_split/matrix.c b/keyboards/lets_split/matrix.c
index 1d768c59b..138969004 100644
--- a/keyboards/lets_split/matrix.c
+++ b/keyboards/lets_split/matrix.c
@@ -28,14 +28,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
28#include "debug.h" 28#include "debug.h"
29#include "util.h" 29#include "util.h"
30#include "matrix.h" 30#include "matrix.h"
31#include "i2c.h"
32#include "serial.h"
33#include "split_util.h" 31#include "split_util.h"
34#include "pro_micro.h" 32#include "pro_micro.h"
35#include "config.h" 33#include "config.h"
36 34
35#ifdef USE_I2C
36# include "i2c.h"
37#else // USE_SERIAL
38# include "serial.h"
39#endif
40
37#ifndef DEBOUNCE 41#ifndef DEBOUNCE
38# define DEBOUNCE 5 42# define DEBOUNCE 5
39#endif 43#endif
40 44
41#define ERROR_DISCONNECT_COUNT 5 45#define ERROR_DISCONNECT_COUNT 5
@@ -145,6 +149,8 @@ uint8_t _matrix_scan(void)
145 return 1; 149 return 1;
146} 150}
147 151
152#ifdef USE_I2C
153
148// Get rows from other half over i2c 154// Get rows from other half over i2c
149int i2c_transaction(void) { 155int i2c_transaction(void) {
150 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; 156 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
@@ -176,7 +182,8 @@ i2c_error: // the cable is disconnceted, or something else went wrong
176 return 0; 182 return 0;
177} 183}
178 184
179#ifndef USE_I2C 185#else // USE_SERIAL
186
180int serial_transaction(void) { 187int serial_transaction(void) {
181 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; 188 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
182 189
@@ -199,7 +206,7 @@ uint8_t matrix_scan(void)
199 206
200#ifdef USE_I2C 207#ifdef USE_I2C
201 if( i2c_transaction() ) { 208 if( i2c_transaction() ) {
202#else 209#else // USE_SERIAL
203 if( serial_transaction() ) { 210 if( serial_transaction() ) {
204#endif 211#endif
205 // turn on the indicator led when halves are disconnected 212 // turn on the indicator led when halves are disconnected
@@ -235,7 +242,7 @@ void matrix_slave_scan(void) {
235 /* i2c_slave_buffer[i] = matrix[offset+i]; */ 242 /* i2c_slave_buffer[i] = matrix[offset+i]; */
236 i2c_slave_buffer[i] = matrix[offset+i]; 243 i2c_slave_buffer[i] = matrix[offset+i];
237 } 244 }
238#else 245#else // USE_SERIAL
239 for (int i = 0; i < ROWS_PER_HAND; ++i) { 246 for (int i = 0; i < ROWS_PER_HAND; ++i) {
240 serial_slave_buffer[i] = matrix[offset+i]; 247 serial_slave_buffer[i] = matrix[offset+i];
241 } 248 }
@@ -290,7 +297,7 @@ static void init_cols(void)
290static matrix_row_t read_cols(void) 297static matrix_row_t read_cols(void)
291{ 298{
292 matrix_row_t result = 0; 299 matrix_row_t result = 0;
293 for(int x = 0; x < MATRIX_COLS; x++) { 300 for(int x = 0; x < MATRIX_COLS; x++) {
294 result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); 301 result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
295 } 302 }
296 return result; 303 return result;
@@ -298,7 +305,7 @@ static matrix_row_t read_cols(void)
298 305
299static void unselect_rows(void) 306static void unselect_rows(void)
300{ 307{
301 for(int x = 0; x < ROWS_PER_HAND; x++) { 308 for(int x = 0; x < ROWS_PER_HAND; x++) {
302 _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); 309 _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF);
303 _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); 310 _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
304 } 311 }
diff --git a/keyboards/lets_split/pro_micro.h b/keyboards/lets_split/pro_micro.h
index 09e219b7b..f9e7ed75d 100644
--- a/keyboards/lets_split/pro_micro.h
+++ b/keyboards/lets_split/pro_micro.h
@@ -111,18 +111,18 @@ static const uint8_t SCK = 15;
111 111
112// Mapping of analog pins as digital I/O 112// Mapping of analog pins as digital I/O
113// A6-A11 share with digital pins 113// A6-A11 share with digital pins
114static const uint8_t A0 = 18; 114static const uint8_t ADC0 = 18;
115static const uint8_t A1 = 19; 115static const uint8_t ADC1 = 19;
116static const uint8_t A2 = 20; 116static const uint8_t ADC2 = 20;
117static const uint8_t A3 = 21; 117static const uint8_t ADC3 = 21;
118static const uint8_t A4 = 22; 118static const uint8_t ADC4 = 22;
119static const uint8_t A5 = 23; 119static const uint8_t ADC5 = 23;
120static const uint8_t A6 = 24; // D4 120static const uint8_t ADC6 = 24; // D4
121static const uint8_t A7 = 25; // D6 121static const uint8_t ADC7 = 25; // D6
122static const uint8_t A8 = 26; // D8 122static const uint8_t ADC8 = 26; // D8
123static const uint8_t A9 = 27; // D9 123static const uint8_t ADC9 = 27; // D9
124static const uint8_t A10 = 28; // D10 124static const uint8_t ADC10 = 28; // D10
125static const uint8_t A11 = 29; // D12 125static const uint8_t ADC11 = 29; // D12
126 126
127#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) 127#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0))
128#define digitalPinToPCICRbit(p) 0 128#define digitalPinToPCICRbit(p) 0
@@ -220,26 +220,26 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
220 PC, // D5 - PC6 220 PC, // D5 - PC6
221 PD, // D6 - PD7 221 PD, // D6 - PD7
222 PE, // D7 - PE6 222 PE, // D7 - PE6
223 223
224 PB, // D8 - PB4 224 PB, // D8 - PB4
225 PB, // D9 - PB5 225 PB, // D9 - PB5
226 PB, // D10 - PB6 226 PB, // D10 - PB6
227 PB, // D11 - PB7 227 PB, // D11 - PB7
228 PD, // D12 - PD6 228 PD, // D12 - PD6
229 PC, // D13 - PC7 229 PC, // D13 - PC7
230 230
231 PB, // D14 - MISO - PB3 231 PB, // D14 - MISO - PB3
232 PB, // D15 - SCK - PB1 232 PB, // D15 - SCK - PB1
233 PB, // D16 - MOSI - PB2 233 PB, // D16 - MOSI - PB2
234 PB, // D17 - SS - PB0 234 PB, // D17 - SS - PB0
235 235
236 PF, // D18 - A0 - PF7 236 PF, // D18 - A0 - PF7
237 PF, // D19 - A1 - PF6 237 PF, // D19 - A1 - PF6
238 PF, // D20 - A2 - PF5 238 PF, // D20 - A2 - PF5
239 PF, // D21 - A3 - PF4 239 PF, // D21 - A3 - PF4
240 PF, // D22 - A4 - PF1 240 PF, // D22 - A4 - PF1
241 PF, // D23 - A5 - PF0 241 PF, // D23 - A5 - PF0
242 242
243 PD, // D24 - PD5 243 PD, // D24 - PD5
244 PD, // D25 / D6 - A7 - PD7 244 PD, // D25 / D6 - A7 - PD7
245 PB, // D26 / D8 - A8 - PB4 245 PB, // D26 / D8 - A8 - PB4
@@ -257,26 +257,26 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
257 _BV(6), // D5 - PC6 257 _BV(6), // D5 - PC6
258 _BV(7), // D6 - PD7 258 _BV(7), // D6 - PD7
259 _BV(6), // D7 - PE6 259 _BV(6), // D7 - PE6
260 260
261 _BV(4), // D8 - PB4 261 _BV(4), // D8 - PB4
262 _BV(5), // D9 - PB5 262 _BV(5), // D9 - PB5
263 _BV(6), // D10 - PB6 263 _BV(6), // D10 - PB6
264 _BV(7), // D11 - PB7 264 _BV(7), // D11 - PB7
265 _BV(6), // D12 - PD6 265 _BV(6), // D12 - PD6
266 _BV(7), // D13 - PC7 266 _BV(7), // D13 - PC7
267 267
268 _BV(3), // D14 - MISO - PB3 268 _BV(3), // D14 - MISO - PB3
269 _BV(1), // D15 - SCK - PB1 269 _BV(1), // D15 - SCK - PB1
270 _BV(2), // D16 - MOSI - PB2 270 _BV(2), // D16 - MOSI - PB2
271 _BV(0), // D17 - SS - PB0 271 _BV(0), // D17 - SS - PB0
272 272
273 _BV(7), // D18 - A0 - PF7 273 _BV(7), // D18 - A0 - PF7
274 _BV(6), // D19 - A1 - PF6 274 _BV(6), // D19 - A1 - PF6
275 _BV(5), // D20 - A2 - PF5 275 _BV(5), // D20 - A2 - PF5
276 _BV(4), // D21 - A3 - PF4 276 _BV(4), // D21 - A3 - PF4
277 _BV(1), // D22 - A4 - PF1 277 _BV(1), // D22 - A4 - PF1
278 _BV(0), // D23 - A5 - PF0 278 _BV(0), // D23 - A5 - PF0
279 279
280 _BV(5), // D24 - PD5 280 _BV(5), // D24 - PD5
281 _BV(7), // D25 / D6 - A7 - PD7 281 _BV(7), // D25 / D6 - A7 - PD7
282 _BV(4), // D26 / D8 - A8 - PB4 282 _BV(4), // D26 / D8 - A8 - PB4
@@ -286,24 +286,24 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
286}; 286};
287 287
288const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { 288const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
289 NOT_ON_TIMER, 289 NOT_ON_TIMER,
290 NOT_ON_TIMER, 290 NOT_ON_TIMER,
291 NOT_ON_TIMER, 291 NOT_ON_TIMER,
292 TIMER0B, /* 3 */ 292 TIMER0B, /* 3 */
293 NOT_ON_TIMER, 293 NOT_ON_TIMER,
294 TIMER3A, /* 5 */ 294 TIMER3A, /* 5 */
295 TIMER4D, /* 6 */ 295 TIMER4D, /* 6 */
296 NOT_ON_TIMER, 296 NOT_ON_TIMER,
297 297
298 NOT_ON_TIMER, 298 NOT_ON_TIMER,
299 TIMER1A, /* 9 */ 299 TIMER1A, /* 9 */
300 TIMER1B, /* 10 */ 300 TIMER1B, /* 10 */
301 TIMER0A, /* 11 */ 301 TIMER0A, /* 11 */
302 302
303 NOT_ON_TIMER, 303 NOT_ON_TIMER,
304 TIMER4A, /* 13 */ 304 TIMER4A, /* 13 */
305 305
306 NOT_ON_TIMER, 306 NOT_ON_TIMER,
307 NOT_ON_TIMER, 307 NOT_ON_TIMER,
308 NOT_ON_TIMER, 308 NOT_ON_TIMER,
309 NOT_ON_TIMER, 309 NOT_ON_TIMER,
@@ -324,11 +324,11 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
324 324
325const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { 325const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
326 7, // A0 PF7 ADC7 326 7, // A0 PF7 ADC7
327 6, // A1 PF6 ADC6 327 6, // A1 PF6 ADC6
328 5, // A2 PF5 ADC5 328 5, // A2 PF5 ADC5
329 4, // A3 PF4 ADC4 329 4, // A3 PF4 ADC4
330 1, // A4 PF1 ADC1 330 1, // A4 PF1 ADC1
331 0, // A5 PF0 ADC0 331 0, // A5 PF0 ADC0
332 8, // A6 D4 PD4 ADC8 332 8, // A6 D4 PD4 ADC8
333 10, // A7 D6 PD7 ADC10 333 10, // A7 D6 PD7 ADC10
334 11, // A8 D8 PB4 ADC11 334 11, // A8 D8 PB4 ADC11
diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md
index 73fdb0f78..6e296737a 100644
--- a/keyboards/lets_split/readme.md
+++ b/keyboards/lets_split/readme.md
@@ -100,3 +100,16 @@ half to a computer by USB the keyboard will use QWERTY and Colemak when the
100right half is connected. 100right half is connected.
101 101
102 102
103Notes on Using Pro Micro 3.3V
104-----------------------------
105
106Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects
107the frequency on the 3.3V board.
108
109Also, if the slave board is producing weird characters in certain columns,
110update the following line in `matrix.c` to the following:
111
112```
113// _delay_us(30); // without this wait read unstable value.
114_delay_us(300); // without this wait read unstable value.
115```
diff --git a/keyboards/lets_split/rev1/Makefile b/keyboards/lets_split/rev1/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/lets_split/rev1/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h
index b609ada07..da5b47673 100644
--- a/keyboards/lets_split/rev1/config.h
+++ b/keyboards/lets_split/rev1/config.h
@@ -25,7 +25,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
25#define PRODUCT_ID 0x3060 25#define PRODUCT_ID 0x3060
26#define DEVICE_VER 0x0001 26#define DEVICE_VER 0x0001
27#define MANUFACTURER Wootpatoot 27#define MANUFACTURER Wootpatoot
28<<<<<<< HEAD
29#define PRODUCT Lets Split
30=======
28#define PRODUCT Lets Split v1 31#define PRODUCT Lets Split v1
32>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
29#define DESCRIPTION A split keyboard for the cheap makers 33#define DESCRIPTION A split keyboard for the cheap makers
30 34
31/* key matrix size */ 35/* key matrix size */
@@ -41,6 +45,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
41 45
42// #define USE_I2C 46// #define USE_I2C
43 47
48<<<<<<< HEAD
49// Use serial if not using I2C
50#ifndef USE_I2C
51# define USE_SERIAL
52#endif
53
54=======
55>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
44// #define EE_HANDS 56// #define EE_HANDS
45 57
46#define I2C_MASTER_LEFT 58#define I2C_MASTER_LEFT
@@ -69,10 +81,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
69) 81)
70 82
71/* ws2812 RGB LED */ 83/* ws2812 RGB LED */
84<<<<<<< HEAD
85#define RGB_DI_PIN D4
86#define RGBLIGHT_TIMER
87#define RGBLED_NUM 8 // Number of LEDs
88=======
72#define ws2812_PORTREG PORTD 89#define ws2812_PORTREG PORTD
73#define ws2812_DDRREG DDRD 90#define ws2812_DDRREG DDRD
74#define ws2812_pin PD1 91#define ws2812_pin PD1
75#define RGBLED_NUM 28 // Number of LEDs 92#define RGBLED_NUM 28 // Number of LEDs
93>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
76#define RGBLIGHT_HUE_STEP 10 94#define RGBLIGHT_HUE_STEP 10
77#define RGBLIGHT_SAT_STEP 17 95#define RGBLIGHT_SAT_STEP 17
78#define RGBLIGHT_VAL_STEP 17 96#define RGBLIGHT_VAL_STEP 17
@@ -95,4 +113,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
95//#define NO_ACTION_MACRO 113//#define NO_ACTION_MACRO
96//#define NO_ACTION_FUNCTION 114//#define NO_ACTION_FUNCTION
97 115
98#endif \ No newline at end of file 116<<<<<<< HEAD
117#endif
118=======
119#endif
120>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
diff --git a/keyboards/lets_split/rev1/rev1.c b/keyboards/lets_split/rev1/rev1.c
index 574c116a7..41dd1e353 100644
--- a/keyboards/lets_split/rev1/rev1.c
+++ b/keyboards/lets_split/rev1/rev1.c
@@ -24,7 +24,15 @@ void matrix_init_kb(void) {
24}; 24};
25 25
26void shutdown_user(void) { 26void shutdown_user(void) {
27<<<<<<< HEAD
28 #ifdef AUDIO_ENABLE
29 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
30 _delay_ms(150);
31 stop_all_notes();
32 #endif
33=======
27 PLAY_NOTE_ARRAY(tone_goodbye, false, 0); 34 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
28 _delay_ms(150); 35 _delay_ms(150);
29 stop_all_notes(); 36 stop_all_notes();
37>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
30} 38}
diff --git a/keyboards/lets_split/rev1/rev1.h b/keyboards/lets_split/rev1/rev1.h
index 04fe0ddeb..998b2be7c 100644
--- a/keyboards/lets_split/rev1/rev1.h
+++ b/keyboards/lets_split/rev1/rev1.h
@@ -1,9 +1,15 @@
1#ifndef REV1_H 1#ifndef REV1_H
2#define REV1_H 2#define REV1_H
3 3
4<<<<<<< HEAD
5#include "../lets_split.h"
6
7//void promicro_bootloader_jmp(bool program);
8=======
4#include "quantum.h" 9#include "quantum.h"
5 10
6void promicro_bootloader_jmp(bool program); 11void promicro_bootloader_jmp(bool program);
12>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
7 13
8#define KEYMAP( \ 14#define KEYMAP( \
9 k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ 15 k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
diff --git a/keyboards/lets_split/rev1/rules.mk b/keyboards/lets_split/rev1/rules.mk
new file mode 100644
index 000000000..a0825b4ef
--- /dev/null
+++ b/keyboards/lets_split/rev1/rules.mk
@@ -0,0 +1,5 @@
1BACKLIGHT_ENABLE = no
2
3ifndef QUANTUM_DIR
4 include ../../../Makefile
5endif \ No newline at end of file
diff --git a/keyboards/lets_split/rev2/Makefile b/keyboards/lets_split/rev2/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/lets_split/rev2/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h
index bf618704c..19c137e56 100644
--- a/keyboards/lets_split/rev2/config.h
+++ b/keyboards/lets_split/rev2/config.h
@@ -41,6 +41,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
41 41
42// #define USE_I2C 42// #define USE_I2C
43 43
44<<<<<<< HEAD
45// Use serial if not using I2C
46#ifndef USE_I2C
47# define USE_SERIAL
48#endif
49
50=======
51>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
44// #define EE_HANDS 52// #define EE_HANDS
45 53
46#define I2C_MASTER_LEFT 54#define I2C_MASTER_LEFT
@@ -69,10 +77,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
69) 77)
70 78
71/* ws2812 RGB LED */ 79/* ws2812 RGB LED */
80<<<<<<< HEAD
81#define RGB_DI_PIN D3
82#define RGBLIGHT_TIMER
83#define RGBLED_NUM 12 // Number of LEDs
84=======
72#define ws2812_PORTREG PORTD 85#define ws2812_PORTREG PORTD
73#define ws2812_DDRREG DDRD 86#define ws2812_DDRREG DDRD
74#define ws2812_pin PD1 87#define ws2812_pin PD1
75#define RGBLED_NUM 28 // Number of LEDs 88#define RGBLED_NUM 28 // Number of LEDs
89>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
76#define RGBLIGHT_HUE_STEP 10 90#define RGBLIGHT_HUE_STEP 10
77#define RGBLIGHT_SAT_STEP 17 91#define RGBLIGHT_SAT_STEP 17
78#define RGBLIGHT_VAL_STEP 17 92#define RGBLIGHT_VAL_STEP 17
@@ -95,4 +109,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
95//#define NO_ACTION_MACRO 109//#define NO_ACTION_MACRO
96//#define NO_ACTION_FUNCTION 110//#define NO_ACTION_FUNCTION
97 111
98#endif \ No newline at end of file 112<<<<<<< HEAD
113#endif
114=======
115#endif
116>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
diff --git a/keyboards/lets_split/rev2/rev2.c b/keyboards/lets_split/rev2/rev2.c
index 574c116a7..41dd1e353 100644
--- a/keyboards/lets_split/rev2/rev2.c
+++ b/keyboards/lets_split/rev2/rev2.c
@@ -24,7 +24,15 @@ void matrix_init_kb(void) {
24}; 24};
25 25
26void shutdown_user(void) { 26void shutdown_user(void) {
27<<<<<<< HEAD
28 #ifdef AUDIO_ENABLE
29 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
30 _delay_ms(150);
31 stop_all_notes();
32 #endif
33=======
27 PLAY_NOTE_ARRAY(tone_goodbye, false, 0); 34 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
28 _delay_ms(150); 35 _delay_ms(150);
29 stop_all_notes(); 36 stop_all_notes();
37>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
30} 38}
diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h
index 2a2246f05..9e251ca57 100644
--- a/keyboards/lets_split/rev2/rev2.h
+++ b/keyboards/lets_split/rev2/rev2.h
@@ -1,9 +1,15 @@
1#ifndef REV2_H 1#ifndef REV2_H
2#define REV2_H 2#define REV2_H
3 3
4<<<<<<< HEAD
5#include "../lets_split.h"
6
7//void promicro_bootloader_jmp(bool program);
8=======
4#include "quantum.h" 9#include "quantum.h"
5 10
6void promicro_bootloader_jmp(bool program); 11void promicro_bootloader_jmp(bool program);
12>>>>>>> bce6e52391da7c5f620c96a91857940f0dee19df
7 13
8#define KEYMAP( \ 14#define KEYMAP( \
9 k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ 15 k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \
diff --git a/keyboards/lets_split/rev2/rules.mk b/keyboards/lets_split/rev2/rules.mk
new file mode 100644
index 000000000..80a942d06
--- /dev/null
+++ b/keyboards/lets_split/rev2/rules.mk
@@ -0,0 +1,5 @@
1BACKLIGHT_ENABLE = no
2
3ifndef QUANTUM_DIR
4 include ../../../Makefile
5endif
diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk
new file mode 100644
index 000000000..1aee5313c
--- /dev/null
+++ b/keyboards/lets_split/rules.mk
@@ -0,0 +1,75 @@
1SRC += matrix.c \
2 i2c.c \
3 split_util.c \
4 serial.c
5
6# MCU name
7#MCU = at90usb1287
8MCU = atmega32u4
9
10# Processor frequency.
11# This will define a symbol, F_CPU, in all source code files equal to the
12# processor frequency in Hz. You can then use this symbol in your source code to
13# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
14# automatically to create a 32-bit value in your source code.
15#
16# This will be an integer division of F_USB below, as it is sourced by
17# F_USB after it has run through any CPU prescalers. Note that this value
18# does not *change* the processor frequency - it should merely be updated to
19# reflect the processor speed set externally so that the code can use accurate
20# software delays.
21F_CPU = 16000000
22
23#
24# LUFA specific
25#
26# Target architecture (see library "Board Types" documentation).
27ARCH = AVR8
28
29# Input clock frequency.
30# This will define a symbol, F_USB, in all source code files equal to the
31# input clock frequency (before any prescaling is performed) in Hz. This value may
32# differ from F_CPU if prescaling is used on the latter, and is required as the
33# raw input clock is fed directly to the PLL sections of the AVR for high speed
34# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
35# at the end, this will be done automatically to create a 32-bit value in your
36# source code.
37#
38# If no clock division is performed on the input clock inside the AVR (via the
39# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
40F_USB = $(F_CPU)
41
42# Interrupt driven control endpoint task(+60)
43OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
44
45
46# Boot Section Size in *bytes*
47# Teensy halfKay 512
48# Teensy++ halfKay 1024
49# Atmel DFU loader 4096
50# LUFA bootloader 4096
51# USBaspLoader 2048
52OPT_DEFS += -DBOOTLOADER_SIZE=4096
53
54# Build Options
55# change to "no" to disable the options, or define them in the Makefile in
56# the appropriate keymap folder that will get included automatically
57#
58BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
59MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
60EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
61CONSOLE_ENABLE ?= no # Console for debug(+400)
62COMMAND_ENABLE ?= yes # Commands for debug and configuration
63NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
64BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
65MIDI_ENABLE ?= no # MIDI controls
66AUDIO_ENABLE ?= no # Audio output on port C6
67UNICODE_ENABLE ?= no # Unicode
68BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
69RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
70SUBPROJECT_rev1 ?= yes
71USE_I2C ?= yes
72# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
73SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
74
75CUSTOM_MATRIX = yes
diff --git a/keyboards/lets_split/serial.c b/keyboards/lets_split/serial.c
index f439c2f20..6faed09ce 100644
--- a/keyboards/lets_split/serial.c
+++ b/keyboards/lets_split/serial.c
@@ -10,9 +10,10 @@
10#include <avr/interrupt.h> 10#include <avr/interrupt.h>
11#include <util/delay.h> 11#include <util/delay.h>
12#include <stdbool.h> 12#include <stdbool.h>
13
14#include "serial.h" 13#include "serial.h"
15 14
15#ifdef USE_SERIAL
16
16// Serial pulse period in microseconds. Its probably a bad idea to lower this 17// Serial pulse period in microseconds. Its probably a bad idea to lower this
17// value. 18// value.
18#define SERIAL_DELAY 24 19#define SERIAL_DELAY 24
@@ -223,3 +224,5 @@ int serial_update_buffers(void) {
223 sei(); 224 sei();
224 return 0; 225 return 0;
225} 226}
227
228#endif
diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c
index 65003a71a..461921798 100644
--- a/keyboards/lets_split/split_util.c
+++ b/keyboards/lets_split/split_util.c
@@ -6,11 +6,15 @@
6#include <avr/eeprom.h> 6#include <avr/eeprom.h>
7#include "split_util.h" 7#include "split_util.h"
8#include "matrix.h" 8#include "matrix.h"
9#include "i2c.h"
10#include "serial.h"
11#include "keyboard.h" 9#include "keyboard.h"
12#include "config.h" 10#include "config.h"
13 11
12#ifdef USE_I2C
13# include "i2c.h"
14#else
15# include "serial.h"
16#endif
17
14volatile bool isLeftHand = true; 18volatile bool isLeftHand = true;
15 19
16static void setup_handedness(void) { 20static void setup_handedness(void) {