diff options
| author | ENDO Katsuhiro <ka2hiro@curlybracket.co.jp> | 2019-05-17 01:39:06 +0900 |
|---|---|---|
| committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-05-16 09:39:06 -0700 |
| commit | 63ddad86a92f11725548cd9775f82e7293aef050 (patch) | |
| tree | 17ff86e72bda4fdaf55e6915e014acc500c86767 /keyboards/halberd | |
| parent | 1a28906a3da1f14034b81871b90bcce0ed56c286 (diff) | |
| download | qmk_firmware-63ddad86a92f11725548cd9775f82e7293aef050.tar.gz qmk_firmware-63ddad86a92f11725548cd9775f82e7293aef050.zip | |
Add a new keyboard Halberd (#5874)
* Add a new keyboard Halberd.
* Update default keymap and add new keymap.
* Use pragma once.
* Comment out IS_COMMAND macro.
* Remove unnecessary backslashes.
* Remove dead code.
* Change layer defines to enum.
* Remove DISABLE_JTAG definition.
* Change BOOTMAGIC_ENABLE to "lite".
* Remove unnecessary line.
Co-Authored-By: fauxpark <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/halberd')
| -rw-r--r-- | keyboards/halberd/config.h | 232 | ||||
| -rw-r--r-- | keyboards/halberd/halberd.c | 43 | ||||
| -rw-r--r-- | keyboards/halberd/halberd.h | 40 | ||||
| -rw-r--r-- | keyboards/halberd/info.json | 13 | ||||
| -rw-r--r-- | keyboards/halberd/keymaps/default/config.h | 19 | ||||
| -rw-r--r-- | keyboards/halberd/keymaps/default/keymap.c | 160 | ||||
| -rw-r--r-- | keyboards/halberd/keymaps/default/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/halberd/keymaps/right_modifiers/config.h | 19 | ||||
| -rw-r--r-- | keyboards/halberd/keymaps/right_modifiers/keymap.c | 160 | ||||
| -rw-r--r-- | keyboards/halberd/keymaps/right_modifiers/readme.md | 2 | ||||
| -rw-r--r-- | keyboards/halberd/readme.md | 15 | ||||
| -rw-r--r-- | keyboards/halberd/rules.mk | 80 |
12 files changed, 784 insertions, 0 deletions
diff --git a/keyboards/halberd/config.h b/keyboards/halberd/config.h new file mode 100644 index 000000000..ab46c4d8a --- /dev/null +++ b/keyboards/halberd/config.h | |||
| @@ -0,0 +1,232 @@ | |||
| 1 | /* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp> | ||
| 2 | |||
| 3 | This program is free software: you can redistribute it and/or modify | ||
| 4 | it under the terms of the GNU General Public License as published by | ||
| 5 | the Free Software Foundation, either version 2 of the License, or | ||
| 6 | (at your option) any later version. | ||
| 7 | |||
| 8 | This program is distributed in the hope that it will be useful, | ||
| 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | GNU General Public License for more details. | ||
| 12 | |||
| 13 | You should have received a copy of the GNU General Public License | ||
| 14 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include "config_common.h" | ||
| 20 | |||
| 21 | /* USB Device descriptor parameter */ | ||
| 22 | #define VENDOR_ID 0xFEED | ||
| 23 | #define PRODUCT_ID 0x0000 | ||
| 24 | #define DEVICE_VER 0x0001 | ||
| 25 | #define MANUFACTURER Kagizaraya | ||
| 26 | #define PRODUCT Halberd | ||
| 27 | #define DESCRIPTION 40% keyboard | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 4 | ||
| 31 | #define MATRIX_COLS 11 | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Keyboard Matrix Assignments | ||
| 35 | * | ||
| 36 | * Change this to how you wired your keyboard | ||
| 37 | * COLS: AVR pins used for columns, left to right | ||
| 38 | * ROWS: AVR pins used for rows, top to bottom | ||
| 39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 41 | * | ||
| 42 | */ | ||
| 43 | #define MATRIX_ROW_PINS { D6, D4, D5, E6 } | ||
| 44 | #define MATRIX_COL_PINS { D7, B4, C7, C6, B6, B5, F7, F6, F5, F4, F1 } | ||
| 45 | #define UNUSED_PINS | ||
| 46 | |||
| 47 | /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ | ||
| 48 | #define DIODE_DIRECTION COL2ROW | ||
| 49 | |||
| 50 | // #define BACKLIGHT_PIN B7 | ||
| 51 | // #define BACKLIGHT_BREATHING | ||
| 52 | // #define BACKLIGHT_LEVELS 3 | ||
| 53 | |||
| 54 | #define RGB_DI_PIN F0 | ||
| 55 | #ifdef RGB_DI_PIN | ||
| 56 | #define RGBLIGHT_ANIMATIONS | ||
| 57 | #define RGBLED_NUM 40 | ||
| 58 | #define RGBLIGHT_HUE_STEP 8 | ||
| 59 | #define RGBLIGHT_SAT_STEP 8 | ||
| 60 | #define RGBLIGHT_VAL_STEP 8 | ||
| 61 | #endif | ||
| 62 | |||
| 63 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 64 | #define DEBOUNCING_DELAY 5 | ||
| 65 | |||
| 66 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 67 | //#define MATRIX_HAS_GHOST | ||
| 68 | |||
| 69 | /* number of backlight levels */ | ||
| 70 | |||
| 71 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 72 | #define LOCKING_SUPPORT_ENABLE | ||
| 73 | /* Locking resynchronize hack */ | ||
| 74 | #define LOCKING_RESYNC_ENABLE | ||
| 75 | |||
| 76 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
| 77 | * This is userful for the Windows task manager shortcut (ctrl+shift+esc). | ||
| 78 | */ | ||
| 79 | // #define GRAVE_ESC_CTRL_OVERRIDE | ||
| 80 | |||
| 81 | /* | ||
| 82 | * Force NKRO | ||
| 83 | * | ||
| 84 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 85 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 86 | * makefile for this to work.) | ||
| 87 | * | ||
| 88 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 89 | * until the next keyboard reset. | ||
| 90 | * | ||
| 91 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 92 | * fully operational during normal computer usage. | ||
| 93 | * | ||
| 94 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 95 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 96 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 97 | * power-up. | ||
| 98 | * | ||
| 99 | */ | ||
| 100 | //#define FORCE_NKRO | ||
| 101 | |||
| 102 | /* | ||
| 103 | * Magic Key Options | ||
| 104 | * | ||
| 105 | * Magic keys are hotkey commands that allow control over firmware functions of | ||
| 106 | * the keyboard. They are best used in combination with the HID Listen program, | ||
| 107 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
| 108 | * | ||
| 109 | * The options below allow the magic key functionality to be changed. This is | ||
| 110 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
| 111 | * | ||
| 112 | */ | ||
| 113 | |||
| 114 | /* key combination for magic key command */ | ||
| 115 | /* | ||
| 116 | #define IS_COMMAND() ( \ | ||
| 117 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 118 | ) | ||
| 119 | */ | ||
| 120 | |||
| 121 | /* control how magic key switches layers */ | ||
| 122 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | ||
| 123 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | ||
| 124 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | ||
| 125 | |||
| 126 | /* override magic key keymap */ | ||
| 127 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | ||
| 128 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | ||
| 129 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | ||
| 130 | //#define MAGIC_KEY_HELP1 H | ||
| 131 | //#define MAGIC_KEY_HELP2 SLASH | ||
| 132 | //#define MAGIC_KEY_DEBUG D | ||
| 133 | //#define MAGIC_KEY_DEBUG_MATRIX X | ||
| 134 | //#define MAGIC_KEY_DEBUG_KBD K | ||
| 135 | //#define MAGIC_KEY_DEBUG_MOUSE M | ||
| 136 | //#define MAGIC_KEY_VERSION V | ||
| 137 | //#define MAGIC_KEY_STATUS S | ||
| 138 | //#define MAGIC_KEY_CONSOLE C | ||
| 139 | //#define MAGIC_KEY_LAYER0_ALT1 ESC | ||
| 140 | //#define MAGIC_KEY_LAYER0_ALT2 GRAVE | ||
| 141 | //#define MAGIC_KEY_LAYER0 0 | ||
| 142 | //#define MAGIC_KEY_LAYER1 1 | ||
| 143 | //#define MAGIC_KEY_LAYER2 2 | ||
| 144 | //#define MAGIC_KEY_LAYER3 3 | ||
| 145 | //#define MAGIC_KEY_LAYER4 4 | ||
| 146 | //#define MAGIC_KEY_LAYER5 5 | ||
| 147 | //#define MAGIC_KEY_LAYER6 6 | ||
| 148 | //#define MAGIC_KEY_LAYER7 7 | ||
| 149 | //#define MAGIC_KEY_LAYER8 8 | ||
| 150 | //#define MAGIC_KEY_LAYER9 9 | ||
| 151 | //#define MAGIC_KEY_BOOTLOADER PAUSE | ||
| 152 | //#define MAGIC_KEY_LOCK CAPS | ||
| 153 | //#define MAGIC_KEY_EEPROM E | ||
| 154 | //#define MAGIC_KEY_NKRO N | ||
| 155 | //#define MAGIC_KEY_SLEEP_LED Z | ||
| 156 | |||
| 157 | /* | ||
| 158 | * Feature disable options | ||
| 159 | * These options are also useful to firmware size reduction. | ||
| 160 | */ | ||
| 161 | |||
| 162 | /* disable debug print */ | ||
| 163 | //#define NO_DEBUG | ||
| 164 | |||
| 165 | /* disable print */ | ||
| 166 | //#define NO_PRINT | ||
| 167 | |||
| 168 | /* disable action features */ | ||
| 169 | //#define NO_ACTION_LAYER | ||
| 170 | //#define NO_ACTION_TAPPING | ||
| 171 | //#define NO_ACTION_ONESHOT | ||
| 172 | //#define NO_ACTION_MACRO | ||
| 173 | //#define NO_ACTION_FUNCTION | ||
| 174 | |||
| 175 | /* | ||
| 176 | * MIDI options | ||
| 177 | */ | ||
| 178 | |||
| 179 | /* Prevent use of disabled MIDI features in the keymap */ | ||
| 180 | //#define MIDI_ENABLE_STRICT 1 | ||
| 181 | |||
| 182 | /* enable basic MIDI features: | ||
| 183 | - MIDI notes can be sent when in Music mode is on | ||
| 184 | */ | ||
| 185 | //#define MIDI_BASIC | ||
| 186 | |||
| 187 | /* enable advanced MIDI features: | ||
| 188 | - MIDI notes can be added to the keymap | ||
| 189 | - Octave shift and transpose | ||
| 190 | - Virtual sustain, portamento, and modulation wheel | ||
| 191 | - etc. | ||
| 192 | */ | ||
| 193 | //#define MIDI_ADVANCED | ||
| 194 | |||
| 195 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
| 196 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | ||
| 197 | |||
| 198 | /* | ||
| 199 | * HD44780 LCD Display Configuration | ||
| 200 | */ | ||
| 201 | /* | ||
| 202 | #define LCD_LINES 2 //< number of visible lines of the display | ||
| 203 | #define LCD_DISP_LENGTH 16 //< visibles characters per line of the display | ||
| 204 | |||
| 205 | #define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode | ||
| 206 | |||
| 207 | #if LCD_IO_MODE | ||
| 208 | #define LCD_PORT PORTB //< port for the LCD lines | ||
| 209 | #define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 | ||
| 210 | #define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 | ||
| 211 | #define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 | ||
| 212 | #define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 | ||
| 213 | #define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 | ||
| 214 | #define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 | ||
| 215 | #define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 | ||
| 216 | #define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 | ||
| 217 | #define LCD_RS_PORT LCD_PORT //< port for RS line | ||
| 218 | #define LCD_RS_PIN 3 //< pin for RS line | ||
| 219 | #define LCD_RW_PORT LCD_PORT //< port for RW line | ||
| 220 | #define LCD_RW_PIN 2 //< pin for RW line | ||
| 221 | #define LCD_E_PORT LCD_PORT //< port for Enable line | ||
| 222 | #define LCD_E_PIN 1 //< pin for Enable line | ||
| 223 | #endif | ||
| 224 | */ | ||
| 225 | |||
| 226 | /* Bootmagic Lite key configuration */ | ||
| 227 | // #define BOOTMAGIC_LITE_ROW 0 | ||
| 228 | // #define BOOTMAGIC_LITE_COLUMN 0 | ||
| 229 | |||
| 230 | #define TAPPING_TERM 100 | ||
| 231 | |||
| 232 | |||
diff --git a/keyboards/halberd/halberd.c b/keyboards/halberd/halberd.c new file mode 100644 index 000000000..8b59310a7 --- /dev/null +++ b/keyboards/halberd/halberd.c | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include "halberd.h" | ||
| 17 | |||
| 18 | void matrix_init_kb(void) { | ||
| 19 | // put your keyboard start-up code here | ||
| 20 | // runs once when the firmware starts up | ||
| 21 | |||
| 22 | matrix_init_user(); | ||
| 23 | } | ||
| 24 | |||
| 25 | void matrix_scan_kb(void) { | ||
| 26 | // put your looping keyboard code here | ||
| 27 | // runs every cycle (a lot) | ||
| 28 | |||
| 29 | matrix_scan_user(); | ||
| 30 | } | ||
| 31 | |||
| 32 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 33 | // put your per-action keyboard code here | ||
| 34 | // runs for every action, just before processing by the firmware | ||
| 35 | |||
| 36 | return process_record_user(keycode, record); | ||
| 37 | } | ||
| 38 | |||
| 39 | void led_set_kb(uint8_t usb_led) { | ||
| 40 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
| 41 | |||
| 42 | led_set_user(usb_led); | ||
| 43 | } | ||
diff --git a/keyboards/halberd/halberd.h b/keyboards/halberd/halberd.h new file mode 100644 index 000000000..d2adb4a15 --- /dev/null +++ b/keyboards/halberd/halberd.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #pragma once | ||
| 17 | |||
| 18 | #include "quantum.h" | ||
| 19 | |||
| 20 | /* This a shortcut to help you visually see your layout. | ||
| 21 | * | ||
| 22 | * The first section contains all of the arguments representing the physical | ||
| 23 | * layout of the board and position of the keys. | ||
| 24 | * | ||
| 25 | * The second converts the arguments into a two-dimensional array which | ||
| 26 | * represents the switch matrix. | ||
| 27 | */ | ||
| 28 | #define LAYOUT( \ | ||
| 29 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, \ | ||
| 30 | K11, K12, K13, K14, K15, K16, K17, K18, K19, K20, K21, \ | ||
| 31 | K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, K32, \ | ||
| 32 | K33, K34, K35, K36, K37, K38, K39 \ | ||
| 33 | ) \ | ||
| 34 | { \ | ||
| 35 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10 }, \ | ||
| 36 | { K11, K12, K13, K14, K15, K16, K17, K18, K19, K20, K21 }, \ | ||
| 37 | { K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, K32 }, \ | ||
| 38 | { KC_NO, KC_NO, K33, K34, K35, K36, K37, K38, K39, KC_NO, KC_NO } \ | ||
| 39 | } | ||
| 40 | |||
diff --git a/keyboards/halberd/info.json b/keyboards/halberd/info.json new file mode 100644 index 000000000..5e2a57f21 --- /dev/null +++ b/keyboards/halberd/info.json | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Halberd", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "ka2hiro", | ||
| 5 | "width": 11, | ||
| 6 | "height": 4, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [{"label":"!", "x":0, "y":0}, {"label":"@", "x":1, "y":0}, {"label":"#", "x":2, "y":0}, {"label":"$", "x":3, "y":0}, {"label":"%", "x":4, "y":0}, {"label":"Tab", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"Tab", "x":0, "y":1}, {"label":"_", "x":1, "y":1}, {"label":"+", "x":2, "y":1}, {"label":"|", "x":3, "y":1}, {"label":"~", "x":4, "y":1}, {"label":"BkSp", "x":5, "y":1}, {"label":":", "x":6, "y":1}, {"label":"\"", "x":7, "y":1}, {"label":">", "x":8, "y":1}, {"label":"{", "x":9, "y":1}, {"label":"}", "x":10, "y":1}, {"label":"Caps", "x":0, "y":2}, {"label":"-", "x":1, "y":2}, {"label":"=", "x":2, "y":2}, {"label":"\\", "x":3, "y":2}, {"label":"`", "x":4, "y":2}, {"label":"Enter", "x":5, "y":2}, {"label":";", "x":6, "y":2}, {"label":"'", "x":7, "y":2}, {"label":"<", "x":8, "y":2}, {"label":"[", "x":9, "y":2}, {"label":"]", "x":10, "y":2}, {"label":"GUI", "x":2, "y":3}, {"label":"Lower", "x":3, "y":3}, {"label":"Esc", "x":4, "y":3}, {"x":5, "y":3}, {"label":"Shift", "x":6, "y":3}, {"label":"Raise", "x":7, "y":3}, {"label":"Alt", "x":8, "y":3}] | ||
| 10 | } | ||
| 11 | } | ||
| 12 | } | ||
| 13 | |||
diff --git a/keyboards/halberd/keymaps/default/config.h b/keyboards/halberd/keymaps/default/config.h new file mode 100644 index 000000000..cea12f905 --- /dev/null +++ b/keyboards/halberd/keymaps/default/config.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | // place overrides here | ||
diff --git a/keyboards/halberd/keymaps/default/keymap.c b/keyboards/halberd/keymaps/default/keymap.c new file mode 100644 index 000000000..c79a81def --- /dev/null +++ b/keyboards/halberd/keymaps/default/keymap.c | |||
| @@ -0,0 +1,160 @@ | |||
| 1 | /* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | // Defines the keycodes used by our macros in process_record_user | ||
| 19 | enum layer_names { | ||
| 20 | _QWERTY, | ||
| 21 | _LOWER, | ||
| 22 | _RAISE, | ||
| 23 | _ADJUST, | ||
| 24 | }; | ||
| 25 | |||
| 26 | // Defines the keycodes used by our macros in process_record_user | ||
| 27 | enum custom_keycodes { | ||
| 28 | QWERTY = SAFE_RANGE, | ||
| 29 | LOWER, | ||
| 30 | RAISE, | ||
| 31 | ADJUST, | ||
| 32 | }; | ||
| 33 | |||
| 34 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 35 | /* Qwerty | ||
| 36 | * | ||
| 37 | * ,----------------------------------------------------------------------------. | ||
| 38 | * | Q | W | E | R | T | Tab | Y | U | I | O | P | | ||
| 39 | * |------+------+------+------+------|------|------+------+------+------+------| | ||
| 40 | * | A | S | D | F | G | BkSp | H | J | K | L | ; | | ||
| 41 | * |------+------+------+------+------|------|------+------+------+------+------| | ||
| 42 | * | Z | X | C | V | B | Enter| N | M | , | . | / | | ||
| 43 | * `-------------+------+------+------|------|------+------+------+------+------' | ||
| 44 | * | GUI | LOWER|Ctrl/Esc|Space|Shift| RAISE| Alt | | ||
| 45 | * `------------------------------------------------' | ||
| 46 | */ | ||
| 47 | [_QWERTY] = LAYOUT( | ||
| 48 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
| 49 | KC_A, KC_S, KC_D, KC_F, KC_G, KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, | ||
| 50 | KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, | ||
| 51 | KC_LGUI, LOWER, MT(MOD_LCTL, KC_ESC), KC_SPC, KC_LSFT, RAISE, KC_LALT | ||
| 52 | ), | ||
| 53 | |||
| 54 | /* Raise | ||
| 55 | * | ||
| 56 | * ,----------------------------------------------------------------------------. | ||
| 57 | * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | ||
| 58 | * |------+------+------+------+------|------|------+------+------+------+------| | ||
| 59 | * | Tab | _ | + | | | ~ | | : | " | > | { | } | | ||
| 60 | * |------+------+------+------+------|------|------+------+------+------+------| | ||
| 61 | * | Caps| - | = | \ | ` | | ; | ' | < | [ | ] | | ||
| 62 | * `-------------+------+------+------|------|------+------+------+------+------' | ||
| 63 | * | | LOWER| | | Esc | RAISE| | | ||
| 64 | * `------------------------------------------------' | ||
| 65 | */ | ||
| 66 | [_RAISE] = LAYOUT( | ||
| 67 | KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, | ||
| 68 | KC_TAB, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, _______, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR, | ||
| 69 | KC_CAPS, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, _______, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC, | ||
| 70 | _______, _______, _______, _______, _______, _______, _______ | ||
| 71 | ), | ||
| 72 | |||
| 73 | /* Lower | ||
| 74 | * | ||
| 75 | * ,----------------------------------------------------------------------------. | ||
| 76 | * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | ||
| 77 | * |------+------+------+------+------|------|------+------+------+------+------| | ||
| 78 | * | Tab | | | |Enter | | Left | Down | Up | Right| Enter| | ||
| 79 | * |------+------+------+------+------|------|------+------+------+------+------| | ||
| 80 | * | Ctrl| | GUI | Alt | Del | | BkSp | PgUp | PgDn | | | | ||
| 81 | * `-------------+------+------+------|------|------+------+------+------+------' | ||
| 82 | * | | LOWER| | | | RAISE| | | ||
| 83 | * `------------------------------------------------' | ||
| 84 | */ | ||
| 85 | [_LOWER] = LAYOUT( | ||
| 86 | KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, | ||
| 87 | KC_TAB, _______, _______, _______, KC_ENT, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, | ||
| 88 | KC_LCTL, _______, KC_LGUI, KC_LALT, KC_DEL, _______, KC_BSPC, KC_PGUP, KC_PGDN, _______, _______, | ||
| 89 | _______, _______, _______, _______, _______, _______, _______ | ||
| 90 | ), | ||
| 91 | |||
| 92 | |||
| 93 | /* Adjust (Lower + Raise) | ||
| 94 | * | ||
| 95 | * ,----------------------------------------------------------------------------. | ||
| 96 | * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | ||
| 97 | * |------+------+------+------+------|------|------+------+------+------+------| | ||
| 98 | * | F11 | F12 | |RGBSAI|RGBSAD| |RGBVAI|RGBVAD| | | | | ||
| 99 | * |------+------+------+------+------|------|------+------+------+------+------| | ||
| 100 | * | Reset|RGBTOG|RGBMOD|RGBHUI|RGBHUD| | Prev | Next | Vol- | Vol+ | Play | | ||
| 101 | * `-------------+------+------+------|------|------+------+------+------+------' | ||
| 102 | * | | LOWER| | | | RAISE| | | ||
| 103 | * `------------------------------------------------' | ||
| 104 | */ | ||
| 105 | [_ADJUST] = LAYOUT( | ||
| 106 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, | ||
| 107 | KC_F11, KC_F12, RGB_RMOD, RGB_SAI, RGB_SAD, _______, RGB_VAI, RGB_VAD, _______, _______, _______, | ||
| 108 | RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, | ||
| 109 | _______, _______, _______, _______, _______, _______, _______ | ||
| 110 | ) | ||
| 111 | }; | ||
| 112 | |||
| 113 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 114 | switch (keycode) { | ||
| 115 | case QWERTY: | ||
| 116 | if (record->event.pressed) { | ||
| 117 | // persistant_default_layer_set(1UL<<_QWERTY); | ||
| 118 | set_single_persistent_default_layer(_QWERTY); | ||
| 119 | } | ||
| 120 | return false; | ||
| 121 | case LOWER: | ||
| 122 | if (record->event.pressed) { | ||
| 123 | layer_on(_LOWER); | ||
| 124 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 125 | } else { | ||
| 126 | layer_off(_LOWER); | ||
| 127 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 128 | } | ||
| 129 | return false; | ||
| 130 | case RAISE: | ||
| 131 | if (record->event.pressed) { | ||
| 132 | layer_on(_RAISE); | ||
| 133 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 134 | } else { | ||
| 135 | layer_off(_RAISE); | ||
| 136 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 137 | } | ||
| 138 | return false; | ||
| 139 | case ADJUST: | ||
| 140 | if (record->event.pressed) { | ||
| 141 | layer_on(_ADJUST); | ||
| 142 | } else { | ||
| 143 | layer_off(_ADJUST); | ||
| 144 | } | ||
| 145 | return false; | ||
| 146 | } | ||
| 147 | return true; | ||
| 148 | } | ||
| 149 | |||
| 150 | void matrix_init_user(void) { | ||
| 151 | |||
| 152 | } | ||
| 153 | |||
| 154 | void matrix_scan_user(void) { | ||
| 155 | |||
| 156 | } | ||
| 157 | |||
| 158 | void led_set_user(uint8_t usb_led) { | ||
| 159 | |||
| 160 | } | ||
diff --git a/keyboards/halberd/keymaps/default/readme.md b/keyboards/halberd/keymaps/default/readme.md new file mode 100644 index 000000000..567b45c47 --- /dev/null +++ b/keyboards/halberd/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for halberd | |||
diff --git a/keyboards/halberd/keymaps/right_modifiers/config.h b/keyboards/halberd/keymaps/right_modifiers/config.h new file mode 100644 index 000000000..cea12f905 --- /dev/null +++ b/keyboards/halberd/keymaps/right_modifiers/config.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | // place overrides here | ||
diff --git a/keyboards/halberd/keymaps/right_modifiers/keymap.c b/keyboards/halberd/keymaps/right_modifiers/keymap.c new file mode 100644 index 000000000..f74eef454 --- /dev/null +++ b/keyboards/halberd/keymaps/right_modifiers/keymap.c | |||
| @@ -0,0 +1,160 @@ | |||
| 1 | /* Copyright 2019 ENDO Katsuhiro <ka2hiro@kagizaraya.jp> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | // Defines the keycodes used by our macros in process_record_user | ||
| 19 | enum layer_names { | ||
| 20 | _QWERTY, | ||
| 21 | _LOWER, | ||
| 22 | _RAISE, | ||
| 23 | _ADJUST, | ||
| 24 | }; | ||
| 25 | |||
| 26 | // Defines the keycodes used by our macros in process_record_user | ||
| 27 | enum custom_keycodes { | ||
| 28 | QWERTY = SAFE_RANGE, | ||
| 29 | LOWER, | ||
| 30 | RAISE, | ||
| 31 | ADJUST, | ||
| 32 | }; | ||
| 33 | |||
| 34 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 35 | /* Qwerty | ||
| 36 | * | ||
| 37 | * ,----------------------------------------------------------------------------. | ||
| 38 | * | Q | W | E | R | T | Y | U | I | O | P | BkSp | | ||
| 39 | * |------+------+------+------+------|------+------+------+------+------|------| | ||
| 40 | * | A | S | D | F | G | H | J | K | L | ; | Enter| | ||
| 41 | * |------+------+------+------+------|------+------+------+------+------|------| | ||
| 42 | * | Z | X | C | V | B | N | M | , | . | / | Shift| | ||
| 43 | * `-------------+------+------+------|------+------+------+------+------+------' | ||
| 44 | * | GUI | LOWER|Ctrl/Esc|Space| RAISE| Alt | Tab | | ||
| 45 | * `------------------------------------------------' | ||
| 46 | */ | ||
| 47 | [_QWERTY] = LAYOUT( | ||
| 48 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
| 49 | KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, | ||
| 50 | KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, | ||
| 51 | KC_LGUI, LOWER, MT(MOD_LCTL, KC_ESC), KC_SPC, RAISE, KC_LALT, KC_TAB | ||
| 52 | ), | ||
| 53 | |||
| 54 | /* Raise | ||
| 55 | * | ||
| 56 | * ,----------------------------------------------------------------------------. | ||
| 57 | * | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | ||
| 58 | * |------+------+------+------+------|------+------+------+------+------|------| | ||
| 59 | * | Tab | _ | + | | | ~ | : | " | > | { | } | | | ||
| 60 | * |------+------+------+------+------|------+------+------+------+------|------| | ||
| 61 | * | Caps| - | = | \ | ` | ; | ' | < | [ | ] | | | ||
| 62 | * `-------------+------+------+------|------+------+------+------+------+------' | ||
| 63 | * | | | | | | | | | ||
| 64 | * `------------------------------------------------' | ||
| 65 | */ | ||
| 66 | [_RAISE] = LAYOUT( | ||
| 67 | KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, | ||
| 68 | KC_TAB, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR, _______, | ||
| 69 | KC_CAPS, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC, _______, | ||
| 70 | _______, _______, _______, _______, _______, _______, _______ | ||
| 71 | ), | ||
| 72 | |||
| 73 | /* Lower | ||
| 74 | * | ||
| 75 | * ,----------------------------------------------------------------------------. | ||
| 76 | * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | ||
| 77 | * |------+------+------+------+------|------+------+------+------+------|------| | ||
| 78 | * | Tab | | | |Enter | Left | Down | Up | Right| Enter| | | ||
| 79 | * |------+------+------+------+------|------+------+------+------+------|------| | ||
| 80 | * | Ctrl| | GUI | Alt | Del | BkSp | PgUp | PgDn | | | | | ||
| 81 | * `-------------+------+------+------|------+------+------+------+------+------' | ||
| 82 | * | | | | | | | | | ||
| 83 | * `------------------------------------------------' | ||
| 84 | */ | ||
| 85 | [_LOWER] = LAYOUT( | ||
| 86 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, | ||
| 87 | KC_TAB, _______, _______, _______, KC_ENT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, _______, | ||
| 88 | KC_LCTL, _______, KC_LGUI, KC_LALT, KC_DEL, KC_BSPC, KC_PGUP, KC_PGDN, _______, _______, _______, | ||
| 89 | _______, _______, _______, _______, _______, _______, _______ | ||
| 90 | ), | ||
| 91 | |||
| 92 | |||
| 93 | /* Adjust (Lower + Raise) | ||
| 94 | * | ||
| 95 | * ,----------------------------------------------------------------------------. | ||
| 96 | * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | | ||
| 97 | * |------+------+------+------+------|------+------+------+------+------|------| | ||
| 98 | * | F11 | F12 | |RGBSAI|RGBSAD|RGBVAI|RGBVAD| | | | | | ||
| 99 | * |------+------+------+------+------|------+------+------+------+------|------| | ||
| 100 | * | Reset|RGBTOG|RGBMOD|RGBHUI|RGBHUD| Prev | Next | Vol- | Vol+ | Play | | | ||
| 101 | * `-------------+------+------+------|------+------+------+------+------+------' | ||
| 102 | * | | | | | | | | | ||
| 103 | * `------------------------------------------------' | ||
| 104 | */ | ||
| 105 | [_ADJUST] = LAYOUT( | ||
| 106 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, | ||
| 107 | KC_F11, KC_F12, RGB_RMOD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, | ||
| 108 | RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, | ||
| 109 | _______, _______, _______, _______, _______, _______, _______ | ||
| 110 | ) | ||
| 111 | }; | ||
| 112 | |||
| 113 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 114 | switch (keycode) { | ||
| 115 | case QWERTY: | ||
| 116 | if (record->event.pressed) { | ||
| 117 | // persistant_default_layer_set(1UL<<_QWERTY); | ||
| 118 | set_single_persistent_default_layer(_QWERTY); | ||
| 119 | } | ||
| 120 | return false; | ||
| 121 | case LOWER: | ||
| 122 | if (record->event.pressed) { | ||
| 123 | layer_on(_LOWER); | ||
| 124 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 125 | } else { | ||
| 126 | layer_off(_LOWER); | ||
| 127 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 128 | } | ||
| 129 | return false; | ||
| 130 | case RAISE: | ||
| 131 | if (record->event.pressed) { | ||
| 132 | layer_on(_RAISE); | ||
| 133 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 134 | } else { | ||
| 135 | layer_off(_RAISE); | ||
| 136 | update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
| 137 | } | ||
| 138 | return false; | ||
| 139 | case ADJUST: | ||
| 140 | if (record->event.pressed) { | ||
| 141 | layer_on(_ADJUST); | ||
| 142 | } else { | ||
| 143 | layer_off(_ADJUST); | ||
| 144 | } | ||
| 145 | return false; | ||
| 146 | } | ||
| 147 | return true; | ||
| 148 | } | ||
| 149 | |||
| 150 | void matrix_init_user(void) { | ||
| 151 | |||
| 152 | } | ||
| 153 | |||
| 154 | void matrix_scan_user(void) { | ||
| 155 | |||
| 156 | } | ||
| 157 | |||
| 158 | void led_set_user(uint8_t usb_led) { | ||
| 159 | |||
| 160 | } | ||
diff --git a/keyboards/halberd/keymaps/right_modifiers/readme.md b/keyboards/halberd/keymaps/right_modifiers/readme.md new file mode 100644 index 000000000..2479922bd --- /dev/null +++ b/keyboards/halberd/keymaps/right_modifiers/readme.md | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | # Modifiers on the right side. | ||
| 2 | |||
diff --git a/keyboards/halberd/readme.md b/keyboards/halberd/readme.md new file mode 100644 index 000000000..7fa0388fd --- /dev/null +++ b/keyboards/halberd/readme.md | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # Halberd | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | 40% keyboard. | ||
| 6 | |||
| 7 | Keyboard Maintainer: [ka2hiro](https://github.com/ka2hiro) [@ka2hiro](https://twitter.com/ka2hiro) | ||
| 8 | Hardware Supported: Halberd PCB, ATMEGA32U4 | ||
| 9 | Hardware Availability: [@kagizaraya](https://twitter.com/kagizaraya) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make halberd:default:dfu | ||
| 14 | |||
| 15 | 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/keyboards/halberd/rules.mk b/keyboards/halberd/rules.mk new file mode 100644 index 000000000..ed4e6bde3 --- /dev/null +++ b/keyboards/halberd/rules.mk | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Processor frequency. | ||
| 5 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 6 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 7 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 8 | # automatically to create a 32-bit value in your source code. | ||
| 9 | # | ||
| 10 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 11 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 12 | # does not *change* the processor frequency - it should merely be updated to | ||
| 13 | # reflect the processor speed set externally so that the code can use accurate | ||
| 14 | # software delays. | ||
| 15 | F_CPU = 16000000 | ||
| 16 | |||
| 17 | |||
| 18 | # | ||
| 19 | # LUFA specific | ||
| 20 | # | ||
| 21 | # Target architecture (see library "Board Types" documentation). | ||
| 22 | ARCH = AVR8 | ||
| 23 | |||
| 24 | # Input clock frequency. | ||
| 25 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 26 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 27 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 28 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 29 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 30 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 31 | # source code. | ||
| 32 | # | ||
| 33 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 34 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 35 | F_USB = $(F_CPU) | ||
| 36 | |||
| 37 | # Interrupt driven control endpoint task(+60) | ||
| 38 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 39 | |||
| 40 | |||
| 41 | # Bootloader selection | ||
| 42 | # Teensy halfkay | ||
| 43 | # Pro Micro caterina | ||
| 44 | # Atmel DFU atmel-dfu | ||
| 45 | # LUFA DFU lufa-dfu | ||
| 46 | # QMK DFU qmk-dfu | ||
| 47 | # atmega32a bootloadHID | ||
| 48 | BOOTLOADER = atmel-dfu | ||
| 49 | |||
| 50 | |||
| 51 | # If you don't know the bootloader type, then you can specify the | ||
| 52 | # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | ||
| 53 | # Teensy halfKay 512 | ||
| 54 | # Teensy++ halfKay 1024 | ||
| 55 | # Atmel DFU loader 4096 | ||
| 56 | # LUFA bootloader 4096 | ||
| 57 | # USBaspLoader 2048 | ||
| 58 | # OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 59 | |||
| 60 | |||
| 61 | # Build Options | ||
| 62 | # change yes to no to disable | ||
| 63 | # | ||
| 64 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) | ||
| 65 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
| 66 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 67 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 68 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 69 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 70 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 71 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 72 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 73 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
| 74 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 75 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
| 76 | UNICODE_ENABLE = no # Unicode | ||
| 77 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 78 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 79 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
| 80 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | ||
