]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
5x5bt (#4333)
authorwanleg <32079073+wanleg@users.noreply.github.com>
Sat, 3 Nov 2018 17:39:40 +0000 (10:39 -0700)
committerDrashna Jaelre <drashna@live.com>
Sat, 3 Nov 2018 17:39:40 +0000 (10:39 -0700)
* got bluetooth working

* get rid of description on bluetooth

* get rid of commented code used for testing

* Update config.h

layouts/community/ortho_4x12/wanleg/config.h
layouts/community/ortho_5x15/wanleg/config.h
layouts/community/ortho_5x15/wanleg/keymap.c
layouts/community/ortho_5x15/wanleg/rules.mk
users/wanleg/rules.mk

index 2444b8b9761781b019f521a158acacd486a16bb1..2b2072db2214ddcb1f8d7a40e4a2829132cb4ee4 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
 
 //QMK DFU settings (ProMicro boards with QMK bootloader)
 // set top left key as bootloader mode escape key on Lets Split rev2
 
 //QMK DFU settings (ProMicro boards with QMK bootloader)
 // set top left key as bootloader mode escape key on Lets Split rev2
@@ -30,8 +29,6 @@
 #undef MATRIX_ROW_PINS
 #undef MATRIX_COL_PINS
 #define MATRIX_ROW_PINS { D1, D0, D4, C6 }
 #undef MATRIX_ROW_PINS
 #undef MATRIX_COL_PINS
 #define MATRIX_ROW_PINS { D1, D0, D4, C6 }
-//last 4 elements of the column array are are not broken out on a ProMicro (included only to preserve array structure)
+//last 4 elements of the column array are not broken out on a ProMicro (included only to preserve array structure)
 #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7, F0, B7, D6, F1 }
 #endif
 #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7, F0, B7, D6, F1 }
 #endif
-
-#endif
index 1043986f7a66fe1fe36a19e2acc522a0fb0213cf..1aeda2db4e166f1e685ab92ed398a2e9e3f5eade 100644 (file)
@@ -1,8 +1,16 @@
 #pragma once
 
 #pragma once
 
-// set top left key as bootloader mode escape key on 5x5 75key layout
-#if defined(KEYBOARD_5x5) && !defined(PRO_MICRO)
-#define QMK_LED B0
-#define QMK_ESC_OUTPUT D7 // usually COL
-#define QMK_ESC_INPUT B2 // usually ROW
-#endif
\ No newline at end of file
+//5x5 powered by Adafruit Feather 32u4 Bluefruit LE
+#if defined(KEYBOARD_5x5) && defined(BLUEFRUIT)
+
+//need to undefine standard 5x5 array before defining alternate Bluefruit array
+#undef MATRIX_ROW_PINS
+#undef MATRIX_COL_PINS
+#define MATRIX_ROW_PINS { F7, F6, F5, D1, D0 }
+//last 5 elements not tested
+#define MATRIX_COL_PINS { C6, D7, B5, B6, B7, D6, C7, F0, F1, F4, B1, B2, B3, D2, D3 }
+
+//get rid of description - too long to show properly in Windows
+#undef DESCRIPTION
+#define DESCRIPTION 
+#endif
index df74241157055fcf1ab2286c94be30b16bfd7496..66b3ce018dcee20f53084a4a6967eb3a4b59a186 100644 (file)
@@ -15,14 +15,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   TD(RST_TAP_DANCE), GHERKIN50, KC_LALT, NUMPAD, NUMBER75, ETCETERA75, KC_SPC,DIRECTION75, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL, KC_KP_0, KC_KP_0, KC_KP_DOT
 ),
 
   TD(RST_TAP_DANCE), GHERKIN50, KC_LALT, NUMPAD, NUMBER75, ETCETERA75, KC_SPC,DIRECTION75, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL, KC_KP_0, KC_KP_0, KC_KP_DOT
 ),
 
-[PAD] = LAYOUT_ortho_5x5_wrapper(
-  _______, _______, _______, _______, _______,
-  _______________NUMPAD_Row__0_______________, _______,
-  _______________NUMPAD_Row__1_______________, _______,
-  _______________NUMPAD_Row__2_______________, _______,
-  KC_KP_0, TD(LYR50_TAP_DANCE), KC_KP_DOT, KC_PMNS, _______
-),
-
 [GK50] = LAYOUT_ortho_5x10_wrapper(
   KC_ESC,    _______, _______, _______, _______, _______, _______, _______, _______,    KC_BSPC,
   _______________Gherkin_Row_0_______________,
 [GK50] = LAYOUT_ortho_5x10_wrapper(
   KC_ESC,    _______, _______, _______, _______, _______, _______, _______, _______,    KC_BSPC,
   _______________Gherkin_Row_0_______________,
@@ -31,6 +23,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   TD(RST_TAP_DANCE), GHERKIN75, NUMPAD, gNUMBER, gETCETERA, KC_SPC,gDIRECTION, KC_RGUI, KC_RALT, KC_RGUI
 ),
 
   TD(RST_TAP_DANCE), GHERKIN75, NUMPAD, gNUMBER, gETCETERA, KC_SPC,gDIRECTION, KC_RGUI, KC_RALT, KC_RGUI
 ),
 
+#if defined(BLUEFRUIT)
+[PAD] = LAYOUT_ortho_5x5_wrapper(
+  _______, _______, _______, OUT_BT, OUT_USB,
+  _______________NUMPAD_Row__0_______________, _______,
+  _______________NUMPAD_Row__1_______________, _______,
+  _______________NUMPAD_Row__2_______________, _______,
+  KC_KP_0, TD(LYR50_TAP_DANCE), KC_KP_DOT, KC_PMNS, _______
+),
+#else
+ [PAD] = LAYOUT_ortho_5x5_wrapper(
+  _______, _______, _______, _______, _______,
+  _______________NUMPAD_Row__0_______________, _______,
+  _______________NUMPAD_Row__1_______________, _______,
+  _______________NUMPAD_Row__2_______________, _______,
+  KC_KP_0, TD(LYR50_TAP_DANCE), KC_KP_DOT, KC_PMNS, _______
+),
+#endif
 #else
  /* Gherkin 75
  * .--------------------------------------------------------------------------------------------------------------------------------------.
 #else
  /* Gherkin 75
  * .--------------------------------------------------------------------------------------------------------------------------------------.
index e36226fb2eef048e47ab8d9e50b29e3a639a845e..bfc4c69d99ad56731fe83a999f585496dc9c4d47 100644 (file)
@@ -1 +1,8 @@
-SWAP_HANDS_ENABLE = no
\ No newline at end of file
+ifeq (,$(findstring yes,$(BLUEFRUIT)))
+  BLUETOOTH = AdafruitBLE
+  BLUETOOTH_ENABLE = yes
+  F_CPU = 8000000
+  CONSOLE_ENABLE = no          # Console for debug(+400)
+  COMMAND_ENABLE = no          # Commands for debug and configuration
+  RGBLIGHT_ENABLE = no        # Enable keyboard RGB underglow
+endif
\ No newline at end of file
index 2a2a65cfea5c5810671cd0e992ab810e9eed79bc..e3e802b4a7a4201d5b0fd9354dc7166423f4ffcd 100644 (file)
@@ -14,3 +14,9 @@ endif
 ifeq ($(strip $(PM)), yes)
        OPT_DEFS += -DPRO_MICRO
 endif
 ifeq ($(strip $(PM)), yes)
        OPT_DEFS += -DPRO_MICRO
 endif
+
+#use alternate settings for boards using "Adafruit Feather 32u4 Bluefruit LE" instead of Micro
+#example usage: make 5x5:wanleg BT=yes
+ifeq ($(strip $(BT)), yes)
+       OPT_DEFS += -DBLUEFRUIT
+endif
\ No newline at end of file