diff options
| author | Harshit Goel <harshitgoel96@yahoo.com> | 2017-12-03 10:34:22 +0530 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2017-12-03 00:04:22 -0500 |
| commit | 7730dc3e5c0ded70b2825af5de61c3660ebe29d2 (patch) | |
| tree | af9e4cde7f8442d4f19af82a52e19ea6c9e22871 | |
| parent | 0740e84d63fd51c892556f1746496802e26f9b99 (diff) | |
| download | qmk_firmware-7730dc3e5c0ded70b2825af5de61c3660ebe29d2.tar.gz qmk_firmware-7730dc3e5c0ded70b2825af5de61c3660ebe29d2.zip | |
Magicforce68 now in bluetooth flavour (#2051)
* Added working code for mf68_ble
* update read.md
* update read.md
* update read.md
* update readme
* Update README.md
* Update README.md
* added reddit post
* Update README.md
* Update README.md
| -rw-r--r-- | keyboards/mf68_ble/README.md | 27 | ||||
| -rw-r--r-- | keyboards/mf68_ble/config.h | 162 | ||||
| -rw-r--r-- | keyboards/mf68_ble/keymaps/default/keymap.c | 68 | ||||
| -rw-r--r-- | keyboards/mf68_ble/mf68.c | 8 | ||||
| -rw-r--r-- | keyboards/mf68_ble/mf68.h | 40 | ||||
| -rw-r--r-- | keyboards/mf68_ble/rules.mk | 67 |
6 files changed, 372 insertions, 0 deletions
diff --git a/keyboards/mf68_ble/README.md b/keyboards/mf68_ble/README.md new file mode 100644 index 000000000..3829c8fd7 --- /dev/null +++ b/keyboards/mf68_ble/README.md | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | MF68 | ||
| 2 | ==== | ||
| 3 | |||
| 4 | Magicforce 68 with [replacement PCB](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68) designed by [di0ib](https://github.com/di0ib). | ||
| 5 | |||
| 6 | Keyboard Maintainer: [di0ib](http://www.40percent.club) | ||
| 7 | Hardware Supported: [Feather 32u4 Bluefruit](https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/) | ||
| 8 | Please note: This is 32u4 and not M0 | ||
| 9 | Hardware Availability: [PCB files](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68/pcb) | ||
| 10 | [MF68 thicc case files](https://github.com/harshitgoel96/mf68-case-thicc) | ||
| 11 | Story | ||
| 12 | ----- | ||
| 13 | |||
| 14 | The story and the idea behind this mod is available on [my reddit post](https://www.reddit.com/r/MechanicalKeyboards/comments/7eiiht/guide_i_built_a_bluetooth_enabled_magicforce68_no/) | ||
| 15 | |||
| 16 | Wiring | ||
| 17 | ------ | ||
| 18 | |||
| 19 | Below is how you wire the Feather to PCB | ||
| 20 | |||
| 21 |  | ||
| 22 | |||
| 23 | Make example for this keyboard (after setting up your build environment): | ||
| 24 | |||
| 25 | make mf68_ble:default | ||
| 26 | |||
| 27 | See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. | ||
diff --git a/keyboards/mf68_ble/config.h b/keyboards/mf68_ble/config.h new file mode 100644 index 000000000..83c0a7a5a --- /dev/null +++ b/keyboards/mf68_ble/config.h | |||
| @@ -0,0 +1,162 @@ | |||
| 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 0xCEEB | ||
| 25 | #define PRODUCT_ID 0x0510 | ||
| 26 | #define DEVICE_VER 0x0101 | ||
| 27 | #define MANUFACTURER di0ib | ||
| 28 | #define PRODUCT MF68 | ||
| 29 | #define DESCRIPTION Magicforce 68 BLE | ||
| 30 | |||
| 31 | /* key matrix size */ | ||
| 32 | #define MATRIX_ROWS 8 | ||
| 33 | #define MATRIX_COLS 9 | ||
| 34 | |||
| 35 | /* | ||
| 36 | * Keyboard Matrix Assignments | ||
| 37 | * | ||
| 38 | * Change this to how you wired your keyboard | ||
| 39 | * COLS: AVR pins used for columns, left to right | ||
| 40 | * ROWS: AVR pins used for rows, top to bottom | ||
| 41 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 42 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 43 | * | ||
| 44 | */ | ||
| 45 | #define MATRIX_ROW_PINS { D1, D0, C6, D7, B5, B6, B7, D6 } | ||
| 46 | #define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D2, D3 } | ||
| 47 | #define UNUSED_PINS {B5} | ||
| 48 | |||
| 49 | /* COL2ROW or ROW2COL */ | ||
| 50 | #define DIODE_DIRECTION COL2ROW | ||
| 51 | /* | ||
| 52 | #define BACKLIGHT_PIN B5 | ||
| 53 | #define BACKLIGHT_BREATHING | ||
| 54 | #define BACKLIGHT_LEVELS 3 | ||
| 55 | */ | ||
| 56 | |||
| 57 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 58 | #define DEBOUNCING_DELAY 5 | ||
| 59 | |||
| 60 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 61 | //#define MATRIX_HAS_GHOST | ||
| 62 | |||
| 63 | /* number of backlight levels */ | ||
| 64 | |||
| 65 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 66 | #define LOCKING_SUPPORT_ENABLE | ||
| 67 | /* Locking resynchronize hack */ | ||
| 68 | #define LOCKING_RESYNC_ENABLE | ||
| 69 | |||
| 70 | /* | ||
| 71 | * Force NKRO | ||
| 72 | * | ||
| 73 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 74 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 75 | * makefile for this to work.) | ||
| 76 | * | ||
| 77 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 78 | * until the next keyboard reset. | ||
| 79 | * | ||
| 80 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 81 | * fully operational during normal computer usage. | ||
| 82 | * | ||
| 83 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 84 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 85 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 86 | * power-up. | ||
| 87 | * | ||
| 88 | */ | ||
| 89 | //#define FORCE_NKRO | ||
| 90 | |||
| 91 | /* | ||
| 92 | * Magic Key Options | ||
| 93 | * | ||
| 94 | * Magic keys are hotkey commands that allow control over firmware functions of | ||
| 95 | * the keyboard. They are best used in combination with the HID Listen program, | ||
| 96 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
| 97 | * | ||
| 98 | * The options below allow the magic key functionality to be changed. This is | ||
| 99 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
| 100 | * | ||
| 101 | */ | ||
| 102 | |||
| 103 | /* key combination for magic key command */ | ||
| 104 | #define IS_COMMAND() ( \ | ||
| 105 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 106 | ) | ||
| 107 | |||
| 108 | /* control how magic key switches layers */ | ||
| 109 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | ||
| 110 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | ||
| 111 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | ||
| 112 | |||
| 113 | /* override magic key keymap */ | ||
| 114 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | ||
| 115 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | ||
| 116 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | ||
| 117 | //#define MAGIC_KEY_HELP1 H | ||
| 118 | //#define MAGIC_KEY_HELP2 SLASH | ||
| 119 | //#define MAGIC_KEY_DEBUG D | ||
| 120 | //#define MAGIC_KEY_DEBUG_MATRIX X | ||
| 121 | //#define MAGIC_KEY_DEBUG_KBD K | ||
| 122 | //#define MAGIC_KEY_DEBUG_MOUSE M | ||
| 123 | //#define MAGIC_KEY_VERSION V | ||
| 124 | //#define MAGIC_KEY_STATUS S | ||
| 125 | //#define MAGIC_KEY_CONSOLE C | ||
| 126 | //#define MAGIC_KEY_LAYER0_ALT1 ESC | ||
| 127 | //#define MAGIC_KEY_LAYER0_ALT2 GRAVE | ||
| 128 | //#define MAGIC_KEY_LAYER0 0 | ||
| 129 | //#define MAGIC_KEY_LAYER1 1 | ||
| 130 | //#define MAGIC_KEY_LAYER2 2 | ||
| 131 | //#define MAGIC_KEY_LAYER3 3 | ||
| 132 | //#define MAGIC_KEY_LAYER4 4 | ||
| 133 | //#define MAGIC_KEY_LAYER5 5 | ||
| 134 | //#define MAGIC_KEY_LAYER6 6 | ||
| 135 | //#define MAGIC_KEY_LAYER7 7 | ||
| 136 | //#define MAGIC_KEY_LAYER8 8 | ||
| 137 | //#define MAGIC_KEY_LAYER9 9 | ||
| 138 | //#define MAGIC_KEY_BOOTLOADER PAUSE | ||
| 139 | //#define MAGIC_KEY_LOCK CAPS | ||
| 140 | //#define MAGIC_KEY_EEPROM E | ||
| 141 | //#define MAGIC_KEY_NKRO N | ||
| 142 | //#define MAGIC_KEY_SLEEP_LED Z | ||
| 143 | |||
| 144 | /* | ||
| 145 | * Feature disable options | ||
| 146 | * These options are also useful to firmware size reduction. | ||
| 147 | */ | ||
| 148 | |||
| 149 | /* disable debug print */ | ||
| 150 | //#define NO_DEBUG | ||
| 151 | |||
| 152 | /* disable print */ | ||
| 153 | //#define NO_PRINT | ||
| 154 | |||
| 155 | /* disable action features */ | ||
| 156 | //#define NO_ACTION_LAYER | ||
| 157 | //#define NO_ACTION_TAPPING | ||
| 158 | //#define NO_ACTION_ONESHOT | ||
| 159 | //#define NO_ACTION_MACRO | ||
| 160 | //#define NO_ACTION_FUNCTION | ||
| 161 | |||
| 162 | #endif | ||
diff --git a/keyboards/mf68_ble/keymaps/default/keymap.c b/keyboards/mf68_ble/keymaps/default/keymap.c new file mode 100644 index 000000000..fd8810d52 --- /dev/null +++ b/keyboards/mf68_ble/keymaps/default/keymap.c | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | #include "mf68.h" | ||
| 2 | |||
| 3 | #define _QWERTY 0 | ||
| 4 | #define _FN1 1 | ||
| 5 | #define _FN2 2 | ||
| 6 | #define KC_ KC_TRNS | ||
| 7 | #define KC_X0 LT(_FN2, KC_GRV) | ||
| 8 | #define KC_X1 MO(_FN1) | ||
| 9 | #define KC_X2 BL_STEP | ||
| 10 | |||
| 11 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 12 | [_QWERTY] = KC_KEYMAP( | ||
| 13 | /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ | ||
| 14 | ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, | ||
| 15 | /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ | ||
| 16 | TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, | ||
| 17 | /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */ | ||
| 18 | X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , | ||
| 19 | /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */ | ||
| 20 | LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , | ||
| 21 | /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */ | ||
| 22 | LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT | ||
| 23 | /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ | ||
| 24 | ), | ||
| 25 | |||
| 26 | [_FN1] = KC_KEYMAP( | ||
| 27 | /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ | ||
| 28 | GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, | ||
| 29 | /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ | ||
| 30 | , , , UP , , , , , , , , , X2 , , VOLD,END, | ||
| 31 | /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ | ||
| 32 | , ,LEFT,DOWN,RGHT, , , , , , , , , | ||
| 33 | /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ | ||
| 34 | , , , , , , ,MUTE, , , , , MUTE, | ||
| 35 | /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ | ||
| 36 | , , , , , , , MPRV,MPLY,MNXT | ||
| 37 | /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ | ||
| 38 | ), | ||
| 39 | |||
| 40 | [_FN2] = KC_KEYMAP( | ||
| 41 | /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ | ||
| 42 | GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, | ||
| 43 | /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ | ||
| 44 | , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END, | ||
| 45 | /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ | ||
| 46 | , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , , | ||
| 47 | /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ | ||
| 48 | , , , , , , 0 , 1 , 2 , 3 , , , MUTE, | ||
| 49 | /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ | ||
| 50 | , , , , , , , MPRV,MPLY,MNXT | ||
| 51 | /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ | ||
| 52 | ) | ||
| 53 | }; | ||
| 54 | |||
| 55 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
| 56 | { | ||
| 57 | // MACRODOWN only works in this function | ||
| 58 | switch(id) { | ||
| 59 | case 0: | ||
| 60 | if (record->event.pressed) { | ||
| 61 | register_code(KC_RSFT); | ||
| 62 | } else { | ||
| 63 | unregister_code(KC_RSFT); | ||
| 64 | } | ||
| 65 | break; | ||
| 66 | } | ||
| 67 | return MACRO_NONE; | ||
| 68 | }; | ||
diff --git a/keyboards/mf68_ble/mf68.c b/keyboards/mf68_ble/mf68.c new file mode 100644 index 000000000..1da522e7e --- /dev/null +++ b/keyboards/mf68_ble/mf68.c | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #include "mf68.h" | ||
| 2 | |||
| 3 | void matrix_init_kb(void) { | ||
| 4 | // put your keyboard start-up code here | ||
| 5 | // runs once when the firmware starts up | ||
| 6 | |||
| 7 | matrix_init_user(); | ||
| 8 | } | ||
diff --git a/keyboards/mf68_ble/mf68.h b/keyboards/mf68_ble/mf68.h new file mode 100644 index 000000000..316e3b87f --- /dev/null +++ b/keyboards/mf68_ble/mf68.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | #ifndef MF68_H | ||
| 2 | #define MF68_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | #define KEYMAP( \ | ||
| 7 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \ | ||
| 8 | K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \ | ||
| 9 | K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ | ||
| 10 | K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \ | ||
| 11 | K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \ | ||
| 12 | ) { \ | ||
| 13 | { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ | ||
| 14 | { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ | ||
| 15 | { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ | ||
| 16 | { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ | ||
| 17 | { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ | ||
| 18 | { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ | ||
| 19 | { K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \ | ||
| 20 | { K70, K71, K72, K73, K74 } \ | ||
| 21 | } | ||
| 22 | |||
| 23 | #define KC_KEYMAP( \ | ||
| 24 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \ | ||
| 25 | K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \ | ||
| 26 | K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ | ||
| 27 | K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \ | ||
| 28 | K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \ | ||
| 29 | ) KEYMAP( \ | ||
| 30 | KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \ | ||
| 31 | KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \ | ||
| 32 | KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \ | ||
| 33 | KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, \ | ||
| 34 | KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, \ | ||
| 35 | KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, \ | ||
| 36 | KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \ | ||
| 37 | KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \ | ||
| 38 | ) | ||
| 39 | |||
| 40 | #endif | ||
diff --git a/keyboards/mf68_ble/rules.mk b/keyboards/mf68_ble/rules.mk new file mode 100644 index 000000000..07b59d785 --- /dev/null +++ b/keyboards/mf68_ble/rules.mk | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | |||
| 2 | # MCU name | ||
| 3 | MCU = atmega32u4 | ||
| 4 | |||
| 5 | # Processor frequency. | ||
| 6 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 7 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 8 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 9 | # automatically to create a 32-bit value in your source code. | ||
| 10 | # | ||
| 11 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 12 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 13 | # does not *change* the processor frequency - it should merely be updated to | ||
| 14 | # reflect the processor speed set externally so that the code can use accurate | ||
| 15 | # software delays. | ||
| 16 | F_CPU = 8000000 | ||
| 17 | |||
| 18 | |||
| 19 | # | ||
| 20 | # LUFA specific | ||
| 21 | # | ||
| 22 | # Target architecture (see library "Board Types" documentation). | ||
| 23 | ARCH = AVR8 | ||
| 24 | |||
| 25 | # Input clock frequency. | ||
| 26 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 27 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 28 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 29 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 30 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 31 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 32 | # source code. | ||
| 33 | # | ||
| 34 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 35 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 36 | F_USB = $(F_CPU) | ||
| 37 | |||
| 38 | # Interrupt driven control endpoint task(+60) | ||
| 39 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 40 | |||
| 41 | |||
| 42 | # Boot Section Size in *bytes* | ||
| 43 | # Teensy halfKay 512 | ||
| 44 | # Teensy++ halfKay 1024 | ||
| 45 | # Atmel DFU loader 4096 | ||
| 46 | # LUFA bootloader 4096 | ||
| 47 | # USBaspLoader 2048 | ||
| 48 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 49 | |||
| 50 | # Build Options | ||
| 51 | # change yes to no to disable | ||
| 52 | # | ||
| 53 | BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) | ||
| 54 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | ||
| 55 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | ||
| 56 | CONSOLE_ENABLE ?= yes # Console for debug(+400) | ||
| 57 | COMMAND_ENABLE ?= yes # Commands for debug and configuration | ||
| 58 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 59 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | ||
| 60 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 61 | NKRO_ENABLE ?= no # USB Nkey Rollover | ||
| 62 | BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default | ||
| 63 | MIDI_ENABLE ?= no # MIDI controls | ||
| 64 | UNICODE_ENABLE ?= no # Unicode | ||
| 65 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 66 | AUDIO_ENABLE ?= no # Audio output on port C6 | ||
| 67 | BLUETOOTH = AdafruitBLE \ No newline at end of file | ||
