diff options
| -rw-r--r-- | docs/config_options.md | 4 | ||||
| -rw-r--r-- | tmk_core/avr.mk | 14 |
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 | ||
| 209 | 1. 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 | 209 | 1. 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 |
| 210 | 2. Set `EE_HANDS` and flash `eeprom-lefthand.eep`/`eeprom-righthand.eep` to each half | 210 | 2. 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` | ||
| 211 | 3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default) | 213 | 3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default) |
| 212 | 4. 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 | 214 | 4. 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 |
| 228 | endef | 232 | endef |
| 229 | 233 | ||
| @@ -232,9 +236,15 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware | |||
| 232 | 236 | ||
| 233 | avrdude-loop: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware | 237 | avrdude-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 | ||
| 242 | avrdude-split-left: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware | ||
| 243 | $(call EXEC_AVRDUDE,eeprom-lefthand.eep) | ||
| 244 | |||
| 245 | avrdude-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. |
| 239 | bin: $(BUILD_DIR)/$(TARGET).hex | 249 | bin: $(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 |
