Skip to content

Commit

Permalink
Add fix for broken USB on left hand
Browse files Browse the repository at this point in the history
  • Loading branch information
colemarkham committed Aug 2, 2017
1 parent b57eaac commit bfe77b4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
4 changes: 1 addition & 3 deletions keyboards/lets_split/keymaps/cole/config.h
Expand Up @@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define USE_SERIAL

#define MASTER_LEFT
#define BROKEN_HALF
// #define _MASTER_RIGHT
// #define EE_HANDS

Expand All @@ -29,6 +30,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef SUBPROJECT_rev2
#include "../../rev2/config.h"
#endif
#ifdef SUBPROJECT_rev2fliphalf
#include "../../rev2fliphalf/config.h"
#endif
21 changes: 21 additions & 0 deletions keyboards/lets_split/rev2/rev2.h
Expand Up @@ -18,6 +18,26 @@
//void promicro_bootloader_jmp(bool program);

#ifndef FLIP_HALF
#ifdef BROKEN_HALF
// Broken Keymap
// Left and right halves swapped because the USB port on the left is broken
#define 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 \
) \
{ \
{ R05, R04, R03, R02, R01, R00 }, \
{ R15, R14, R13, R12, R11, R10 }, \
{ R25, R24, R23, R22, R21, R20 }, \
{ R35, R34, R33, R32, R31, R30 }, \
{ L00, L01, L02, L03, L04, L05 }, \
{ L10, L11, L12, L13, L14, L15 }, \
{ L20, L21, L22, L23, L24, L25 }, \
{ L30, L31, L32, L33, L34, L35 } \
}
#else
// Standard Keymap
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
#define KEYMAP( \
Expand All @@ -36,6 +56,7 @@
{ R25, R24, R23, R22, R21, R20 }, \
{ R35, R34, R33, R32, R31, R30 } \
}
#endif
#else
// Keymap with right side flipped
// (TRRS jack on both halves are to the right)
Expand Down
4 changes: 2 additions & 2 deletions keyboards/lets_split/rules.mk
@@ -1,8 +1,7 @@
SRC += matrix.c \
i2c.c \
split_util.c \
serial.c \
ssd1306.c
serial.c

# MCU name
#MCU = at90usb1287
Expand Down Expand Up @@ -83,6 +82,7 @@ avrdude: build
ls /dev/tty* > /tmp/2; \
USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
done; \
sleep 3; \
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex

.PHONY: avrdude

0 comments on commit bfe77b4

Please sign in to comment.