diff options
| -rw-r--r-- | keyboards/handwired/atreus50/Makefile | 3 | ||||
| -rw-r--r-- | keyboards/handwired/atreus50/atreus50.c | 10 | ||||
| -rw-r--r-- | keyboards/handwired/atreus50/atreus50.h | 36 | ||||
| -rw-r--r-- | keyboards/handwired/atreus50/config.h | 163 | ||||
| -rw-r--r-- | keyboards/handwired/atreus50/keymaps/default/Makefile | 6 | ||||
| -rw-r--r-- | keyboards/handwired/atreus50/keymaps/default/keymap.c | 250 | ||||
| -rw-r--r-- | keyboards/handwired/atreus50/readme.md | 16 | ||||
| -rw-r--r-- | keyboards/handwired/atreus50/rules.mk | 81 |
8 files changed, 565 insertions, 0 deletions
diff --git a/keyboards/handwired/atreus50/Makefile b/keyboards/handwired/atreus50/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/handwired/atreus50/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef MAKEFILE_INCLUDED | ||
| 2 | include ../../Makefile | ||
| 3 | endif | ||
diff --git a/keyboards/handwired/atreus50/atreus50.c b/keyboards/handwired/atreus50/atreus50.c new file mode 100644 index 000000000..225a51bcc --- /dev/null +++ b/keyboards/handwired/atreus50/atreus50.c | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #include "atreus50.h" | ||
| 2 | |||
| 3 | void matrix_init_kb(void) { | ||
| 4 | |||
| 5 | // Turn status LED on | ||
| 6 | //DDRE |= (1<<6); | ||
| 7 | PORTE |= (1<<6); | ||
| 8 | |||
| 9 | matrix_init_user(); | ||
| 10 | }; | ||
diff --git a/keyboards/handwired/atreus50/atreus50.h b/keyboards/handwired/atreus50/atreus50.h new file mode 100644 index 000000000..de06f255e --- /dev/null +++ b/keyboards/handwired/atreus50/atreus50.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | #ifndef ATREUS50_H | ||
| 2 | #define ATREUS50_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | // The first section contains all of the arguements | ||
| 7 | // The second converts the arguments into a two-dimensional array | ||
| 8 | #define KEYMAP( \ | ||
| 9 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
| 10 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
| 11 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
| 12 | k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \ | ||
| 13 | ) \ | ||
| 14 | { \ | ||
| 15 | { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \ | ||
| 16 | { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \ | ||
| 17 | { k20, k21, k22, k23, k24, k25, km0, k26, k27, k28, k29, k2a, k2b }, \ | ||
| 18 | { k30, k31, k32, k33, k34, k35, km1, k36, k37, k38, k39, k3a, k3b } \ | ||
| 19 | } | ||
| 20 | |||
| 21 | #define COMPACT_KEYMAP( \ | ||
| 22 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ | ||
| 23 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ | ||
| 24 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ | ||
| 25 | k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \ | ||
| 26 | ) \ | ||
| 27 | { \ | ||
| 28 | { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \ | ||
| 29 | { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \ | ||
| 30 | { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##km0, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \ | ||
| 31 | { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##km1, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b } \ | ||
| 32 | } | ||
| 33 | |||
| 34 | #define KC_ KC_TRNS | ||
| 35 | |||
| 36 | #endif | ||
diff --git a/keyboards/handwired/atreus50/config.h b/keyboards/handwired/atreus50/config.h new file mode 100644 index 000000000..2e34e0f89 --- /dev/null +++ b/keyboards/handwired/atreus50/config.h | |||
| @@ -0,0 +1,163 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef CONFIG_H | ||
| 19 | #define CONFIG_H | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | /* USB Device descriptor parameter */ | ||
| 24 | #define VENDOR_ID 0xBB80 | ||
| 25 | #define PRODUCT_ID 0x040D | ||
| 26 | #define DEVICE_VER 0x0001 | ||
| 27 | #define MANUFACTURER Hexwire | ||
| 28 | #define PRODUCT Atreus 50 Keyboard | ||
| 29 | #define DESCRIPTION Atreus layout with extra column | ||
| 30 | |||
| 31 | /* key matrix size */ | ||
| 32 | #define MATRIX_ROWS 4 | ||
| 33 | #define MATRIX_COLS 13 | ||
| 34 | |||
| 35 | /* Planck PCB default pin-out */ | ||
| 36 | #define MATRIX_ROW_PINS { D3, D2, D1, D0 } | ||
| 37 | #define MATRIX_COL_PINS { D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } | ||
| 38 | #define UNUSED_PINS | ||
| 39 | |||
| 40 | /* COL2ROW or ROW2COL */ | ||
| 41 | #define DIODE_DIRECTION COL2ROW | ||
| 42 | |||
| 43 | // #define BACKLIGHT_PIN B7 | ||
| 44 | // #define BACKLIGHT_BREATHING | ||
| 45 | // #define BACKLIGHT_LEVELS 3 | ||
| 46 | |||
| 47 | |||
| 48 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 49 | #define DEBOUNCING_DELAY 5 | ||
| 50 | |||
| 51 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 52 | //#define MATRIX_HAS_GHOST | ||
| 53 | |||
| 54 | /* number of backlight levels */ | ||
| 55 | |||
| 56 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 57 | #define LOCKING_SUPPORT_ENABLE | ||
| 58 | /* Locking resynchronize hack */ | ||
| 59 | #define LOCKING_RESYNC_ENABLE | ||
| 60 | |||
| 61 | |||
| 62 | /* ws2812 RGB LED */ | ||
| 63 | #define RGB_DI_PIN C6 | ||
| 64 | #define RGBLIGHT_ANIMATIONS | ||
| 65 | #define RGBLED_NUM 12 // Number of LEDs | ||
| 66 | #define RGBLIGHT_HUE_STEP 10 | ||
| 67 | #define RGBLIGHT_SAT_STEP 17 | ||
| 68 | #define RGBLIGHT_VAL_STEP 17 | ||
| 69 | |||
| 70 | |||
| 71 | /* | ||
| 72 | * Force NKRO | ||
| 73 | * | ||
| 74 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 75 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 76 | * makefile for this to work.) | ||
| 77 | * | ||
| 78 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 79 | * until the next keyboard reset. | ||
| 80 | * | ||
| 81 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 82 | * fully operational during normal computer usage. | ||
| 83 | * | ||
| 84 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 85 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 86 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 87 | * power-up. | ||
| 88 | * | ||
| 89 | */ | ||
| 90 | //#define FORCE_NKRO | ||
| 91 | |||
| 92 | /* | ||
| 93 | * Magic Key Options | ||
| 94 | * | ||
| 95 | * Magic keys are hotkey commands that allow control over firmware functions of | ||
| 96 | * the keyboard. They are best used in combination with the HID Listen program, | ||
| 97 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
| 98 | * | ||
| 99 | * The options below allow the magic key functionality to be changed. This is | ||
| 100 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
| 101 | * | ||
| 102 | */ | ||
| 103 | |||
| 104 | /* key combination for magic key command */ | ||
| 105 | #define IS_COMMAND() ( \ | ||
| 106 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 107 | ) | ||
| 108 | |||
| 109 | /* control how magic key switches layers */ | ||
| 110 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | ||
| 111 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | ||
| 112 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | ||
| 113 | |||
| 114 | /* override magic key keymap */ | ||
| 115 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | ||
| 116 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | ||
| 117 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | ||
| 118 | //#define MAGIC_KEY_HELP1 H | ||
| 119 | //#define MAGIC_KEY_HELP2 SLASH | ||
| 120 | //#define MAGIC_KEY_DEBUG D | ||
| 121 | //#define MAGIC_KEY_DEBUG_MATRIX X | ||
| 122 | //#define MAGIC_KEY_DEBUG_KBD K | ||
| 123 | //#define MAGIC_KEY_DEBUG_MOUSE M | ||
| 124 | //#define MAGIC_KEY_VERSION V | ||
| 125 | //#define MAGIC_KEY_STATUS S | ||
| 126 | //#define MAGIC_KEY_CONSOLE C | ||
| 127 | //#define MAGIC_KEY_LAYER0_ALT1 ESC | ||
| 128 | //#define MAGIC_KEY_LAYER0_ALT2 GRAVE | ||
| 129 | //#define MAGIC_KEY_LAYER0 0 | ||
| 130 | //#define MAGIC_KEY_LAYER1 1 | ||
| 131 | //#define MAGIC_KEY_LAYER2 2 | ||
| 132 | //#define MAGIC_KEY_LAYER3 3 | ||
| 133 | //#define MAGIC_KEY_LAYER4 4 | ||
| 134 | //#define MAGIC_KEY_LAYER5 5 | ||
| 135 | //#define MAGIC_KEY_LAYER6 6 | ||
| 136 | //#define MAGIC_KEY_LAYER7 7 | ||
| 137 | //#define MAGIC_KEY_LAYER8 8 | ||
| 138 | //#define MAGIC_KEY_LAYER9 9 | ||
| 139 | //#define MAGIC_KEY_BOOTLOADER PAUSE | ||
| 140 | //#define MAGIC_KEY_LOCK CAPS | ||
| 141 | //#define MAGIC_KEY_EEPROM E | ||
| 142 | //#define MAGIC_KEY_NKRO N | ||
| 143 | //#define MAGIC_KEY_SLEEP_LED Z | ||
| 144 | |||
| 145 | /* | ||
| 146 | * Feature disable options | ||
| 147 | * These options are also useful to firmware size reduction. | ||
| 148 | */ | ||
| 149 | |||
| 150 | /* disable debug print */ | ||
| 151 | //#define NO_DEBUG | ||
| 152 | |||
| 153 | /* disable print */ | ||
| 154 | //#define NO_PRINT | ||
| 155 | |||
| 156 | /* disable action features */ | ||
| 157 | //#define NO_ACTION_LAYER | ||
| 158 | //#define NO_ACTION_TAPPING | ||
| 159 | //#define NO_ACTION_ONESHOT | ||
| 160 | //#define NO_ACTION_MACRO | ||
| 161 | //#define NO_ACTION_FUNCTION | ||
| 162 | |||
| 163 | #endif | ||
diff --git a/keyboards/handwired/atreus50/keymaps/default/Makefile b/keyboards/handwired/atreus50/keymaps/default/Makefile new file mode 100644 index 000000000..d7b0fa7fd --- /dev/null +++ b/keyboards/handwired/atreus50/keymaps/default/Makefile | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | RGBLIGHT_ENABLE = yes | ||
| 2 | AUDIO_ENABLE = no | ||
| 3 | |||
| 4 | ifndef QUANTUM_DIR | ||
| 5 | include ../../../../Makefile | ||
| 6 | endif \ No newline at end of file | ||
diff --git a/keyboards/handwired/atreus50/keymaps/default/keymap.c b/keyboards/handwired/atreus50/keymaps/default/keymap.c new file mode 100644 index 000000000..415405ec2 --- /dev/null +++ b/keyboards/handwired/atreus50/keymaps/default/keymap.c | |||
| @@ -0,0 +1,250 @@ | |||
| 1 | #include "atreus50.h" | ||
| 2 | #include "action_layer.h" | ||
| 3 | #include "eeconfig.h" | ||
| 4 | #ifdef AUDIO_ENABLE | ||
| 5 | #include "audio.h" | ||
| 6 | #endif | ||
| 7 | |||
| 8 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 9 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 10 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 11 | // entirely and just use numbers. | ||
| 12 | #define _QWERTY 0 | ||
| 13 | #define _COLEMAK 1 | ||
| 14 | #define _DVORAK 2 | ||
| 15 | #define _LOWER 3 | ||
| 16 | #define _RAISE 4 | ||
| 17 | #define _MOVEMENT 5 | ||
| 18 | #define _ADJUST 16 | ||
| 19 | |||
| 20 | enum custom_keycodes { | ||
| 21 | QWERTY = SAFE_RANGE, | ||
| 22 | COLEMAK, | ||
| 23 | DVORAK, | ||
| 24 | LOWER, | ||
| 25 | RAISE, | ||
| 26 | MOVEMENT, | ||
| 27 | BACKLIT | ||
| 28 | }; | ||
| 29 | |||
| 30 | // Fillers to make layering more clear | ||
| 31 | #define _______ KC_TRNS | ||
| 32 | #define XXXXXXX KC_NO | ||
| 33 | #define KC_X0 MT(MOD_LCTL, KC_ESC) // Hold for Left Ctrl, Tap for ESC | ||
| 34 | #define KC_X1 LOWER | ||
| 35 | #define KC_X2 RAISE | ||
| 36 | #define KC_X3 MO(_MOVEMENT) | ||
| 37 | #define KC_X4 MT(MOD_LSFT, KC_ENT) // Hold for Left Shift, Tap for Enter | ||
| 38 | |||
| 39 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 40 | |||
| 41 | [_QWERTY] = COMPACT_KEYMAP( | ||
| 42 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 43 | TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, | ||
| 44 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 45 | X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, | ||
| 46 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 47 | LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 , | ||
| 48 | //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| | ||
| 49 | GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT | ||
| 50 | //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' | ||
| 51 | ), | ||
| 52 | |||
| 53 | [_COLEMAK] = COMPACT_KEYMAP( | ||
| 54 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 55 | TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, | ||
| 56 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 57 | X0 , A , R , S , T , D , H , N , E , I , O ,QUOT, | ||
| 58 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 59 | LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 , | ||
| 60 | //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| | ||
| 61 | GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT | ||
| 62 | //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' | ||
| 63 | ), | ||
| 64 | |||
| 65 | [_DVORAK] = COMPACT_KEYMAP( | ||
| 66 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 67 | TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, | ||
| 68 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 69 | X0 , A , O , E , U , I , D , H , R , N , S ,SLSH, | ||
| 70 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 71 | LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 , | ||
| 72 | //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| | ||
| 73 | GRV ,LCTL,LALT,LGUI, X1 ,SPC , X3 ,RSFT,BSPC, X2 ,LEFT,DOWN, UP ,RGHT | ||
| 74 | //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' | ||
| 75 | ), | ||
| 76 | |||
| 77 | [_LOWER] = COMPACT_KEYMAP( | ||
| 78 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 79 | TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL , | ||
| 80 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 81 | DEL , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR,PIPE, | ||
| 82 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 83 | , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , , | ||
| 84 | //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| | ||
| 85 | , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY | ||
| 86 | //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' | ||
| 87 | ), | ||
| 88 | |||
| 89 | [_RAISE] = COMPACT_KEYMAP( | ||
| 90 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 91 | GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,DEL , | ||
| 92 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 93 | DEL , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC,BSLS, | ||
| 94 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 95 | , F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , , | ||
| 96 | //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| | ||
| 97 | , , , , , , , , , ,MNXT,VOLD,VOLU,MPLY | ||
| 98 | //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' | ||
| 99 | ), | ||
| 100 | |||
| 101 | [_MOVEMENT] = COMPACT_KEYMAP( | ||
| 102 | //,----+----+----+----+----+----. ,----+----+----+----+----+----. | ||
| 103 | TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR, UP ,LPRN,RPRN,DEL , | ||
| 104 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 105 | DEL , F1 , F2 , F3 , F4 , F5 , F6 ,LEFT,DOWN,RGHT,RCBR,PIPE, | ||
| 106 | //|----+----+----+----+----+----| |----+----+----+----+----+----| | ||
| 107 | , F7 , F8 , F9 ,F10 ,F11 , F12 ,END , , , , , | ||
| 108 | //|----+----+----+----+----+----|----+----|----+----+----+----+----+----| | ||
| 109 | , , , , , , , ,PGDN,PGUP,MNXT,VOLD,VOLU,MPLY | ||
| 110 | //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' | ||
| 111 | ), | ||
| 112 | |||
| 113 | /* Adjust (Lower + Raise) | ||
| 114 | * |------+------+------+------+------+------. ,------+------+------+------+------+------| | ||
| 115 | * | | Reset| | | | | | | | | | | Del | | ||
| 116 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 117 | * | | | |Audoff|Aud on|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | | | ||
| 118 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 119 | * | |Voice-|Voice+|Musoff|Mus on| | | | | | | | | | ||
| 120 | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 121 | * | | | | | | | | | | | | | | | | ||
| 122 | * `-------------------------------------------------------------------------------------------------' | ||
| 123 | */ | ||
| 124 | [_ADJUST] = KEYMAP( \ | ||
| 125 | _______, RESET, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \ | ||
| 126 | _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ | ||
| 127 | _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ | ||
| 128 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 129 | ) | ||
| 130 | |||
| 131 | }; | ||
| 132 | |||
| 133 | #ifdef AUDIO_ENABLE | ||
| 134 | float tone_startup[][2] = { | ||
| 135 | {NOTE_B5, 20}, | ||
| 136 | {NOTE_B6, 8}, | ||
| 137 | {NOTE_DS6, 20}, | ||
| 138 | {NOTE_B6, 8} | ||
| 139 | }; | ||
| 140 | |||
| 141 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | ||
| 142 | float tone_dvorak[][2] = SONG(DVORAK_SOUND); | ||
| 143 | float tone_colemak[][2] = SONG(COLEMAK_SOUND); | ||
| 144 | |||
| 145 | float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | ||
| 146 | |||
| 147 | float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); | ||
| 148 | #endif | ||
| 149 | |||
| 150 | void persistant_default_layer_set(uint16_t default_layer) { | ||
| 151 | eeconfig_update_default_layer(default_layer); | ||
| 152 | default_layer_set(default_layer); | ||
| 153 | } | ||
| 154 | |||
| 155 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 156 | switch (keycode) { | ||
| 157 | case QWERTY: | ||
| 158 | if (record->event.pressed) { | ||
| 159 | #ifdef AUDIO_ENABLE | ||
| 160 | PLAY_NOTE_ARRAY(tone_qwerty, false, 0); | ||
| 161 | #endif | ||
| 162 | persistant_default_layer_set(1UL<<_QWERTY); | ||
| 163 | } | ||
| 164 | return false; | ||
| 165 | break; | ||
| 166 | case COLEMAK: | ||
| 167 | if (record->event.pressed) { | ||
| 168 | #ifdef AUDIO_ENABLE | ||
| 169 | PLAY_NOTE_ARRAY(tone_colemak, false, 0); | ||
| 170 | #endif | ||
| 171 | persistant_default_layer_set(1UL<<_COLEMAK); | ||
| 172 | } | ||
| 173 | return false; | ||
| 174 | break; | ||
| 175 | case DVORAK: | ||
| 176 | if (record->event.pressed) { | ||
| 177 | #ifdef AUDIO_ENABLE | ||
| 178 | PLAY_NOTE_ARRAY(tone_dvorak, false, 0); | ||
| 179 | #endif | ||
| 180 | persistant_default_layer_set(1UL<<_DVORAK); | ||
| 181 | } | ||
| 182 | return false; | ||
| 183 | break; | ||
| 184 | case LOWER: | ||
| 185 | if (record->event.pressed) { | ||
| 186 | layer_on(_LOWER); | ||
| 187 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 188 | } else { | ||
| 189 | layer_off(_LOWER); | ||
| 190 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 191 | } | ||
| 192 | return false; | ||
| 193 | break; | ||
| 194 | case RAISE: | ||
| 195 | if (record->event.pressed) { | ||
| 196 | layer_on(_RAISE); | ||
| 197 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 198 | } else { | ||
| 199 | layer_off(_RAISE); | ||
| 200 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 201 | } | ||
| 202 | return false; | ||
| 203 | break; | ||
| 204 | case BACKLIT: | ||
| 205 | if (record->event.pressed) { | ||
| 206 | register_code(KC_RSFT); | ||
| 207 | #ifdef BACKLIGHT_ENABLE | ||
| 208 | backlight_step(); | ||
| 209 | #endif | ||
| 210 | } else { | ||
| 211 | unregister_code(KC_RSFT); | ||
| 212 | } | ||
| 213 | return false; | ||
| 214 | break; | ||
| 215 | } | ||
| 216 | return true; | ||
| 217 | }; | ||
| 218 | |||
| 219 | void matrix_init_user(void) { | ||
| 220 | #ifdef AUDIO_ENABLE | ||
| 221 | startup_user(); | ||
| 222 | #endif | ||
| 223 | } | ||
| 224 | |||
| 225 | #ifdef AUDIO_ENABLE | ||
| 226 | |||
| 227 | void startup_user() | ||
| 228 | { | ||
| 229 | _delay_ms(20); // gets rid of tick | ||
| 230 | PLAY_NOTE_ARRAY(tone_startup, false, 0); | ||
| 231 | } | ||
| 232 | |||
| 233 | void shutdown_user() | ||
| 234 | { | ||
| 235 | PLAY_NOTE_ARRAY(tone_goodbye, false, 0); | ||
| 236 | _delay_ms(150); | ||
| 237 | stop_all_notes(); | ||
| 238 | } | ||
| 239 | |||
| 240 | void music_on_user(void) | ||
| 241 | { | ||
| 242 | music_scale_user(); | ||
| 243 | } | ||
| 244 | |||
| 245 | void music_scale_user(void) | ||
| 246 | { | ||
| 247 | PLAY_NOTE_ARRAY(music_scale, false, 0); | ||
| 248 | } | ||
| 249 | |||
| 250 | #endif | ||
diff --git a/keyboards/handwired/atreus50/readme.md b/keyboards/handwired/atreus50/readme.md new file mode 100644 index 000000000..0c24f67db --- /dev/null +++ b/keyboards/handwired/atreus50/readme.md | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | Handwired Atreus50 | ||
| 2 | ================== | ||
| 3 | |||
| 4 | This firmware is for a Handwired Atreus50 using an Arduino Pro Micro. | ||
| 5 | |||
| 6 | ## Pinout | ||
| 7 | |||
| 8 | The following pins are used: | ||
| 9 | - Columns 1-13: D4, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 | ||
| 10 | - Rows 1-4: D3, D2, D1, D0 | ||
| 11 | |||
| 12 | ## Compiling and loading the firmware | ||
| 13 | |||
| 14 | To build the firmware, run `make`. | ||
| 15 | |||
| 16 | To flash the firemware onto the microcontroller, run `make avrdude`, and press the reset button. | ||
diff --git a/keyboards/handwired/atreus50/rules.mk b/keyboards/handwired/atreus50/rules.mk new file mode 100644 index 000000000..7770ea2a2 --- /dev/null +++ b/keyboards/handwired/atreus50/rules.mk | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | |||
| 2 | |||
| 3 | # MCU name | ||
| 4 | #MCU = at90usb1287 | ||
| 5 | MCU = atmega32u4 | ||
| 6 | |||
| 7 | # Processor frequency. | ||
| 8 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 9 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 10 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 11 | # automatically to create a 32-bit value in your source code. | ||
| 12 | # | ||
| 13 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 14 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 15 | # does not *change* the processor frequency - it should merely be updated to | ||
| 16 | # reflect the processor speed set externally so that the code can use accurate | ||
| 17 | # software delays. | ||
| 18 | F_CPU = 16000000 | ||
| 19 | |||
| 20 | # | ||
| 21 | # LUFA specific | ||
| 22 | # | ||
| 23 | # Target architecture (see library "Board Types" documentation). | ||
| 24 | ARCH = AVR8 | ||
| 25 | |||
| 26 | # Input clock frequency. | ||
| 27 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 28 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 29 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 30 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 31 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 32 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 33 | # source code. | ||
| 34 | # | ||
| 35 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 36 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 37 | F_USB = $(F_CPU) | ||
| 38 | |||
| 39 | # Interrupt driven control endpoint task(+60) | ||
| 40 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 41 | |||
| 42 | |||
| 43 | # Boot Section Size in *bytes* | ||
| 44 | # Teensy halfKay 512 | ||
| 45 | # Teensy++ halfKay 1024 | ||
| 46 | # Atmel DFU loader 4096 | ||
| 47 | # LUFA bootloader 4096 | ||
| 48 | # USBaspLoader 2048 | ||
| 49 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 50 | |||
| 51 | # Build Options | ||
| 52 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 53 | # the appropriate keymap folder that will get included automatically | ||
| 54 | # | ||
| 55 | BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) | ||
| 56 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | ||
| 57 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | ||
| 58 | CONSOLE_ENABLE ?= no # Console for debug(+400) | ||
| 59 | COMMAND_ENABLE ?= yes # Commands for debug and configuration | ||
| 60 | NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 61 | BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality | ||
| 62 | MIDI_ENABLE ?= no # MIDI controls | ||
| 63 | AUDIO_ENABLE ?= no # Audio output on port C6 | ||
| 64 | UNICODE_ENABLE ?= no # Unicode | ||
| 65 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 66 | RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 67 | |||
| 68 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 69 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | ||
| 70 | |||
| 71 | avrdude: build | ||
| 72 | ls /dev/tty* > /tmp/1; \ | ||
| 73 | echo "Reset your Pro Micro now"; \ | ||
| 74 | while [[ -z $$USB ]]; do \ | ||
| 75 | sleep 1; \ | ||
| 76 | ls /dev/tty* > /tmp/2; \ | ||
| 77 | USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ | ||
| 78 | done; \ | ||
| 79 | avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex | ||
| 80 | |||
| 81 | .PHONY: avrdude | ||
