]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Change default controller for Atreus from Teensy2 to A-Star
authorChris Gerber <christopher.gerber@regeneron.com>
Wed, 17 Feb 2016 23:55:17 +0000 (18:55 -0500)
committerChris Gerber <christopher.gerber@regeneron.com>
Thu, 18 Feb 2016 00:14:25 +0000 (19:14 -0500)
keyboard/atreus/Makefile
keyboard/atreus/README.md
keyboard/atreus/config.h

index 6666be11925e252da973126c6585c287dff65367..2e542d62eddf93b7901606aed42968e13feb8d3f 100644 (file)
@@ -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)
index e3bcaa4c4df8acce7132738eee81e42d0c0f6cb9..4db7ac1203ba0835edd7820304b9c6a353f87530 100644 (file)
@@ -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.
 
index 1ceef808a1a1bf07ea26ecd3773263c33f43bc23..ca0cd7e47a084acc7fe0e1de44cd6021cd3d85f8 100644 (file)
@@ -35,10 +35,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 // 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