Sfoglia il codice sorgente

[Keyboard] Ares refactor (#13730)

James Young 3 anni fa
parent
commit
a617c8b80a

+ 32 - 1
keyboards/ares/ares.h

@@ -1,5 +1,6 @@
 /*
 Copyright 2019 Evy Dekkers
+          2021 James Young for QMK (@noroadsleft)
 
 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
@@ -21,7 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #define XXX KC_NO
 
-#define LAYOUT( \
+#define LAYOUT_all( \
     k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \
     k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d,      \
     k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d,      \
@@ -35,3 +36,33 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
     {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \
     {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e}  \
 }
+
+#define LAYOUT_60_ansi_split_bs_rshift( \
+    k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \
+    k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d,      \
+    k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b,      k2d,      \
+    k10,      k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d,      \
+    k00, k01, k02,                k06,                k0a, k0b, k0c, k0d       \
+) \
+{ \
+    {k00, k01, k02, XXX, XXX, XXX, k06, XXX, XXX, XXX, k0a, k0b, k0c, k0d, XXX}, \
+    {k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \
+    {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \
+    {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \
+    {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e}  \
+}
+
+#define LAYOUT_60_hhkb( \
+    k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \
+    k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d,      \
+    k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b,      k2d,      \
+    k10,      k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d,      \
+         k01, k02,                k06,                     k0b, k0c            \
+) \
+{ \
+    {XXX, k01, k02, XXX, XXX, XXX, k06, XXX, XXX, XXX, XXX, k0b, k0c, XXX, XXX}, \
+    {k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \
+    {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \
+    {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \
+    {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e}  \
+}

+ 2 - 2
keyboards/ares/config.h

@@ -49,5 +49,5 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 // #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
 
 /* Bootmagic Lite key configuration */
-// #define BOOTMAGIC_LITE_ROW 0
-// #define BOOTMAGIC_LITE_COLUMN 0
+#define BOOTMAGIC_LITE_ROW 4
+#define BOOTMAGIC_LITE_COLUMN 0

File diff suppressed because it is too large
+ 8 - 6
keyboards/ares/info.json


+ 19 - 17
keyboards/ares/keymaps/default/keymap.c

@@ -17,24 +17,26 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include QMK_KEYBOARD_H
 
-#define _MA 0
-#define _FN 1
-
-#define ______ KC_TRNS
+enum layer_names {
+    _MA,
+    _FN,
+};
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 
-[_MA] = LAYOUT(
-  KC_ESC,  KC_1,    KC_2,   KC_3,   KC_4,   KC_5,   KC_6,   KC_7,   KC_8,   KC_9,    KC_0,    KC_MINS, KC_EQL,  KC_BSLS, KC_BSPC,
-  KC_TAB,  KC_Q,    KC_W,   KC_E,   KC_R,   KC_T,   KC_Y,   KC_U,   KC_I,   KC_O,    KC_P,    KC_LBRC, KC_RBRC, KC_BSLS,
-  KC_CAPS, KC_A,    KC_S,   KC_D,   KC_F,   KC_G,   KC_H,   KC_J,   KC_K,   KC_L,    KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
-  KC_LSFT, KC_NUBS, KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM, KC_DOT,  KC_SLSH, KC_RSFT, MO(_FN),
-  KC_LCTL, KC_LGUI, KC_LALT,                        KC_SPC,                          KC_RALT, KC_RGUI, KC_APP,  KC_RCTRL),
-[_FN] = LAYOUT(
-  RGB_MOD, BL_TOGG, ______, ______, ______, ______, ______, ______, ______, ______,  ______,  ______,  ______,  ______,  RESET,
-  ______,  ______,  ______, ______, ______, ______, ______, ______, ______, ______,  ______,  ______,  ______,  ______,
-  ______,  ______,  ______, ______, ______, ______, ______, ______, ______, ______,  ______,  ______,  ______,  ______,
-  ______,  ______,  ______, ______, ______, ______, ______, ______, ______, ______,  ______,  ______,  ______,  ______,
-  ______,  ______,  ______,                         ______,                          ______,  ______,  ______,  ______)
-  
+    [_MA] = LAYOUT_all(
+        KC_ESC,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_MINS, KC_EQL,  KC_BSLS, KC_BSPC,
+        KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_LBRC, KC_RBRC, KC_BSLS,
+        KC_CAPS, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
+        KC_LSFT, KC_NUBS, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_RSFT, MO(_FN),
+        KC_LCTL, KC_LGUI, KC_LALT,                            KC_SPC,                             KC_RALT, KC_RGUI, KC_APP,  KC_RCTL
+    ),
+    [_FN] = LAYOUT_all(
+        RGB_MOD, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
+        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+        _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+        _______, _______, _______,                            _______,                            _______, _______, _______, _______
+    )
+
 };

+ 3 - 3
keyboards/ares/readme.md

@@ -1,8 +1,8 @@
-# lSJ Ares
+# LSJ Ares
 
 * Keyboard Maintainer: QMK Community
 * Hardware Supported: LSJ Ares PCB
-* Hardware Availability: <https://geekhack.org/index.php?topic=93146.0>
+* Hardware Availability: [2018 Geekhack Group Buy](https://geekhack.org/index.php?topic=93146.0)
 
 Make example for this keyboard (after setting up your build environment):
 
@@ -12,6 +12,6 @@ Flashing example for this keyboard ([after setting up the bootloadHID flashing e
 
     make ares:default:flash
 
-**Reset Key**: Hold down the *left control* key while plugging in the keyboard.
+**Reset Key**: Hold down the top left key, commonly programmed as *Escape*, while plugging in the keyboard.
 
 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).

+ 14 - 15
keyboards/ares/rules.mk

@@ -2,21 +2,20 @@
 MCU = atmega32a
 
 # Bootloader selection
-#   Teensy       halfkay
-#   Pro Micro    caterina
-#   Atmel DFU    atmel-dfu
-#   LUFA DFU     lufa-dfu
-#   QMK DFU      qmk-dfu
-#   ATmega32A    bootloadHID
-#   ATmega328P   USBasp
 BOOTLOADER = bootloadHID
 
-# build options
-BOOTMAGIC_ENABLE = lite
-MOUSEKEY_ENABLE = no
-EXTRAKEY_ENABLE = yes
-CONSOLE_ENABLE = no
-COMMAND_ENABLE = yes
-BACKLIGHT_ENABLE = yes
-RGBLIGHT_ENABLE = no
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite     # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no        # Mouse keys
+EXTRAKEY_ENABLE = yes       # Audio control and System control
+CONSOLE_ENABLE = no         # 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
+BACKLIGHT_ENABLE = yes      # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no        # Enable keyboard RGB underglow
 WS2812_DRIVER = i2c
+
+LAYOUTS = 60_ansi_split_bs_rshift 60_hhkb

Some files were not shown because too many files changed in this diff