aboutsummaryrefslogtreecommitdiff
path: root/keyboards/lets_split_eh
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2019-08-15 22:01:34 +0100
committerGitHub <noreply@github.com>2019-08-15 22:01:34 +0100
commitfadb69e2031a259248dd575384da8846ba0c2aa3 (patch)
treed7e7d80b62db0044af127c69b8b90ea6d489b0cc /keyboards/lets_split_eh
parentee8d9bd40ad4f5b8d23be951d652143582d42938 (diff)
downloadqmk_firmware-fadb69e2031a259248dd575384da8846ba0c2aa3.tar.gz
qmk_firmware-fadb69e2031a259248dd575384da8846ba0c2aa3.zip
Refactor of lets_split_eh to enable RGB split animations (#6411)
Diffstat (limited to 'keyboards/lets_split_eh')
-rw-r--r--keyboards/lets_split_eh/config.h8
-rw-r--r--keyboards/lets_split_eh/eh/config.h18
-rw-r--r--keyboards/lets_split_eh/eh/eh.c13
-rw-r--r--keyboards/lets_split_eh/eh/eh.h5
-rw-r--r--keyboards/lets_split_eh/eh/rules.mk2
-rw-r--r--keyboards/lets_split_eh/keymaps/default/keymap.c24
-rw-r--r--keyboards/lets_split_eh/lets_split_eh.h5
7 files changed, 23 insertions, 52 deletions
diff --git a/keyboards/lets_split_eh/config.h b/keyboards/lets_split_eh/config.h
index 655d35e1a..f07706a83 100644
--- a/keyboards/lets_split_eh/config.h
+++ b/keyboards/lets_split_eh/config.h
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/ 16*/
17 17
18#ifndef CONFIG_H 18#pragma once
19#define CONFIG_H
20 19
21#include "config_common.h" 20#include "config_common.h"
22 21
@@ -35,8 +34,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
35 34
36/* Set 0 if debouncing isn't needed */ 35/* Set 0 if debouncing isn't needed */
37#define DEBOUNCE 5 36#define DEBOUNCE 5
38
39/* serial.c configuration for split keyboard */
40//#define SOFT_SERIAL_PIN D0
41
42#endif
diff --git a/keyboards/lets_split_eh/eh/config.h b/keyboards/lets_split_eh/eh/config.h
index 59afb39c0..43e026650 100644
--- a/keyboards/lets_split_eh/eh/config.h
+++ b/keyboards/lets_split_eh/eh/config.h
@@ -16,13 +16,7 @@ You should have received a copy of the GNU General Public License
16along with this program. If not, see <http://www.gnu.org/licenses/>. 16along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
18 18
19#ifndef EH_CONFIG_H 19#pragma once
20#define EH_CONFIG_H
21
22// To let configuration know this is of type EH, which will force I2C irregardless of user config
23#define EH
24// The 'EH' only uses I2C
25#define USE_I2C
26 20
27#include "config_common.h" 21#include "config_common.h"
28 22
@@ -40,10 +34,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
40 34
41/* ws2812 RGB LED */ 35/* ws2812 RGB LED */
42#define RGB_DI_PIN B2 36#define RGB_DI_PIN B2
43#define RGBLED_NUM 6 // Number of LEDs (each hand) 37#define RGBLED_NUM 12 // Number of LEDs (each hand)
38#define RGBLED_SPLIT { 6, 6 }
39#define RGBLIGHT_ANIMATIONS
44 40
45/* Split Defines */ 41/* Split Defines */
46#define SPLIT_HAND_PIN D3 42#define SPLIT_HAND_PIN D3
43#define SOFT_SERIAL_PIN D0
47 44
48#endif 45// The 'EH' has previously forced use of I2C so this default has been kept
49 46// however users can undef to use serial
47#define USE_I2C
diff --git a/keyboards/lets_split_eh/eh/eh.c b/keyboards/lets_split_eh/eh/eh.c
index e748d3ae0..d5a312085 100644
--- a/keyboards/lets_split_eh/eh/eh.c
+++ b/keyboards/lets_split_eh/eh/eh.c
@@ -1,14 +1 @@
1#include "lets_split_eh.h" #include "lets_split_eh.h"
2
3void matrix_init_kb(void) {
4
5 // JTAG disable for PORT F. write JTD bit twice within four cycles.
6 MCUCR |= (1<<JTD);
7 MCUCR |= (1<<JTD);
8
9 // Undo init of RX LED, we use that port currently
10 // DDRB &= ~(1<<0);
11
12 matrix_init_user();
13};
14
diff --git a/keyboards/lets_split_eh/eh/eh.h b/keyboards/lets_split_eh/eh/eh.h
index 7dc84fe18..ff3722978 100644
--- a/keyboards/lets_split_eh/eh/eh.h
+++ b/keyboards/lets_split_eh/eh/eh.h
@@ -1,5 +1,4 @@
1#ifndef EH_H 1#pragma once
2#define EH_H
3 2
4#include "lets_split_eh.h" 3#include "lets_split_eh.h"
5 4
@@ -23,5 +22,3 @@
23 } 22 }
24 23
25#define LAYOUT_ortho_4x12 LAYOUT 24#define LAYOUT_ortho_4x12 LAYOUT
26
27#endif
diff --git a/keyboards/lets_split_eh/eh/rules.mk b/keyboards/lets_split_eh/eh/rules.mk
index 4bac58533..c0f8760d8 100644
--- a/keyboards/lets_split_eh/eh/rules.mk
+++ b/keyboards/lets_split_eh/eh/rules.mk
@@ -1,4 +1,4 @@
1BOOTLOADER = atmel-dfu 1BOOTLOADER = atmel-dfu
2 2
3BACKLIGHT_ENABLE = yes 3BACKLIGHT_ENABLE = yes
4RGBLIGHT_ENABLE = yes \ No newline at end of file 4RGBLIGHT_ENABLE = yes
diff --git a/keyboards/lets_split_eh/keymaps/default/keymap.c b/keyboards/lets_split_eh/keymaps/default/keymap.c
index 1983459f6..fe5ca0c8c 100644
--- a/keyboards/lets_split_eh/keymaps/default/keymap.c
+++ b/keyboards/lets_split_eh/keymaps/default/keymap.c
@@ -4,11 +4,13 @@
4// The underscores don't mean anything - you can have a layer called STUFF or any other name. 4// The underscores don't mean anything - you can have a layer called STUFF or any other name.
5// Layer names don't all need to be of the same length, obviously, and you can also skip them 5// Layer names don't all need to be of the same length, obviously, and you can also skip them
6// entirely and just use numbers. 6// entirely and just use numbers.
7#define _QWERTY 0 7enum layers {
8#define _LOWER 3 8 _QWERTY,
9#define _RAISE 4 9 _LOWER,
10#define _FUNCTION 15 10 _RAISE,
11#define _ADJUST 16 11 _FUNCTION,
12 _ADJUST,
13};
12 14
13#define LOWER MO(_LOWER) 15#define LOWER MO(_LOWER)
14#define RAISE MO(_RAISE) 16#define RAISE MO(_RAISE)
@@ -77,9 +79,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
77 79
78/* Adjust (Lower + Raise) 80/* Adjust (Lower + Raise)
79 * ,-----------------------------------------------------------------------------------. 81 * ,-----------------------------------------------------------------------------------.
80 * |Taskmg| | | | | | | |RGBVAI|RGBSAI|RGBHUI|caltde| 82 * |Taskmg| | | | | | |RGBMOD|RGBVAI|RGBSAI|RGBHUI|caltde|
81 * |------+------+------+------+------+-------------+------+------+------+------+------| 83 * |------+------+------+------+------+-------------+------+------+------+------+------|
82 * | | | | | | | | |RGBVAD|RGBSAD|RGBHUD|RGBTOG| 84 * | | | | | | | |RGBRMO|RGBVAD|RGBSAD|RGBHUD|RGBTOG|
83 * |------+------+------+------+------+------|------+------+------+------+------+------| 85 * |------+------+------+------+------+------|------+------+------+------+------+------|
84 * | | | | | | | | | | | |BLSTEP| 86 * | | | | | | | | | | | |BLSTEP|
85 * |------+------+------+------+------+------+------+------+------+------+------+------| 87 * |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -87,8 +89,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
87 * `-----------------------------------------------------------------------------------' 89 * `-----------------------------------------------------------------------------------'
88 */ 90 */
89[_ADJUST] = LAYOUT( \ 91[_ADJUST] = LAYOUT( \
90 TSKMGR, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAI, RGB_HUI, CALTDEL, \ 92 TSKMGR, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, CALTDEL, \
91 _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_SAD, RGB_HUD, RGB_TOG, \ 93 _______, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_VAD, RGB_SAD, RGB_HUD, RGB_TOG, \
92 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, \ 94 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, \
93 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET \ 95 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET \
94), 96),
@@ -116,7 +118,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
116uint32_t layer_state_set_user(uint32_t state) { 118uint32_t layer_state_set_user(uint32_t state) {
117 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); 119 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
118} 120}
119
120bool process_record_user(uint16_t keycode, keyrecord_t *record) {
121 return true;
122}
diff --git a/keyboards/lets_split_eh/lets_split_eh.h b/keyboards/lets_split_eh/lets_split_eh.h
index f3d2cd0d0..51828b09b 100644
--- a/keyboards/lets_split_eh/lets_split_eh.h
+++ b/keyboards/lets_split_eh/lets_split_eh.h
@@ -1,5 +1,4 @@
1#ifndef LETS_SPLIT_EH_H 1#pragma once
2#define LETS_SPLIT_EH_H
3 2
4#include "quantum.h" 3#include "quantum.h"
5 4
@@ -23,5 +22,3 @@
23 ) 22 )
24 23
25#define LAYOUT_kc_ortho_4x12 LAYOUT_kc 24#define LAYOUT_kc_ortho_4x12 LAYOUT_kc
26
27#endif