From 344ebbac43ef510b29cdcdff2688186ee3ffead7 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 3 Apr 2017 11:32:54 -0400 Subject: [PATCH 1/9] Revert removal of avrdude make option --- keyboards/lets_split/rules.mk | 14 +++++++++++++- keyboards/lets_split/split_util.c | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index ff159e0f06..79860ea35d 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -1,7 +1,7 @@ SRC += matrix.c \ i2c.c \ split_util.c \ - serial.c\ + serial.c \ ssd1306.c # MCU name @@ -74,3 +74,15 @@ USE_I2C ?= yes SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes + +avrdude: build + ls /dev/tty* > /tmp/1; \ + echo "Reset your Pro Micro now"; \ + while [[ -z $$USB ]]; do \ + sleep 1; \ + ls /dev/tty* > /tmp/2; \ + USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ + done; \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex + +.PHONY: avrdude diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c index 46586fbc00..39639c3b4b 100644 --- a/keyboards/lets_split/split_util.c +++ b/keyboards/lets_split/split_util.c @@ -21,7 +21,7 @@ static void setup_handedness(void) { #ifdef EE_HANDS isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); #else - // I2c_MASTER_RIGHT ish deprecate use MASTER_RIGHT instead since this works for both serial and i2c: + // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) isLeftHand = !has_usb(); #else From 48f4c5997bd0e041379f592f3e1e0c306e5a5e4d Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 3 Apr 2017 12:06:28 -0400 Subject: [PATCH 2/9] Move defines for RGB to after the config.h include --- keyboards/lets_split/keymaps/hexwire/config.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/lets_split/keymaps/hexwire/config.h b/keyboards/lets_split/keymaps/hexwire/config.h index 9c8c6d7f40..e5a779f633 100644 --- a/keyboards/lets_split/keymaps/hexwire/config.h +++ b/keyboards/lets_split/keymaps/hexwire/config.h @@ -20,13 +20,6 @@ along with this program. If not, see . #define TAPPING_TERM 150 -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 - #ifdef SUBPROJECT_rev1 #include "../../rev1/config.h" #define COMPACT_KEYMAP( \ @@ -68,3 +61,10 @@ along with this program. If not, see . #ifdef SUBPROJECT_rev2fliphalf #include "../../rev2fliphalf/config.h" #endif + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 From d0cfaba6d2f4ddf6aee7f05408971a0d4712bd60 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 3 Apr 2017 12:15:14 -0400 Subject: [PATCH 3/9] Revise KEYMAP macro to make left and right halves more clear --- keyboards/lets_split/rev1/rev1.h | 24 +++++----- keyboards/lets_split/rev2/rev2.h | 80 ++++++++++++++++---------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/keyboards/lets_split/rev1/rev1.h b/keyboards/lets_split/rev1/rev1.h index 4667c9fb09..6bf9f0f038 100644 --- a/keyboards/lets_split/rev1/rev1.h +++ b/keyboards/lets_split/rev1/rev1.h @@ -9,20 +9,20 @@ //void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ - k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ - k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ - k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ ) \ { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 }, \ - { k40, k41, k42, k43, k44, k45 }, \ - { k50, k51, k52, k53, k54, k55 }, \ - { k60, k61, k62, k63, k64, k65 }, \ - { k70, k71, k72, k73, k74, k75 } \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ } #endif \ No newline at end of file diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 054731366e..0603827e08 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -10,62 +10,62 @@ #ifdef USE_I2C #include #ifdef __AVR__ -#include -#include + #include + #include #endif #ifdef SSD1306OLED -extern bool iota_gfx_init(void); -extern void iota_gfx_task(void); -extern bool iota_gfx_off(void); -extern bool iota_gfx_on(void); -extern void iota_gfx_flush(void); -extern void iota_gfx_write_char(uint8_t c); -extern void iota_gfx_write(const char *data); -extern void iota_gfx_write_P(const char *data); -extern void iota_gfx_clear_screen(void); + extern bool iota_gfx_init(void); + extern void iota_gfx_task(void); + extern bool iota_gfx_off(void); + extern bool iota_gfx_on(void); + extern void iota_gfx_flush(void); + extern void iota_gfx_write_char(uint8_t c); + extern void iota_gfx_write(const char *data); + extern void iota_gfx_write_P(const char *data); + extern void iota_gfx_clear_screen(void); #endif #endif //void promicro_bootloader_jmp(bool program); #ifndef FLIP_HALF -//Standard Keymap +// Standard Keymap +// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) #define KEYMAP( \ - k40, k41, k42, k43, k44, k45, k05, k04, k03, k02, k01, k00, \ - k50, k51, k52, k53, k54, k55, k15, k14, k13, k12, k11, k10, \ - k60, k61, k62, k63, k64, k65, k25, k24, k23, k22, k21, k20, \ - k70, k71, k72, k73, k74, k75, k35, k34, k33, k32, k31, k30 \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ ) \ { \ - { k45, k44, k43, k42, k41, k40 }, \ - { k55, k54, k53, k52, k51, k50 }, \ - { k65, k64, k63, k62, k61, k60 }, \ - { k75, k74, k73, k72, k71, k70 }, \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 } \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 } \ } - #else -// Keymap with one side flipped +// Keymap with right side flipped +// (TRRS jack on both halves are to the right) #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ - k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ - k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ - k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ ) \ { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 }, \ - { k45, k44, k43, k42, k41, k40 }, \ - { k55, k54, k53, k52, k51, k50 }, \ - { k65, k64, k63, k62, k61, k60 }, \ - { k75, k74, k73, k72, k71, k70 } \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ } #endif - -#endif \ No newline at end of file +#endif From 563961328be1605a7f3942f042572a0160ac2959 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 3 Apr 2017 12:31:38 -0400 Subject: [PATCH 4/9] Rename COMPACT_KEYMAP to KC_KEYMAP and move to lets_split.h --- keyboards/lets_split/keymaps/hexwire/config.h | 36 +------------------ keyboards/lets_split/keymaps/hexwire/keymap.c | 12 +++---- keyboards/lets_split/lets_split.h | 14 ++++++++ 3 files changed, 21 insertions(+), 41 deletions(-) diff --git a/keyboards/lets_split/keymaps/hexwire/config.h b/keyboards/lets_split/keymaps/hexwire/config.h index e5a779f633..27c24fe4be 100644 --- a/keyboards/lets_split/keymaps/hexwire/config.h +++ b/keyboards/lets_split/keymaps/hexwire/config.h @@ -19,47 +19,13 @@ along with this program. If not, see . #define USE_SERIAL #define TAPPING_TERM 150 +#define FLIP_HALF #ifdef SUBPROJECT_rev1 #include "../../rev1/config.h" - #define COMPACT_KEYMAP( \ - k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ - k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ - k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ - k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ - ) \ - { \ - { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05 }, \ - { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15 }, \ - { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25 }, \ - { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35 }, \ - { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45 }, \ - { KC_##k50, KC_##k51, KC_##k52, KC_##k53, KC_##k54, KC_##k55 }, \ - { KC_##k60, KC_##k61, KC_##k62, KC_##k63, KC_##k64, KC_##k65 }, \ - { KC_##k70, KC_##k71, KC_##k72, KC_##k73, KC_##k74, KC_##k75 } \ - } #endif #ifdef SUBPROJECT_rev2 #include "../../rev2/config.h" - #define COMPACT_KEYMAP( \ - k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ - k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ - ) \ - { \ - { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05 }, \ - { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15 }, \ - { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25 }, \ - { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35 }, \ - { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45 }, \ - { KC_##k50, KC_##k51, KC_##k52, KC_##k53, KC_##k54, KC_##k55 }, \ - { KC_##k60, KC_##k61, KC_##k62, KC_##k63, KC_##k64, KC_##k65 }, \ - { KC_##k70, KC_##k71, KC_##k72, KC_##k73, KC_##k74, KC_##k75 } \ - } -#endif -#ifdef SUBPROJECT_rev2fliphalf - #include "../../rev2fliphalf/config.h" #endif #undef RGBLED_NUM diff --git a/keyboards/lets_split/keymaps/hexwire/keymap.c b/keyboards/lets_split/keymaps/hexwire/keymap.c index f8370490d6..fcf3cde758 100644 --- a/keyboards/lets_split/keymaps/hexwire/keymap.c +++ b/keyboards/lets_split/keymaps/hexwire/keymap.c @@ -39,7 +39,7 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = COMPACT_KEYMAP( + [_QWERTY] = KC_KEYMAP( //,----+----+----+----+----+----. ,----+----+----+----+----+----. TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----' `----+----+----+----+----+----' ), - [_COLEMAK] = COMPACT_KEYMAP( + [_COLEMAK] = KC_KEYMAP( //,----+----+----+----+----+----. ,----+----+----+----+----+----. TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----' `----+----+----+----+----+----' ), - [_DVORAK] = COMPACT_KEYMAP( + [_DVORAK] = KC_KEYMAP( //,----+----+----+----+----+----. ,----+----+----+----+----+----. TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----' `----+----+----+----+----+----' ), - [_LOWER] = COMPACT_KEYMAP( + [_LOWER] = KC_KEYMAP( //,----+----+----+----+----+----. ,----+----+----+----+----+----. , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----' `----+----+----+----+----+----' ), - [_RAISE] = COMPACT_KEYMAP( + [_RAISE] = KC_KEYMAP( //,----+----+----+----+----+----. ,----+----+----+----+----+----. ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , //|----+----+----+----+----+----| |----+----+----+----+----+----| @@ -99,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----' `----+----+----+----+----+----' ), - [_FN3] = COMPACT_KEYMAP( + [_FN3] = KC_KEYMAP( //,----+----+----+----+----+----. ,----+----+----+----+----+----. F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , //|----+----+----+----+----+----| |----+----+----+----+----+----| diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h index 0de308c7a9..1892bf2cbd 100644 --- a/keyboards/lets_split/lets_split.h +++ b/keyboards/lets_split/lets_split.h @@ -11,6 +11,20 @@ #include "rev2fliphalf.h" #endif +// Used to create a keymap using only KC_ prefixed keys +#define KC_KEYMAP( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + KEYMAP( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ + ) + #include "quantum.h" #endif \ No newline at end of file From d90ac762958eb77222a5277d64474f2aa3349176 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 3 Apr 2017 12:51:31 -0400 Subject: [PATCH 5/9] Move defines for RGB to after the config.h include --- .../lets_split/keymaps/OLED_sample/config.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/keyboards/lets_split/keymaps/OLED_sample/config.h b/keyboards/lets_split/keymaps/OLED_sample/config.h index 353ea368c6..8389ba111d 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/config.h +++ b/keyboards/lets_split/keymaps/OLED_sample/config.h @@ -27,19 +27,16 @@ along with this program. If not, see . #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif + #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 6 #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - - - - -#ifdef SUBPROJECT_rev1 - #include "../../rev1/config.h" -#endif -#ifdef SUBPROJECT_rev2 - #include "../../rev2/config.h" -#endif \ No newline at end of file From e3aeab356afd52299bf6cf05b5c99995ce167275 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 3 Apr 2017 13:04:34 -0400 Subject: [PATCH 6/9] Move SSD1306 function declarations to header file --- .../lets_split/keymaps/OLED_sample/keymap.c | 3 +++ keyboards/lets_split/rev2/rev2.c | 1 - keyboards/lets_split/rev2/rev2.h | 11 ----------- keyboards/lets_split/ssd1306.c | 3 +-- keyboards/lets_split/ssd1306.h | 17 +++++++++++++++++ 5 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 keyboards/lets_split/ssd1306.h diff --git a/keyboards/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c index 072b825abe..493ebcd3f2 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/keymap.c +++ b/keyboards/lets_split/keymaps/OLED_sample/keymap.c @@ -6,6 +6,9 @@ #ifdef AUDIO_ENABLE #include "audio.h" #endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif extern keymap_config_t keymap_config; diff --git a/keyboards/lets_split/rev2/rev2.c b/keyboards/lets_split/rev2/rev2.c index 8bfa171d01..20a4c6be1e 100644 --- a/keyboards/lets_split/rev2/rev2.c +++ b/keyboards/lets_split/rev2/rev2.c @@ -37,4 +37,3 @@ void shutdown_user(void) { stop_all_notes(); #endif } - diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 0603827e08..0c4e8e7de1 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -13,17 +13,6 @@ #include #include #endif -#ifdef SSD1306OLED - extern bool iota_gfx_init(void); - extern void iota_gfx_task(void); - extern bool iota_gfx_off(void); - extern bool iota_gfx_on(void); - extern void iota_gfx_flush(void); - extern void iota_gfx_write_char(uint8_t c); - extern void iota_gfx_write(const char *data); - extern void iota_gfx_write_P(const char *data); - extern void iota_gfx_clear_screen(void); -#endif #endif //void promicro_bootloader_jmp(bool program); diff --git a/keyboards/lets_split/ssd1306.c b/keyboards/lets_split/ssd1306.c index 3c7816bb32..76348ab7f2 100644 --- a/keyboards/lets_split/ssd1306.c +++ b/keyboards/lets_split/ssd1306.c @@ -1,8 +1,7 @@ +#include "ssd1306.h" #include "config.h" #include "i2c.h" -#include #include -#include #include "print.h" #include "lets_split.h" #include "common/glcdfont.c" diff --git a/keyboards/lets_split/ssd1306.h b/keyboards/lets_split/ssd1306.h new file mode 100644 index 0000000000..b0c74f987e --- /dev/null +++ b/keyboards/lets_split/ssd1306.h @@ -0,0 +1,17 @@ +#ifndef SSD1306_H +#define SSD1306_H + +#include +#include + +bool iota_gfx_init(void); +void iota_gfx_task(void); +bool iota_gfx_off(void); +bool iota_gfx_on(void); +void iota_gfx_flush(void); +void iota_gfx_write_char(uint8_t c); +void iota_gfx_write(const char *data); +void iota_gfx_write_P(const char *data); +void iota_gfx_clear_screen(void); + +#endif From 133ed52466f1a6d29974f1efc1deddcdafe773a8 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 3 Apr 2017 13:23:23 -0400 Subject: [PATCH 7/9] =?UTF-8?q?Update=20Let=E2=80=99s=20Split=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/lets_split/readme.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index ecce3f4152..a8525a2e9d 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md @@ -7,6 +7,12 @@ Split keyboard firmware for Arduino Pro Micro or other ATmega32u4 based boards. +## Build Guide + +A build guide for putting together the Let's Split v2 can be found here: [An Overly Verbose Guide to Building a Let's Split Keyboard](https://github.com/nicinabox/lets-split-guide) + +There is additional information there about flashing and adding RGB underglow. + ## First Time Setup Download or clone the whole firmware and navigate to the keyboards/lets_split directory. Once your dev env is setup, you'll be able to generate the default .hex using: @@ -62,8 +68,8 @@ Apart from diodes and key switches for the keyboard matrix in each half, you will need: * 2 Arduino Pro Micro's. You can find theses on aliexpress for ≈3.50USD each. -* 2 TRS sockets -* 1 TRS cable. +* 2 TRRS sockets +* 1 TRRS cable. Alternatively, you can use any sort of cable and socket that has at least 3 wires. If you want to use I2C to communicate between halves, you will need a @@ -77,7 +83,7 @@ A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and t Wiring ------ -The 3 wires of the TRS cable need to connect GND, VCC, and digital pin 3 (i.e. +The 3 wires of the TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. PD0 on the ATmega32u4) between the two Pro Micros. Then wire your key matrix to any of the remaining 17 IO pins of the pro micro From ed9c18e86650496627e3a94c29c370e76a6e8313 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 3 Apr 2017 14:00:33 -0400 Subject: [PATCH 8/9] Remove flip-half from keymap --- keyboards/lets_split/keymaps/hexwire/config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/lets_split/keymaps/hexwire/config.h b/keyboards/lets_split/keymaps/hexwire/config.h index 27c24fe4be..e315d8c0c3 100644 --- a/keyboards/lets_split/keymaps/hexwire/config.h +++ b/keyboards/lets_split/keymaps/hexwire/config.h @@ -19,7 +19,6 @@ along with this program. If not, see . #define USE_SERIAL #define TAPPING_TERM 150 -#define FLIP_HALF #ifdef SUBPROJECT_rev1 #include "../../rev1/config.h" From fbd9d04559962cb0db3a584d397f49371a4d7fb6 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 3 Apr 2017 16:16:46 -0400 Subject: [PATCH 9/9] Include use of either TRS or TRRS --- keyboards/lets_split/readme.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index a8525a2e9d..7e5a546022 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md @@ -68,8 +68,7 @@ Apart from diodes and key switches for the keyboard matrix in each half, you will need: * 2 Arduino Pro Micro's. You can find theses on aliexpress for ≈3.50USD each. -* 2 TRRS sockets -* 1 TRRS cable. +* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable Alternatively, you can use any sort of cable and socket that has at least 3 wires. If you want to use I2C to communicate between halves, you will need a @@ -83,7 +82,7 @@ A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and t Wiring ------ -The 3 wires of the TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. +The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. PD0 on the ATmega32u4) between the two Pro Micros. Then wire your key matrix to any of the remaining 17 IO pins of the pro micro