From 1db3558a921d465e1c2f7f280f94dad8e95d32ac Mon Sep 17 00:00:00 2001 From: Chris Gerber Date: Wed, 17 Feb 2016 18:55:17 -0500 Subject: [PATCH] Change default controller for Atreus from Teensy2 to A-Star --- keyboard/atreus/Makefile | 14 +++++++------- keyboard/atreus/README.md | 2 +- keyboard/atreus/config.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/keyboard/atreus/Makefile b/keyboard/atreus/Makefile index 6666be119..2e542d62e 100644 --- a/keyboard/atreus/Makefile +++ b/keyboard/atreus/Makefile @@ -58,8 +58,13 @@ else SRC := keymaps/keymap_default.c $(SRC) endif -ifdef ASTAR +ifdef TEENSY2 + OPT_DEFS += -DATREUS_TEENSY2 + ATRUES_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex +else OPT_DEFS += -DATREUS_ASTAR + ATRUES_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) endif CONFIG_H = config.h @@ -144,9 +149,4 @@ include $(TOP_DIR)/quantum/quantum.mk USB ?= /dev/cu.usbmodem1411 upload: build -ifdef ASTAR - while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) -else - teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex -endif + $(ATRUES_UPLOAD_COMMAND) diff --git a/keyboard/atreus/README.md b/keyboard/atreus/README.md index e3bcaa4c4..4db7ac120 100644 --- a/keyboard/atreus/README.md +++ b/keyboard/atreus/README.md @@ -12,7 +12,7 @@ You have access to a bunch of goodies! Check out the Makefile to enable/disable ## Atreus specific information -These configuration files are specifically for the Atreus keyboards created by Phil Hagelberg (@technomancy). This keyboard is available in two variants: one powered by a Teensy 2, one powered by an A-Star. This repository currently assumes that you have a Teensy 2 powered Atreus. If you are using an A-Star, specify that by adding `ASTAR=yes` to your `make` commands. +These configuration files are specifically for the Atreus keyboards created by Phil Hagelberg (@technomancy). This keyboard is available in two variants: one powered by a Teensy 2, one powered by an A-Star. This repository currently assumes that you have an A-Star powered Atreus. If you are using a Teensy2, specify that by adding `TEENSY2=yes` to your `make` commands. If you are coming from the [atreus-firmware](https://github.com/technomancy/atreus-firmware), we've also brought forward the `make upload` command for you to use. diff --git a/keyboard/atreus/config.h b/keyboard/atreus/config.h index 1ceef808a..ca0cd7e47 100644 --- a/keyboard/atreus/config.h +++ b/keyboard/atreus/config.h @@ -35,10 +35,10 @@ along with this program. If not, see . // Change this to how you wired your keyboard // COLS: Left to right, ROWS: Top to bottom -#ifdef ATREUS_ASTAR +#if defined(ATREUS_ASTAR) #define COLS (int []){ B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } #define ROWS (int []){ D0, D1, D3, D2 } -#else +#elif defined(ATREUS_TEENSY2) #define COLS (int []){ F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0} #define ROWS (int []){ D0, D1, D2, D3 } #endif