aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/config_options.md4
-rw-r--r--tmk_core/avr.mk14
2 files changed, 16 insertions, 2 deletions
diff --git a/docs/config_options.md b/docs/config_options.md
index 336feee8f..a8a106459 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -208,9 +208,13 @@ There are a few different ways to set handedness for split keyboards (listed in
208 208
2091. Set `SPLIT_HAND_PIN`: Reads a pin to determine handedness. If pin is high, it's the left side, if low, the half is determined to be the right side 2091. Set `SPLIT_HAND_PIN`: Reads a pin to determine handedness. If pin is high, it's the left side, if low, the half is determined to be the right side
2102. Set `EE_HANDS` and flash `eeprom-lefthand.eep`/`eeprom-righthand.eep` to each half 2102. Set `EE_HANDS` and flash `eeprom-lefthand.eep`/`eeprom-righthand.eep` to each half
211 * For boards with DFU bootloader you can use `:dfu-split-left`/`:dfu-split-right` to flash these EEPROM files
212 * For boards with Caterina bootloader (like stock Pro Micros), use `:avrdude-split-left`/`:avrdude-split-right`
2113. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default) 2133. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default)
2124. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half 2144. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half
213 215
216#### Defines for handedness
217
214* `#define SPLIT_HAND_PIN B7` 218* `#define SPLIT_HAND_PIN B7`
215 * For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses. 219 * For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses.
216 220
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index 79fdf4de5..bf3e269fd 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -223,7 +223,11 @@ define EXEC_AVRDUDE
223 printf "Waiting for $$USB to become writable."; \ 223 printf "Waiting for $$USB to become writable."; \
224 while [ ! -w "$$USB" ]; do sleep 0.5; printf "."; done; echo ""; \ 224 while [ ! -w "$$USB" ]; do sleep 0.5; printf "."; done; echo ""; \
225 fi; \ 225 fi; \
226 avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ 226 if [ -z "$(1)" ]; then \
227 avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \
228 else \
229 avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex -U eeprom:w:$(QUANTUM_PATH)/split_common/$(1); \
230 fi \
227 fi 231 fi
228endef 232endef
229 233
@@ -232,9 +236,15 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
232 236
233avrdude-loop: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware 237avrdude-loop: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
234 while true; do \ 238 while true; do \
235 $(call EXEC_AVRDUDE) ; \ 239 $(call EXEC_AVRDUDE) ; \
236 done 240 done
237 241
242avrdude-split-left: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
243 $(call EXEC_AVRDUDE,eeprom-lefthand.eep)
244
245avrdude-split-right: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
246 $(call EXEC_AVRDUDE,eeprom-righthand.eep)
247
238# Convert hex to bin. 248# Convert hex to bin.
239bin: $(BUILD_DIR)/$(TARGET).hex 249bin: $(BUILD_DIR)/$(TARGET).hex
240 $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin 250 $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin