From 4fbdcc8ff7df3af4ea5c013bd65abf4f470901c6 Mon Sep 17 00:00:00 2001 From: Phil Hagelberg Date: Sun, 22 Mar 2020 15:09:14 -0700 Subject: [PATCH] PCB down settings have to be moved up to before layout definition. --- Makefile | 3 +++ multidvorak.scm | 42 +++++++++++++++++++++--------------------- qwerty.scm | 42 +++++++++++++++++++++--------------------- 3 files changed, 45 insertions(+), 42 deletions(-) diff --git a/Makefile b/Makefile index 9a1e5af..f4a085f 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,9 @@ USB=/dev/ttyACM0 build: $(LAYOUT).hex upload: $(LAYOUT).hex + echo "Put your device in bootloader mode now..." + echo "Classic Atreus: connect GND pin to RST pin twice in under a secod." + echo "Keyboardio Atreus: press the button on the underside of the board." while [ ! -r $(USB) ]; do sleep 1; done; \ avrdude -p $(MCU) -c avr109 -U flash:w:$(LAYOUT).hex -P $(USB) diff --git a/multidvorak.scm b/multidvorak.scm index 7f9e4d0..5af7a3f 100644 --- a/multidvorak.scm +++ b/multidvorak.scm @@ -4,6 +4,27 @@ (include "keycodes.scm") +;; What are the rows and columns we care about? +(define rows (list 0 1 2 3)) +(define columns (list 0 1 2 3 4 5 6 7 8 9 10)) + +;; Which GPIO pins are responsible for each row or column? +;; These are the pins used by the kit-based Atreus; the Keyboardio Atreus uses +;; a different set of pins. +(define row-pins (vector 3 2 1 0)) +(define column-pins (vector 6 5 9 8 7 4 10 19 18 12 11)) + +;; If you have a kit where the PCB is installed upside-down, uncomment this: +;; (set! column-pins (vector 11 12 18 19 10 4 7 8 9 5 6)) +;; ;; Upside-down PCB makes the columns backwards but also trades ctrl and alt; +;; ;; this hack only works for layouts where ctrl and alt are in standard place. +;; (set! mod-alt (modify 1)) +;; (set! mod-ctrl (modify 3)) + +;; The above should be handled by a compile-time environment variable but that +;; isn't yet part of Microscheme: +;; https://github.com/ryansuchocki/microscheme/issues/32 + ;; We have to declare this up front and set it later because of circularity. (define layers #f) (define current-layer #f) @@ -118,25 +139,4 @@ hard-dvorak-layer hard-dvorak-fn-layer)) (set! current-layer (vector-ref layers 0)) -;; What are the rows and columns we care about? -(define rows (list 0 1 2 3)) -(define columns (list 0 1 2 3 4 5 6 7 8 9 10)) - -;; Which GPIO pins are responsible for each row or column? -;; These are the pins used by the kit-based Atreus; the Keyboardio Atreus uses -;; a different set of pins. -(define row-pins (vector 3 2 1 0)) -(define column-pins (vector 6 5 9 8 7 4 10 19 18 12 11)) - -;; If you have a kit where the PCB is installed upside-down, uncomment this: -;; (set! column-pins (vector 11 12 18 19 10 4 7 8 9 5 6)) -;; ;; Upside-down PCB makes the columns backwards but also trades ctrl and alt; -;; ;; this hack only works for layouts where ctrl and alt are in standard place. -;; (set! mod-alt (modify 1)) -;; (set! mod-ctrl (modify 3)) - -;; The above should be handled by a compile-time environment variable but that -;; isn't yet part of Microscheme: -;; https://github.com/ryansuchocki/microscheme/issues/32 - (include "menelaus.scm") diff --git a/qwerty.scm b/qwerty.scm index 528b12f..20fd2e1 100644 --- a/qwerty.scm +++ b/qwerty.scm @@ -2,6 +2,27 @@ (include "keycodes.scm") +;; What are the rows and columns we care about? +(define rows (list 0 1 2 3)) +(define columns (list 0 1 2 3 4 5 6 7 8 9 10)) + +;; Which GPIO pins are responsible for each row or column? +;; These are the pins used by the kit-based Atreus; the Keyboardio Atreus uses +;; a different set of pins. +(define row-pins (vector 3 2 1 0)) +(define column-pins (vector 6 5 9 8 7 4 10 19 18 12 11)) + +;; If you have a kit where the PCB is installed upside-down, uncomment this: +;; (set! column-pins (vector 11 12 18 19 10 4 7 8 9 5 6)) +;; ;; Upside-down PCB makes the columns backwards but also trades ctrl and alt; +;; ;; this hack only works for layouts where ctrl and alt are in standard place. +;; (set! mod-alt (modify 1)) +;; (set! mod-ctrl (modify 3)) + +;; The above should be handled by a compile-time environment variable but that +;; isn't yet part of Microscheme: +;; https://github.com/ryansuchocki/microscheme/issues/32 + ;; we have to declare this up front and set it later because of circularity (define layers #f) (define current-layer #f) @@ -58,25 +79,4 @@ (set! layers (vector base-layer fn-layer l2-layer)) (set! current-layer (vector-ref layers 0)) -;; What are the rows and columns we care about? -(define rows (list 0 1 2 3)) -(define columns (list 0 1 2 3 4 5 6 7 8 9 10)) - -;; Which GPIO pins are responsible for each row or column? -;; These are the pins used by the kit-based Atreus; the Keyboardio Atreus uses -;; a different set of pins. -(define row-pins (vector 3 2 1 0)) -(define column-pins (vector 6 5 9 8 7 4 10 19 18 12 11)) - -;; If you have a kit where the PCB is installed upside-down, uncomment this: -;; (set! column-pins (vector 11 12 18 19 10 4 7 8 9 5 6)) -;; ;; Upside-down PCB makes the columns backwards but also trades ctrl and alt; -;; ;; this hack only works for layouts where ctrl and alt are in standard place. -;; (set! mod-alt (modify 1)) -;; (set! mod-ctrl (modify 3)) - -;; The above should be handled by a compile-time environment variable but that -;; isn't yet part of Microscheme: -;; https://github.com/ryansuchocki/microscheme/issues/32 - (include "menelaus.scm")