]> git.armaanb.net Git - atreides.git/commitdiff
Add firmware directory
authorArmaan Bhojwani <me@armaanb.net>
Wed, 13 Jan 2021 21:17:32 +0000 (16:17 -0500)
committerArmaan Bhojwani <me@armaanb.net>
Wed, 13 Jan 2021 21:17:32 +0000 (16:17 -0500)
firmware/README.md [new file with mode: 0644]
firmware/atreus.c [new file with mode: 0644]
firmware/atreus.h [new file with mode: 0644]
firmware/config.h [new file with mode: 0644]
firmware/info.json [new file with mode: 0644]
firmware/keymaps/default/keymap.c [new file with mode: 0644]
firmware/promicro/config.h [new file with mode: 0644]
firmware/promicro/promicro.c [new file with mode: 0644]
firmware/promicro/promicro.h [new file with mode: 0644]
firmware/promicro/rules.mk [new file with mode: 0644]
firmware/rules.mk [new file with mode: 0644]

diff --git a/firmware/README.md b/firmware/README.md
new file mode 100644 (file)
index 0000000..d216ffd
--- /dev/null
@@ -0,0 +1,4 @@
+# atreides firmware
+A small mechanical keyboard that is based around the shape of the human hand.
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/firmware/atreus.c b/firmware/atreus.c
new file mode 100644 (file)
index 0000000..7f37ab1
--- /dev/null
@@ -0,0 +1,17 @@
+/* Copyright 2021
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "atreides.h"
diff --git a/firmware/atreus.h b/firmware/atreus.h
new file mode 100644 (file)
index 0000000..0c20c1e
--- /dev/null
@@ -0,0 +1,63 @@
+/* Copyright 2021
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "quantum.h"
+#define ___ KC_NO
+
+#ifdef KEYBOARD_atreides_astar
+    #include "astar.h"
+#elif KEYBOARD_atreides_astar_mirrored
+    #include "astar_mirrored.h"
+#elif KEYBOARD_atreides_feather
+    #include "feather.h"
+#elif KEYBOARD_atreides_teensy2
+    #include "teensy2.h"
+#elif KEYBOARD_atreides_promicro
+    #include "promicro.h"
+#endif
+
+// This a shortcut to help you visually see your layout.
+// The first section contains all of the arguments.
+// The second converts the arguments into a two-dimensional array.
+// In the PCBDOWN case we need to swap the middle two keys: k35 and k36.
+#if defined(PCBDOWN)
+#define LAYOUT( \
+  k00, k01, k02, k03, k04,           k05, k06, k07, k08, k09, \
+  k10, k11, k12, k13, k14,           k15, k16, k17, k18, k19, \
+  k20, k21, k22, k23, k24,           k25, k26, k27, k28, k29, \
+  k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+       { k00, k01, k02, k03, k04, KC_NO, k05, k06, k07, k08, k09 }, \
+       { k10, k11, k12, k13, k14, KC_NO, k15, k16, k17, k18, k19 }, \
+       { k20, k21, k22, k23, k24, k36,   k25, k26, k27, k28, k29 }, \
+       { k30, k31, k32, k33, k34, k35,   k37, k38, k39, k3a, k3b } \
+}
+#else
+#define LAYOUT( \
+  k00, k01, k02, k03, k04,           k05, k06, k07, k08, k09, \
+  k10, k11, k12, k13, k14,           k15, k16, k17, k18, k19, \
+  k20, k21, k22, k23, k24,           k25, k26, k27, k28, k29, \
+  k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+       { k00, k01, k02, k03, k04, ___, k05, k06, k07, k08, k09 }, \
+       { k10, k11, k12, k13, k14, ___, k15, k16, k17, k18, k19 }, \
+       { k20, k21, k22, k23, k24, k35, k25, k26, k27, k28, k29 }, \
+       { k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b } \
+}
+#endif
diff --git a/firmware/config.h b/firmware/config.h
new file mode 100644 (file)
index 0000000..e326c26
--- /dev/null
@@ -0,0 +1,63 @@
+/* Copyright 2021
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+
+#define VENDOR_ID       0x1209
+#define PRODUCT_ID      0xA1E5
+#define DEVICE_VER      0x0008
+#define MANUFACTURER    Armaan Bhojwani
+#define PRODUCT         Atreides
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 11
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+//#define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/*
+ * Feature disable options
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
diff --git a/firmware/info.json b/firmware/info.json
new file mode 100644 (file)
index 0000000..99c8b5f
--- /dev/null
@@ -0,0 +1,12 @@
+{
+  "keyboard_name": "Atreides",
+  "url": "",
+  "maintainer": "Armaan Bhojwani",
+  "width": 13,
+  "height": 4.7,
+  "layouts": {
+    "LAYOUT": {
+      "layout": [{"x":0, "y":0.6}, {"x":1, "y":0.35}, {"x":2, "y":0}, {"x":3, "y":0.35}, {"x":4, "y":0.7}, {"x":8, "y":0.7}, {"x":9, "y":0.35}, {"x":10, "y":0}, {"x":11, "y":0.35}, {"x":12, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.35}, {"x":2, "y":1}, {"x":3, "y":1.35}, {"x":4, "y":1.7}, {"x":8, "y":1.7}, {"x":9, "y":1.35}, {"x":10, "y":1}, {"x":11, "y":1.35}, {"x":12, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.35}, {"x":2, "y":2}, {"x":3, "y":2.35}, {"x":4, "y":2.7}, {"x":8, "y":2.7}, {"x":9, "y":2.35}, {"x":10, "y":2}, {"x":11, "y":2.35}, {"x":12, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.35}, {"x":2, "y":3}, {"x":3, "y":3.35}, {"x":4, "y":3.7}, {"x":5, "y":2.95, "h":1.5}, {"x":7, "y":2.95, "h":1.5}, {"x":8, "y":3.7}, {"x":9, "y":3.35}, {"x":10, "y":3}, {"x":11, "y":3.35}, {"x":12, "y":3.6}]
+    }
+  }
+}
diff --git a/firmware/keymaps/default/keymap.c b/firmware/keymaps/default/keymap.c
new file mode 100644 (file)
index 0000000..95207f5
--- /dev/null
@@ -0,0 +1,44 @@
+// this is the style you want to emulate.
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+
+#include QMK_KEYBOARD_H
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+#define _QW 0
+#define _RS 1
+#define _LW 2
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  [_QW] = LAYOUT( /* Qwerty */
+    KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,                      KC_Y,    KC_U,    KC_I,    KC_O,    KC_P    ,
+    KC_A,    KC_S,    KC_D,    KC_F,    KC_G,                      KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN ,
+    KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,                      KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH ,
+    KC_ESC, KC_TAB, KC_LGUI,  KC_LSFT, KC_BSPC,  KC_LCTL, KC_LALT, KC_SPC,  MO(_RS), KC_MINS, KC_QUOT, KC_ENT
+  ),
+
+  /*
+   *  !       @     up     {    }        ||     pgup    7     8     9    *
+   *  #     left   down  right  $        ||     pgdn    4     5     6    +
+   *  [       ]      (     )    &        ||       `     1     2     3    \
+   * lower  insert super shift bksp ctrl || alt space   fn    .     0    =
+   */
+  [_RS] = LAYOUT( /* [> RAISE <] */
+    KC_EXLM, KC_AT,   KC_UP,   KC_LCBR, KC_RCBR,                   KC_PGUP, KC_7,    KC_8,   KC_9, KC_ASTR ,
+    KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR,                    KC_PGDN, KC_4,    KC_5,   KC_6, KC_PLUS ,
+    KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR,                   KC_GRV,  KC_1,    KC_2,   KC_3, KC_BSLS ,
+    TG(_LW), KC_INS,  KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC,  KC_TRNS, KC_DOT, KC_0, KC_EQL  ),
+  /*
+   * insert home   up  end   pgup       ||      up     F7    F8    F9   F10
+   *  del   left  down right pgdn       ||     down    F4    F5    F6   F11
+   *       volup             reset      ||             F1    F2    F3   F12
+   *       voldn  super shift bksp ctrl || alt space   L0  prtsc scroll pause
+   */
+  [_LW] = LAYOUT( /* [> LOWER <] */
+    KC_INS,  KC_HOME, KC_UP,   KC_END,  KC_PGUP,                   KC_UP,   KC_F7,   KC_F8,   KC_F9,   KC_F10  ,
+    KC_DEL,  KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN,                   KC_DOWN, KC_F4,   KC_F5,   KC_F6,   KC_F11  ,
+    KC_NO,   KC_VOLU, KC_NO,   KC_NO,   RESET,                     KC_NO,   KC_F1,   KC_F2,   KC_F3,   KC_F12  ,
+    KC_NO,   KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC,  TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS )
+};
diff --git a/firmware/promicro/config.h b/firmware/promicro/config.h
new file mode 100644 (file)
index 0000000..03b63f6
--- /dev/null
@@ -0,0 +1,40 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { F4, B2, B4, B5 }
+#if defined(PCBDOWN)
+  #define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B6, B3, B1, F7, F6, F5 }
+#else
+  #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B6, E6, D7, C6, D4, D0 }
+#endif
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
diff --git a/firmware/promicro/promicro.c b/firmware/promicro/promicro.c
new file mode 100644 (file)
index 0000000..ad08ac9
--- /dev/null
@@ -0,0 +1,16 @@
+/* Copyright 2020
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "promicro.h"
diff --git a/firmware/promicro/promicro.h b/firmware/promicro/promicro.h
new file mode 100644 (file)
index 0000000..bf74ceb
--- /dev/null
@@ -0,0 +1,17 @@
+/* Copyright 2019
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
diff --git a/firmware/promicro/rules.mk b/firmware/promicro/rules.mk
new file mode 100644 (file)
index 0000000..e6fef51
--- /dev/null
@@ -0,0 +1,12 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+#   Teensy       halfkay
+#   Pro Micro    caterina
+#   Atmel DFU    atmel-dfu
+#   LUFA DFU     lufa-dfu
+#   QMK DFU      qmk-dfu
+#   ATmega32A    bootloadHID
+#   ATmega328P   USBasp
+BOOTLOADER = caterina
diff --git a/firmware/rules.mk b/firmware/rules.mk
new file mode 100644 (file)
index 0000000..9ea560f
--- /dev/null
@@ -0,0 +1,21 @@
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = yes       # Mouse keys
+EXTRAKEY_ENABLE = yes       # Audio control and System control
+CONSOLE_ENABLE = yes        # Console for debug
+COMMAND_ENABLE = yes        # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = yes           # USB Nkey Rollover
+BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no        # Enable keyboard RGB underglow
+MIDI_ENABLE = no            # MIDI support
+UNICODE_ENABLE = yes        # Unicode
+BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no           # Audio output on port C6
+FAUXCLICKY_ENABLE = no      # Use buzzer to emulate clicky switches
+
+DEFAULT_FOLDER = atreides/promicro