]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Refactor of lets_split_eh to enable RGB split animations (#6411)
authorJoel Challis <git@zvecr.com>
Thu, 15 Aug 2019 21:01:34 +0000 (22:01 +0100)
committerGitHub <noreply@github.com>
Thu, 15 Aug 2019 21:01:34 +0000 (22:01 +0100)
keyboards/lets_split_eh/config.h
keyboards/lets_split_eh/eh/config.h
keyboards/lets_split_eh/eh/eh.c
keyboards/lets_split_eh/eh/eh.h
keyboards/lets_split_eh/eh/rules.mk
keyboards/lets_split_eh/keymaps/default/keymap.c
keyboards/lets_split_eh/lets_split_eh.h

index 655d35e1ab2cd0fcfcf47961d68e040740093ee3..f07706a834dbb0108f95ea9f60233011ab7d78e3 100644 (file)
@@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
 
 #include "config_common.h"
 
@@ -35,8 +34,3 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 /* Set 0 if debouncing isn't needed */
 #define DEBOUNCE 5
-
-/* serial.c configuration for split keyboard */
-//#define SOFT_SERIAL_PIN D0
-
-#endif
index 59afb39c0f732c077412dfab2d094936df32c450..43e0266502253476ec4a6977281f7cac239e4e8f 100644 (file)
@@ -16,13 +16,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#ifndef EH_CONFIG_H
-#define EH_CONFIG_H
-
-// To let configuration know this is of type EH, which will force I2C irregardless of user config
-#define EH
-// The 'EH' only uses I2C
-#define USE_I2C
+#pragma once
 
 #include "config_common.h"
 
@@ -40,10 +34,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 /* ws2812 RGB LED */
 #define RGB_DI_PIN B2
-#define RGBLED_NUM 6    // Number of LEDs (each hand)
+#define RGBLED_NUM 12    // Number of LEDs (each hand)
+#define RGBLED_SPLIT { 6, 6 }
+#define RGBLIGHT_ANIMATIONS 
 
 /* Split Defines */
 #define SPLIT_HAND_PIN D3
+#define SOFT_SERIAL_PIN D0
 
-#endif
-
+// The 'EH' has previously forced use of I2C so this default has been kept
+// however users can undef to use serial
+#define USE_I2C
index e748d3ae053910583063c4f6431b765b1a083c53..d5a312085d1203a941657ebceeb38a7b4243b89c 100644 (file)
@@ -1,14 +1 @@
 #include "lets_split_eh.h"
-
-void matrix_init_kb(void) {
-
-    // JTAG disable for PORT F. write JTD bit twice within four cycles.
-    MCUCR |= (1<<JTD);
-    MCUCR |= (1<<JTD);
-       
-       // Undo init of RX LED, we use that port currently
-       // DDRB &= ~(1<<0);
-       
-       matrix_init_user();
-};
-
index 7dc84fe181a535b1c5a78fa00c229fb8d4de967f..ff37229787d52f29bfc5ba26a835d8b972259bdf 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef EH_H
-#define EH_H
+#pragma once
 
 #include "lets_split_eh.h"
 
@@ -23,5 +22,3 @@
        }
     
 #define LAYOUT_ortho_4x12 LAYOUT
-
-#endif
index 4bac58533e64c77666440a0e5308181013c66e0a..c0f8760d895aec67eeca60edcc4a5b1e839347be 100644 (file)
@@ -1,4 +1,4 @@
 BOOTLOADER = atmel-dfu
 
 BACKLIGHT_ENABLE = yes
-RGBLIGHT_ENABLE = yes
\ No newline at end of file
+RGBLIGHT_ENABLE = yes
index 1983459f683a10777f4b309e058b288e1291c4c5..fe5ca0c8c8237afb91c4af35a55196493c13be24 100644 (file)
@@ -4,11 +4,13 @@
 // The underscores don't mean anything - you can have a layer called STUFF or any other name.
 // Layer names don't all need to be of the same length, obviously, and you can also skip them
 // entirely and just use numbers.
-#define _QWERTY 0
-#define _LOWER 3
-#define _RAISE 4
-#define _FUNCTION 15
-#define _ADJUST 16
+enum layers {
+  _QWERTY,
+  _LOWER,
+  _RAISE,
+  _FUNCTION,
+  _ADJUST,
+};
 
 #define LOWER     MO(_LOWER)
 #define RAISE     MO(_RAISE)
@@ -77,9 +79,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
 /* Adjust (Lower + Raise)
  * ,-----------------------------------------------------------------------------------.
- * |Taskmg|      |      |      |      |      |      |      |RGBVAI|RGBSAI|RGBHUI|caltde|
+ * |Taskmg|      |      |      |      |      |      |RGBMOD|RGBVAI|RGBSAI|RGBHUI|caltde|
  * |------+------+------+------+------+-------------+------+------+------+------+------|
- * |      |      |      |      |      |      |      |      |RGBVAD|RGBSAD|RGBHUD|RGBTOG|
+ * |      |      |      |      |      |      |      |RGBRMO|RGBVAD|RGBSAD|RGBHUD|RGBTOG|
  * |------+------+------+------+------+------|------+------+------+------+------+------|
  * |      |      |      |      |      |      |      |      |      |      |      |BLSTEP|
  * |------+------+------+------+------+------+------+------+------+------+------+------|
@@ -87,8 +89,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  * `-----------------------------------------------------------------------------------'
  */
 [_ADJUST] = LAYOUT( \
-  TSKMGR,  _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAI, RGB_HUI, CALTDEL, \
-  _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_SAD, RGB_HUD, RGB_TOG, \
+  TSKMGR,  _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, CALTDEL, \
+  _______, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_VAD, RGB_SAD, RGB_HUD, RGB_TOG, \
   _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, \
   _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET    \
 ),
@@ -116,7 +118,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 uint32_t layer_state_set_user(uint32_t state) {
   return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
 }
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
-  return true;
-}
index f3d2cd0d06f25bee92d6dc66da38ea5ba690ae47..51828b09badc6b2a561eae02ee3f9dc02885a014 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef LETS_SPLIT_EH_H
-#define LETS_SPLIT_EH_H
+#pragma once
 
 #include "quantum.h"
 
@@ -23,5 +22,3 @@
     )
 
 #define LAYOUT_kc_ortho_4x12 LAYOUT_kc
-
-#endif