diff options
| author | TerryMathews <terry@terrymathews.net> | 2017-11-26 17:54:53 -0500 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2017-11-26 17:54:53 -0500 |
| commit | 53ad7375c7a6279cd289aa50b3fe7d6350f07eda (patch) | |
| tree | 7324fdfbb165f14f4cfb41c298e8aa253545ddec | |
| parent | 5fd400faa999bdb15240966f6246c4788c438568 (diff) | |
| download | qmk_firmware-53ad7375c7a6279cd289aa50b3fe7d6350f07eda.tar.gz qmk_firmware-53ad7375c7a6279cd289aa50b3fe7d6350f07eda.zip | |
Initial support for TKC1800 PCB (#2062)
* Initial support for TKC1800
* Correct typo
| -rw-r--r-- | keyboards/tkc1800/README.md | 18 | ||||
| -rw-r--r-- | keyboards/tkc1800/config.h | 186 | ||||
| -rw-r--r-- | keyboards/tkc1800/keymaps/default/config.h | 24 | ||||
| -rw-r--r-- | keyboards/tkc1800/keymaps/default/keymap.c | 85 | ||||
| -rw-r--r-- | keyboards/tkc1800/rules.mk | 68 | ||||
| -rw-r--r-- | keyboards/tkc1800/tkc1800.c | 69 | ||||
| -rw-r--r-- | keyboards/tkc1800/tkc1800.h | 39 |
7 files changed, 489 insertions, 0 deletions
diff --git a/keyboards/tkc1800/README.md b/keyboards/tkc1800/README.md new file mode 100644 index 000000000..7a0528ce3 --- /dev/null +++ b/keyboards/tkc1800/README.md | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | The Key Company TKC1800 | ||
| 2 | === | ||
| 3 | |||
| 4 |  | ||
| 5 | |||
| 6 | |||
| 7 | The Key Company TKC1800 is a Cherry 1800 form factor replacement PCB utilizing the AT90USB1286 microcontroller. | ||
| 8 | |||
| 9 | Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) | ||
| 10 | Hardware Supported: AT90USB1286 | ||
| 11 | Hardware Availability: Via GB | ||
| 12 | |||
| 13 | |||
| 14 | Make example for this keyboard (after setting up your build environment): | ||
| 15 | |||
| 16 | make tkc1800 | ||
| 17 | |||
| 18 | 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. \ No newline at end of file | ||
diff --git a/keyboards/tkc1800/config.h b/keyboards/tkc1800/config.h new file mode 100644 index 000000000..cd34ede09 --- /dev/null +++ b/keyboards/tkc1800/config.h | |||
| @@ -0,0 +1,186 @@ | |||
| 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 0xFEED | ||
| 25 | #define PRODUCT_ID 0x6060 | ||
| 26 | #define DEVICE_VER 0x0003 | ||
| 27 | #define MANUFACTURER The Key Company | ||
| 28 | #define PRODUCT TKC1800 | ||
| 29 | #define DESCRIPTION QMK keyboard firmware for TKC1800 | ||
| 30 | |||
| 31 | /* key matrix size */ | ||
| 32 | #define MATRIX_ROWS 7 | ||
| 33 | #define MATRIX_COLS 19 | ||
| 34 | |||
| 35 | // ROWS: Top to bottom, COLS: Left to right | ||
| 36 | /* Row pin configuration | ||
| 37 | */ | ||
| 38 | #define MATRIX_ROW_PINS { F4, F3, F2, F1, F0, E1, E0 } | ||
| 39 | /* Column pin configuration | ||
| 40 | */ | ||
| 41 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, F5, F6, F7 } | ||
| 42 | #define UNUSED_PINS | ||
| 43 | |||
| 44 | /* COL2ROW or ROW2COL */ | ||
| 45 | #define DIODE_DIRECTION COL2ROW | ||
| 46 | |||
| 47 | // #define BACKLIGHT_PIN B7 | ||
| 48 | // #define BACKLIGHT_BREATHING | ||
| 49 | // #define BACKLIGHT_LEVELS 3 | ||
| 50 | |||
| 51 | /* Underlight configuration | ||
| 52 | */ | ||
| 53 | #define RGB_DI_PIN D7 | ||
| 54 | #define RGBLIGHT_ANIMATIONS | ||
| 55 | #define RGBLED_NUM 30 // Number of LEDs | ||
| 56 | #define RGBLIGHT_HUE_STEP 5 | ||
| 57 | #define RGBLIGHT_SAT_STEP 10 | ||
| 58 | #define RGBLIGHT_VAL_STEP 10 | ||
| 59 | |||
| 60 | /* define if matrix has ghost */ | ||
| 61 | //#define MATRIX_HAS_GHOST | ||
| 62 | |||
| 63 | /* Set 0 if debouncing isn't needed */ | ||
| 64 | #define DEBOUNCING_DELAY 5 | ||
| 65 | |||
| 66 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 67 | #define LOCKING_SUPPORT_ENABLE | ||
| 68 | /* Locking resynchronize hack */ | ||
| 69 | #define LOCKING_RESYNC_ENABLE | ||
| 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 | /* | ||
| 164 | * MIDI options | ||
| 165 | */ | ||
| 166 | |||
| 167 | /* Prevent use of disabled MIDI features in the keymap */ | ||
| 168 | //#define MIDI_ENABLE_STRICT 1 | ||
| 169 | |||
| 170 | /* enable basic MIDI features: | ||
| 171 | - MIDI notes can be sent when in Music mode is on | ||
| 172 | */ | ||
| 173 | //#define MIDI_BASIC | ||
| 174 | |||
| 175 | /* enable advanced MIDI features: | ||
| 176 | - MIDI notes can be added to the keymap | ||
| 177 | - Octave shift and transpose | ||
| 178 | - Virtual sustain, portamento, and modulation wheel | ||
| 179 | - etc. | ||
| 180 | */ | ||
| 181 | //#define MIDI_ADVANCED | ||
| 182 | |||
| 183 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
| 184 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | ||
| 185 | |||
| 186 | #endif | ||
diff --git a/keyboards/tkc1800/keymaps/default/config.h b/keyboards/tkc1800/keymaps/default/config.h new file mode 100644 index 000000000..a3828f7d5 --- /dev/null +++ b/keyboards/tkc1800/keymaps/default/config.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 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 | #ifndef CONFIG_USER_H | ||
| 18 | #define CONFIG_USER_H | ||
| 19 | |||
| 20 | #include "../../config.h" | ||
| 21 | |||
| 22 | // place overrides here | ||
| 23 | |||
| 24 | #endif | ||
diff --git a/keyboards/tkc1800/keymaps/default/keymap.c b/keyboards/tkc1800/keymaps/default/keymap.c new file mode 100644 index 000000000..1b9f390b2 --- /dev/null +++ b/keyboards/tkc1800/keymaps/default/keymap.c | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 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 "tkc1800.h" | ||
| 17 | |||
| 18 | #define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) | ||
| 19 | #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) | ||
| 20 | |||
| 21 | // Helpful defines | ||
| 22 | #define ______ KC_TRNS | ||
| 23 | #define XXXXXX KC_NO | ||
| 24 | |||
| 25 | #define _DEFAULT 0 | ||
| 26 | #define _FUNCTION 1 | ||
| 27 | |||
| 28 | //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD | ||
| 29 | |||
| 30 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 31 | /* Keymap _BL: (Base Layer) Default Layer | ||
| 32 | * ,-------------------------------------------------------. ,-------------------. | ||
| 33 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 34 | * `-------------------------------------------------------' |-------------------| | ||
| 35 | * |Del |End |PgDn|ScrL| | ||
| 36 | * ,-----------------------------------------------------------. |-------------------| | ||
| 37 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 38 | * |-----------------------------------------------------------| |-------------------| | ||
| 39 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 40 | * |-----------------------------------------------------------| |-------------------| | ||
| 41 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + | | ||
| 42 | * |-----------------------------------------------------------' |-------------------| | ||
| 43 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 44 | * |--------------------------------------------------------'----`--------------| | | ||
| 45 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | ||
| 46 | * `---------------------------------------------------------------------------------' | ||
| 47 | */ | ||
| 48 | [_DEFAULT] = KEYMAP( | ||
| 49 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | ||
| 50 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 51 | KC_TILD, 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_BSPC, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | ||
| 52 | 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_P7, KC_P8, KC_P9, KC_PMNS, \ | ||
| 53 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 54 | KC_LSFT, XXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ | ||
| 55 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FUNCTION), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, XXXXXX | ||
| 56 | ), | ||
| 57 | [_FUNCTION] = KEYMAP( | ||
| 58 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | ||
| 59 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 60 | KC_TILD, 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_BSPC, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | ||
| 61 | 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_P7, KC_P8, KC_P9, KC_PMNS, \ | ||
| 62 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 63 | KC_LSFT, XXXXXX, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ | ||
| 64 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, ______, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, XXXXXX | ||
| 65 | ), | ||
| 66 | }; | ||
| 67 | |||
| 68 | // const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; | ||
| 69 | |||
| 70 | |||
| 71 | void matrix_init_user(void) { | ||
| 72 | |||
| 73 | } | ||
| 74 | |||
| 75 | void matrix_scan_user(void) { | ||
| 76 | |||
| 77 | } | ||
| 78 | |||
| 79 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 80 | return true; | ||
| 81 | } | ||
| 82 | |||
| 83 | void led_set_user(uint8_t usb_led) { | ||
| 84 | |||
| 85 | } \ No newline at end of file | ||
diff --git a/keyboards/tkc1800/rules.mk b/keyboards/tkc1800/rules.mk new file mode 100644 index 000000000..1729f648b --- /dev/null +++ b/keyboards/tkc1800/rules.mk | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | |||
| 2 | # MCU name | ||
| 3 | MCU = at90usb1286 | ||
| 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 = 16000000 | ||
| 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 | |||
| 51 | # Build Options | ||
| 52 | # change yes to no to disable | ||
| 53 | # | ||
| 54 | BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) | ||
| 55 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | ||
| 56 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | ||
| 57 | CONSOLE_ENABLE ?= yes # Console for debug(+400) | ||
| 58 | COMMAND_ENABLE ?= yes # Commands for debug and configuration | ||
| 59 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 60 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | ||
| 61 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 62 | NKRO_ENABLE ?= yes # USB Nkey Rollover | ||
| 63 | BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default | ||
| 64 | RGBLIGHT_ENABLE ?= yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 65 | MIDI_ENABLE ?= no # MIDI controls | ||
| 66 | UNICODE_ENABLE ?= no # Unicode | ||
| 67 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 68 | AUDIO_ENABLE ?= no # Audio output on port C6 | ||
diff --git a/keyboards/tkc1800/tkc1800.c b/keyboards/tkc1800/tkc1800.c new file mode 100644 index 000000000..bc6676846 --- /dev/null +++ b/keyboards/tkc1800/tkc1800.c | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 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 "tkc1800.h" | ||
| 17 | #include "led.h" | ||
| 18 | |||
| 19 | void matrix_init_kb(void) { | ||
| 20 | // put your keyboard start-up code here | ||
| 21 | // runs once when the firmware starts up | ||
| 22 | led_init_ports(); | ||
| 23 | matrix_init_user(); | ||
| 24 | } | ||
| 25 | |||
| 26 | void matrix_scan_kb(void) { | ||
| 27 | // put your looping keyboard code here | ||
| 28 | // runs every cycle (a lot) | ||
| 29 | |||
| 30 | matrix_scan_user(); | ||
| 31 | } | ||
| 32 | |||
| 33 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 34 | // put your per-action keyboard code here | ||
| 35 | // runs for every action, just before processing by the firmware | ||
| 36 | |||
| 37 | return process_record_user(keycode, record); | ||
| 38 | } | ||
| 39 | |||
| 40 | void led_init_ports(void) { | ||
| 41 | DDRD |= (1<<2) | (1<<3) | (1<<4); // OUT | ||
| 42 | DDRB |= (1<<7); // OUT | ||
| 43 | PORTB |= (1<<7); | ||
| 44 | } | ||
| 45 | |||
| 46 | void led_set_kb(uint8_t usb_led) { | ||
| 47 | // led_set_user(usb_led); | ||
| 48 | if (usb_led & (1<<USB_LED_NUM_LOCK)) { | ||
| 49 | // Turn numlock on | ||
| 50 | PORTD |= (1<<2); | ||
| 51 | } else { | ||
| 52 | // Turn numlock off | ||
| 53 | PORTD &= ~(1<<2); | ||
| 54 | } | ||
| 55 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
| 56 | // Turn capslock on | ||
| 57 | PORTD |= (1<<3); | ||
| 58 | } else { | ||
| 59 | // Turn capslock off | ||
| 60 | PORTD &= ~(1<<3); | ||
| 61 | } | ||
| 62 | if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { | ||
| 63 | // Turn scrolllock on | ||
| 64 | PORTD |= (1<<4); | ||
| 65 | } else { | ||
| 66 | // Turn scrolllock off | ||
| 67 | PORTD &= ~(1<<4); | ||
| 68 | } | ||
| 69 | } \ No newline at end of file | ||
diff --git a/keyboards/tkc1800/tkc1800.h b/keyboards/tkc1800/tkc1800.h new file mode 100644 index 000000000..56b5e3614 --- /dev/null +++ b/keyboards/tkc1800/tkc1800.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 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 | #ifndef TKC1800_H | ||
| 17 | #define TKC1800_H | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define KEYMAP( \ | ||
| 22 | K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, K0G, K0H, K0I, \ | ||
| 23 | K1F, K1G, K1H, K1I, \ | ||
| 24 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, \ | ||
| 25 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, K3H, K3I, \ | ||
| 26 | K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, K4G, K4H, K4I, \ | ||
| 27 | K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5F, K5G, K5H, K5I, \ | ||
| 28 | K60, K61, K62, K65, K69, K6A, K6B, K6C, K6D, K6E, K6G, K6H, K6I \ | ||
| 29 | ) { \ | ||
| 30 | { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F, K0G, K0H, K0I }, \ | ||
| 31 | { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1F, K1G, K1H, K1I }, \ | ||
| 32 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I }, \ | ||
| 33 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \ | ||
| 34 | { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I }, \ | ||
| 35 | { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, KC_NO, K5F, K5G, K5H, K5I }, \ | ||
| 36 | { K60, K61, K62, KC_NO, KC_NO, K65, KC_NO, KC_NO, KC_NO, K69, K6A, K6B, K6C, K6D, K6E, KC_NO, K6G, K6H, K6I } \ | ||
| 37 | } | ||
| 38 | |||
| 39 | #endif | ||
