diff options
| author | TerryMathews <terry@terrymathews.net> | 2020-07-28 01:34:18 -0400 |
|---|---|---|
| committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-08-29 14:30:02 -0700 |
| commit | 4764aa8711cadc2776fde7641e97e280c4ac55c5 (patch) | |
| tree | 3d756581c9fa601ae9a3fdb4311739be03e2005f /keyboards/tkc | |
| parent | e6266b19be46c1340209bdd0a6c519452d5b9f2a (diff) | |
| download | qmk_firmware-4764aa8711cadc2776fde7641e97e280c4ac55c5.tar.gz qmk_firmware-4764aa8711cadc2776fde7641e97e280c4ac55c5.zip | |
The Key Company project consolidation (#9547)
* Consolidate TKC projects and increase VIA keymap count to 4.
* Updated readme files.
* Removed config.h via limitation of 2 dynamic keymaps
* Reduce dynamic keymaps from 4 to 3 due to EEPROM space limitations.
* Update dynamic_keymap.c
* Restore 4 dynamic keymaps for VIA in TKC projects.
* Update quantum/dynamic_keymap.c
Diffstat (limited to 'keyboards/tkc')
44 files changed, 3744 insertions, 0 deletions
diff --git a/keyboards/tkc/candybar/bootloader_defs.h b/keyboards/tkc/candybar/bootloader_defs.h new file mode 100644 index 000000000..43eb7b2f6 --- /dev/null +++ b/keyboards/tkc/candybar/bootloader_defs.h | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | /* Address for jumping to bootloader on STM32 chips. */ | ||
| 2 | /* It is chip dependent, the correct number can be looked up here: | ||
| 3 | * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf | ||
| 4 | * This also requires a patch to chibios: | ||
| 5 | * <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch | ||
| 6 | */ | ||
| 7 | #define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 | ||
diff --git a/keyboards/tkc/candybar/chconf.h b/keyboards/tkc/candybar/chconf.h new file mode 100644 index 000000000..03f63da36 --- /dev/null +++ b/keyboards/tkc/candybar/chconf.h | |||
| @@ -0,0 +1,714 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
| 3 | |||
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | you may not use this file except in compliance with the License. | ||
| 6 | You may obtain a copy of the License at | ||
| 7 | |||
| 8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | |||
| 10 | Unless required by applicable law or agreed to in writing, software | ||
| 11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | See the License for the specific language governing permissions and | ||
| 14 | limitations under the License. | ||
| 15 | */ | ||
| 16 | |||
| 17 | /** | ||
| 18 | * @file rt/templates/chconf.h | ||
| 19 | * @brief Configuration file template. | ||
| 20 | * @details A copy of this file must be placed in each project directory, it | ||
| 21 | * contains the application specific kernel settings. | ||
| 22 | * | ||
| 23 | * @addtogroup config | ||
| 24 | * @details Kernel related settings and hooks. | ||
| 25 | * @{ | ||
| 26 | */ | ||
| 27 | |||
| 28 | #ifndef CHCONF_H | ||
| 29 | #define CHCONF_H | ||
| 30 | |||
| 31 | #define _CHIBIOS_RT_CONF_ | ||
| 32 | #define _CHIBIOS_RT_CONF_VER_6_0_ | ||
| 33 | |||
| 34 | /*===========================================================================*/ | ||
| 35 | /** | ||
| 36 | * @name System timers settings | ||
| 37 | * @{ | ||
| 38 | */ | ||
| 39 | /*===========================================================================*/ | ||
| 40 | |||
| 41 | /** | ||
| 42 | * @brief System time counter resolution. | ||
| 43 | * @note Allowed values are 16 or 32 bits. | ||
| 44 | */ | ||
| 45 | #if !defined(CH_CFG_ST_RESOLUTION) | ||
| 46 | #define CH_CFG_ST_RESOLUTION 32 | ||
| 47 | #endif | ||
| 48 | |||
| 49 | /** | ||
| 50 | * @brief System tick frequency. | ||
| 51 | * @details Frequency of the system timer that drives the system ticks. This | ||
| 52 | * setting also defines the system tick time unit. | ||
| 53 | */ | ||
| 54 | #if !defined(CH_CFG_ST_FREQUENCY) | ||
| 55 | #define CH_CFG_ST_FREQUENCY 10000 | ||
| 56 | #endif | ||
| 57 | |||
| 58 | /** | ||
| 59 | * @brief Time intervals data size. | ||
| 60 | * @note Allowed values are 16, 32 or 64 bits. | ||
| 61 | */ | ||
| 62 | #if !defined(CH_CFG_INTERVALS_SIZE) | ||
| 63 | #define CH_CFG_INTERVALS_SIZE 32 | ||
| 64 | #endif | ||
| 65 | |||
| 66 | /** | ||
| 67 | * @brief Time types data size. | ||
| 68 | * @note Allowed values are 16 or 32 bits. | ||
| 69 | */ | ||
| 70 | #if !defined(CH_CFG_TIME_TYPES_SIZE) | ||
| 71 | #define CH_CFG_TIME_TYPES_SIZE 32 | ||
| 72 | #endif | ||
| 73 | |||
| 74 | /** | ||
| 75 | * @brief Time delta constant for the tick-less mode. | ||
| 76 | * @note If this value is zero then the system uses the classic | ||
| 77 | * periodic tick. This value represents the minimum number | ||
| 78 | * of ticks that is safe to specify in a timeout directive. | ||
| 79 | * The value one is not valid, timeouts are rounded up to | ||
| 80 | * this value. | ||
| 81 | */ | ||
| 82 | #if !defined(CH_CFG_ST_TIMEDELTA) | ||
| 83 | #define CH_CFG_ST_TIMEDELTA 2 | ||
| 84 | #endif | ||
| 85 | |||
| 86 | /** @} */ | ||
| 87 | |||
| 88 | /*===========================================================================*/ | ||
| 89 | /** | ||
| 90 | * @name Kernel parameters and options | ||
| 91 | * @{ | ||
| 92 | */ | ||
| 93 | /*===========================================================================*/ | ||
| 94 | |||
| 95 | /** | ||
| 96 | * @brief Round robin interval. | ||
| 97 | * @details This constant is the number of system ticks allowed for the | ||
| 98 | * threads before preemption occurs. Setting this value to zero | ||
| 99 | * disables the preemption for threads with equal priority and the | ||
| 100 | * round robin becomes cooperative. Note that higher priority | ||
| 101 | * threads can still preempt, the kernel is always preemptive. | ||
| 102 | * @note Disabling the round robin preemption makes the kernel more compact | ||
| 103 | * and generally faster. | ||
| 104 | * @note The round robin preemption is not supported in tickless mode and | ||
| 105 | * must be set to zero in that case. | ||
| 106 | */ | ||
| 107 | #if !defined(CH_CFG_TIME_QUANTUM) | ||
| 108 | #define CH_CFG_TIME_QUANTUM 0 | ||
| 109 | #endif | ||
| 110 | |||
| 111 | /** | ||
| 112 | * @brief Managed RAM size. | ||
| 113 | * @details Size of the RAM area to be managed by the OS. If set to zero | ||
| 114 | * then the whole available RAM is used. The core memory is made | ||
| 115 | * available to the heap allocator and/or can be used directly through | ||
| 116 | * the simplified core memory allocator. | ||
| 117 | * | ||
| 118 | * @note In order to let the OS manage the whole RAM the linker script must | ||
| 119 | * provide the @p __heap_base__ and @p __heap_end__ symbols. | ||
| 120 | * @note Requires @p CH_CFG_USE_MEMCORE. | ||
| 121 | */ | ||
| 122 | #if !defined(CH_CFG_MEMCORE_SIZE) | ||
| 123 | #define CH_CFG_MEMCORE_SIZE 0 | ||
| 124 | #endif | ||
| 125 | |||
| 126 | /** | ||
| 127 | * @brief Idle thread automatic spawn suppression. | ||
| 128 | * @details When this option is activated the function @p chSysInit() | ||
| 129 | * does not spawn the idle thread. The application @p main() | ||
| 130 | * function becomes the idle thread and must implement an | ||
| 131 | * infinite loop. | ||
| 132 | */ | ||
| 133 | #if !defined(CH_CFG_NO_IDLE_THREAD) | ||
| 134 | #define CH_CFG_NO_IDLE_THREAD FALSE | ||
| 135 | #endif | ||
| 136 | |||
| 137 | /** @} */ | ||
| 138 | |||
| 139 | /*===========================================================================*/ | ||
| 140 | /** | ||
| 141 | * @name Performance options | ||
| 142 | * @{ | ||
| 143 | */ | ||
| 144 | /*===========================================================================*/ | ||
| 145 | |||
| 146 | /** | ||
| 147 | * @brief OS optimization. | ||
| 148 | * @details If enabled then time efficient rather than space efficient code | ||
| 149 | * is used when two possible implementations exist. | ||
| 150 | * | ||
| 151 | * @note This is not related to the compiler optimization options. | ||
| 152 | * @note The default is @p TRUE. | ||
| 153 | */ | ||
| 154 | #if !defined(CH_CFG_OPTIMIZE_SPEED) | ||
| 155 | #define CH_CFG_OPTIMIZE_SPEED FALSE | ||
| 156 | #endif | ||
| 157 | |||
| 158 | /** @} */ | ||
| 159 | |||
| 160 | /*===========================================================================*/ | ||
| 161 | /** | ||
| 162 | * @name Subsystem options | ||
| 163 | * @{ | ||
| 164 | */ | ||
| 165 | /*===========================================================================*/ | ||
| 166 | |||
| 167 | /** | ||
| 168 | * @brief Time Measurement APIs. | ||
| 169 | * @details If enabled then the time measurement APIs are included in | ||
| 170 | * the kernel. | ||
| 171 | * | ||
| 172 | * @note The default is @p TRUE. | ||
| 173 | */ | ||
| 174 | #if !defined(CH_CFG_USE_TM) | ||
| 175 | #define CH_CFG_USE_TM FALSE | ||
| 176 | #endif | ||
| 177 | |||
| 178 | /** | ||
| 179 | * @brief Threads registry APIs. | ||
| 180 | * @details If enabled then the registry APIs are included in the kernel. | ||
| 181 | * | ||
| 182 | * @note The default is @p TRUE. | ||
| 183 | */ | ||
| 184 | #if !defined(CH_CFG_USE_REGISTRY) | ||
| 185 | #define CH_CFG_USE_REGISTRY TRUE | ||
| 186 | #endif | ||
| 187 | |||
| 188 | /** | ||
| 189 | * @brief Threads synchronization APIs. | ||
| 190 | * @details If enabled then the @p chThdWait() function is included in | ||
| 191 | * the kernel. | ||
| 192 | * | ||
| 193 | * @note The default is @p TRUE. | ||
| 194 | */ | ||
| 195 | #if !defined(CH_CFG_USE_WAITEXIT) | ||
| 196 | #define CH_CFG_USE_WAITEXIT TRUE | ||
| 197 | #endif | ||
| 198 | |||
| 199 | /** | ||
| 200 | * @brief Semaphores APIs. | ||
| 201 | * @details If enabled then the Semaphores APIs are included in the kernel. | ||
| 202 | * | ||
| 203 | * @note The default is @p TRUE. | ||
| 204 | */ | ||
| 205 | #if !defined(CH_CFG_USE_SEMAPHORES) | ||
| 206 | #define CH_CFG_USE_SEMAPHORES TRUE | ||
| 207 | #endif | ||
| 208 | |||
| 209 | /** | ||
| 210 | * @brief Semaphores queuing mode. | ||
| 211 | * @details If enabled then the threads are enqueued on semaphores by | ||
| 212 | * priority rather than in FIFO order. | ||
| 213 | * | ||
| 214 | * @note The default is @p FALSE. Enable this if you have special | ||
| 215 | * requirements. | ||
| 216 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | ||
| 217 | */ | ||
| 218 | #if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) | ||
| 219 | #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE | ||
| 220 | #endif | ||
| 221 | |||
| 222 | /** | ||
| 223 | * @brief Mutexes APIs. | ||
| 224 | * @details If enabled then the mutexes APIs are included in the kernel. | ||
| 225 | * | ||
| 226 | * @note The default is @p TRUE. | ||
| 227 | */ | ||
| 228 | #if !defined(CH_CFG_USE_MUTEXES) | ||
| 229 | #define CH_CFG_USE_MUTEXES TRUE | ||
| 230 | #endif | ||
| 231 | |||
| 232 | /** | ||
| 233 | * @brief Enables recursive behavior on mutexes. | ||
| 234 | * @note Recursive mutexes are heavier and have an increased | ||
| 235 | * memory footprint. | ||
| 236 | * | ||
| 237 | * @note The default is @p FALSE. | ||
| 238 | * @note Requires @p CH_CFG_USE_MUTEXES. | ||
| 239 | */ | ||
| 240 | #if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) | ||
| 241 | #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE | ||
| 242 | #endif | ||
| 243 | |||
| 244 | /** | ||
| 245 | * @brief Conditional Variables APIs. | ||
| 246 | * @details If enabled then the conditional variables APIs are included | ||
| 247 | * in the kernel. | ||
| 248 | * | ||
| 249 | * @note The default is @p TRUE. | ||
| 250 | * @note Requires @p CH_CFG_USE_MUTEXES. | ||
| 251 | */ | ||
| 252 | #if !defined(CH_CFG_USE_CONDVARS) | ||
| 253 | #define CH_CFG_USE_CONDVARS TRUE | ||
| 254 | #endif | ||
| 255 | |||
| 256 | /** | ||
| 257 | * @brief Conditional Variables APIs with timeout. | ||
| 258 | * @details If enabled then the conditional variables APIs with timeout | ||
| 259 | * specification are included in the kernel. | ||
| 260 | * | ||
| 261 | * @note The default is @p TRUE. | ||
| 262 | * @note Requires @p CH_CFG_USE_CONDVARS. | ||
| 263 | */ | ||
| 264 | #if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) | ||
| 265 | #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE | ||
| 266 | #endif | ||
| 267 | |||
| 268 | /** | ||
| 269 | * @brief Events Flags APIs. | ||
| 270 | * @details If enabled then the event flags APIs are included in the kernel. | ||
| 271 | * | ||
| 272 | * @note The default is @p TRUE. | ||
| 273 | */ | ||
| 274 | #if !defined(CH_CFG_USE_EVENTS) | ||
| 275 | #define CH_CFG_USE_EVENTS TRUE | ||
| 276 | #endif | ||
| 277 | |||
| 278 | /** | ||
| 279 | * @brief Events Flags APIs with timeout. | ||
| 280 | * @details If enabled then the events APIs with timeout specification | ||
| 281 | * are included in the kernel. | ||
| 282 | * | ||
| 283 | * @note The default is @p TRUE. | ||
| 284 | * @note Requires @p CH_CFG_USE_EVENTS. | ||
| 285 | */ | ||
| 286 | #if !defined(CH_CFG_USE_EVENTS_TIMEOUT) | ||
| 287 | #define CH_CFG_USE_EVENTS_TIMEOUT TRUE | ||
| 288 | #endif | ||
| 289 | |||
| 290 | /** | ||
| 291 | * @brief Synchronous Messages APIs. | ||
| 292 | * @details If enabled then the synchronous messages APIs are included | ||
| 293 | * in the kernel. | ||
| 294 | * | ||
| 295 | * @note The default is @p TRUE. | ||
| 296 | */ | ||
| 297 | #if !defined(CH_CFG_USE_MESSAGES) | ||
| 298 | #define CH_CFG_USE_MESSAGES TRUE | ||
| 299 | #endif | ||
| 300 | |||
| 301 | /** | ||
| 302 | * @brief Synchronous Messages queuing mode. | ||
| 303 | * @details If enabled then messages are served by priority rather than in | ||
| 304 | * FIFO order. | ||
| 305 | * | ||
| 306 | * @note The default is @p FALSE. Enable this if you have special | ||
| 307 | * requirements. | ||
| 308 | * @note Requires @p CH_CFG_USE_MESSAGES. | ||
| 309 | */ | ||
| 310 | #if !defined(CH_CFG_USE_MESSAGES_PRIORITY) | ||
| 311 | #define CH_CFG_USE_MESSAGES_PRIORITY FALSE | ||
| 312 | #endif | ||
| 313 | |||
| 314 | /** | ||
| 315 | * @brief Mailboxes APIs. | ||
| 316 | * @details If enabled then the asynchronous messages (mailboxes) APIs are | ||
| 317 | * included in the kernel. | ||
| 318 | * | ||
| 319 | * @note The default is @p TRUE. | ||
| 320 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | ||
| 321 | */ | ||
| 322 | #if !defined(CH_CFG_USE_MAILBOXES) | ||
| 323 | #define CH_CFG_USE_MAILBOXES TRUE | ||
| 324 | #endif | ||
| 325 | |||
| 326 | /** | ||
| 327 | * @brief Core Memory Manager APIs. | ||
| 328 | * @details If enabled then the core memory manager APIs are included | ||
| 329 | * in the kernel. | ||
| 330 | * | ||
| 331 | * @note The default is @p TRUE. | ||
| 332 | */ | ||
| 333 | #if !defined(CH_CFG_USE_MEMCORE) | ||
| 334 | #define CH_CFG_USE_MEMCORE TRUE | ||
| 335 | #endif | ||
| 336 | |||
| 337 | /** | ||
| 338 | * @brief Heap Allocator APIs. | ||
| 339 | * @details If enabled then the memory heap allocator APIs are included | ||
| 340 | * in the kernel. | ||
| 341 | * | ||
| 342 | * @note The default is @p TRUE. | ||
| 343 | * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or | ||
| 344 | * @p CH_CFG_USE_SEMAPHORES. | ||
| 345 | * @note Mutexes are recommended. | ||
| 346 | */ | ||
| 347 | #if !defined(CH_CFG_USE_HEAP) | ||
| 348 | #define CH_CFG_USE_HEAP FALSE | ||
| 349 | #endif | ||
| 350 | |||
| 351 | /** | ||
| 352 | * @brief Memory Pools Allocator APIs. | ||
| 353 | * @details If enabled then the memory pools allocator APIs are included | ||
| 354 | * in the kernel. | ||
| 355 | * | ||
| 356 | * @note The default is @p TRUE. | ||
| 357 | */ | ||
| 358 | #if !defined(CH_CFG_USE_MEMPOOLS) | ||
| 359 | #define CH_CFG_USE_MEMPOOLS FALSE | ||
| 360 | #endif | ||
| 361 | |||
| 362 | /** | ||
| 363 | * @brief Objects FIFOs APIs. | ||
| 364 | * @details If enabled then the objects FIFOs APIs are included | ||
| 365 | * in the kernel. | ||
| 366 | * | ||
| 367 | * @note The default is @p TRUE. | ||
| 368 | */ | ||
| 369 | #if !defined(CH_CFG_USE_OBJ_FIFOS) | ||
| 370 | #define CH_CFG_USE_OBJ_FIFOS FALSE | ||
| 371 | #endif | ||
| 372 | |||
| 373 | /** | ||
| 374 | * @brief Pipes APIs. | ||
| 375 | * @details If enabled then the pipes APIs are included | ||
| 376 | * in the kernel. | ||
| 377 | * | ||
| 378 | * @note The default is @p TRUE. | ||
| 379 | */ | ||
| 380 | #if !defined(CH_CFG_USE_PIPES) | ||
| 381 | #define CH_CFG_USE_PIPES FALSE | ||
| 382 | #endif | ||
| 383 | |||
| 384 | /** | ||
| 385 | * @brief Dynamic Threads APIs. | ||
| 386 | * @details If enabled then the dynamic threads creation APIs are included | ||
| 387 | * in the kernel. | ||
| 388 | * | ||
| 389 | * @note The default is @p TRUE. | ||
| 390 | * @note Requires @p CH_CFG_USE_WAITEXIT. | ||
| 391 | * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. | ||
| 392 | */ | ||
| 393 | #if !defined(CH_CFG_USE_DYNAMIC) | ||
| 394 | #define CH_CFG_USE_DYNAMIC FALSE | ||
| 395 | #endif | ||
| 396 | |||
| 397 | /** @} */ | ||
| 398 | |||
| 399 | /*===========================================================================*/ | ||
| 400 | /** | ||
| 401 | * @name Objects factory options | ||
| 402 | * @{ | ||
| 403 | */ | ||
| 404 | /*===========================================================================*/ | ||
| 405 | |||
| 406 | /** | ||
| 407 | * @brief Objects Factory APIs. | ||
| 408 | * @details If enabled then the objects factory APIs are included in the | ||
| 409 | * kernel. | ||
| 410 | * | ||
| 411 | * @note The default is @p FALSE. | ||
| 412 | */ | ||
| 413 | #if !defined(CH_CFG_USE_FACTORY) | ||
| 414 | #define CH_CFG_USE_FACTORY FALSE | ||
| 415 | #endif | ||
| 416 | |||
| 417 | /** | ||
| 418 | * @brief Maximum length for object names. | ||
| 419 | * @details If the specified length is zero then the name is stored by | ||
| 420 | * pointer but this could have unintended side effects. | ||
| 421 | */ | ||
| 422 | #if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) | ||
| 423 | #define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 | ||
| 424 | #endif | ||
| 425 | |||
| 426 | /** | ||
| 427 | * @brief Enables the registry of generic objects. | ||
| 428 | */ | ||
| 429 | #if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) | ||
| 430 | #define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE | ||
| 431 | #endif | ||
| 432 | |||
| 433 | /** | ||
| 434 | * @brief Enables factory for generic buffers. | ||
| 435 | */ | ||
| 436 | #if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) | ||
| 437 | #define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE | ||
| 438 | #endif | ||
| 439 | |||
| 440 | /** | ||
| 441 | * @brief Enables factory for semaphores. | ||
| 442 | */ | ||
| 443 | #if !defined(CH_CFG_FACTORY_SEMAPHORES) | ||
| 444 | #define CH_CFG_FACTORY_SEMAPHORES FALSE | ||
| 445 | #endif | ||
| 446 | |||
| 447 | /** | ||
| 448 | * @brief Enables factory for mailboxes. | ||
| 449 | */ | ||
| 450 | #if !defined(CH_CFG_FACTORY_MAILBOXES) | ||
| 451 | #define CH_CFG_FACTORY_MAILBOXES FALSE | ||
| 452 | #endif | ||
| 453 | |||
| 454 | /** | ||
| 455 | * @brief Enables factory for objects FIFOs. | ||
| 456 | */ | ||
| 457 | #if !defined(CH_CFG_FACTORY_OBJ_FIFOS) | ||
| 458 | #define CH_CFG_FACTORY_OBJ_FIFOS FALSE | ||
| 459 | #endif | ||
| 460 | |||
| 461 | /** | ||
| 462 | * @brief Enables factory for Pipes. | ||
| 463 | */ | ||
| 464 | #if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) | ||
| 465 | #define CH_CFG_FACTORY_PIPES FALSE | ||
| 466 | #endif | ||
| 467 | |||
| 468 | /** @} */ | ||
| 469 | |||
| 470 | /*===========================================================================*/ | ||
| 471 | /** | ||
| 472 | * @name Debug options | ||
| 473 | * @{ | ||
| 474 | */ | ||
| 475 | /*===========================================================================*/ | ||
| 476 | |||
| 477 | /** | ||
| 478 | * @brief Debug option, kernel statistics. | ||
| 479 | * | ||
| 480 | * @note The default is @p FALSE. | ||
| 481 | */ | ||
| 482 | #if !defined(CH_DBG_STATISTICS) | ||
| 483 | #define CH_DBG_STATISTICS FALSE | ||
| 484 | #endif | ||
| 485 | |||
| 486 | /** | ||
| 487 | * @brief Debug option, system state check. | ||
| 488 | * @details If enabled the correct call protocol for system APIs is checked | ||
| 489 | * at runtime. | ||
| 490 | * | ||
| 491 | * @note The default is @p FALSE. | ||
| 492 | */ | ||
| 493 | #if !defined(CH_DBG_SYSTEM_STATE_CHECK) | ||
| 494 | #define CH_DBG_SYSTEM_STATE_CHECK FALSE | ||
| 495 | #endif | ||
| 496 | |||
| 497 | /** | ||
| 498 | * @brief Debug option, parameters checks. | ||
| 499 | * @details If enabled then the checks on the API functions input | ||
| 500 | * parameters are activated. | ||
| 501 | * | ||
| 502 | * @note The default is @p FALSE. | ||
| 503 | */ | ||
| 504 | #if !defined(CH_DBG_ENABLE_CHECKS) | ||
| 505 | #define CH_DBG_ENABLE_CHECKS FALSE | ||
| 506 | #endif | ||
| 507 | |||
| 508 | /** | ||
| 509 | * @brief Debug option, consistency checks. | ||
| 510 | * @details If enabled then all the assertions in the kernel code are | ||
| 511 | * activated. This includes consistency checks inside the kernel, | ||
| 512 | * runtime anomalies and port-defined checks. | ||
| 513 | * | ||
| 514 | * @note The default is @p FALSE. | ||
| 515 | */ | ||
| 516 | #if !defined(CH_DBG_ENABLE_ASSERTS) | ||
| 517 | #define CH_DBG_ENABLE_ASSERTS FALSE | ||
| 518 | #endif | ||
| 519 | |||
| 520 | /** | ||
| 521 | * @brief Debug option, trace buffer. | ||
| 522 | * @details If enabled then the trace buffer is activated. | ||
| 523 | * | ||
| 524 | * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. | ||
| 525 | */ | ||
| 526 | #if !defined(CH_DBG_TRACE_MASK) | ||
| 527 | #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED | ||
| 528 | #endif | ||
| 529 | |||
| 530 | /** | ||
| 531 | * @brief Trace buffer entries. | ||
| 532 | * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is | ||
| 533 | * different from @p CH_DBG_TRACE_MASK_DISABLED. | ||
| 534 | */ | ||
| 535 | #if !defined(CH_DBG_TRACE_BUFFER_SIZE) | ||
| 536 | #define CH_DBG_TRACE_BUFFER_SIZE 128 | ||
| 537 | #endif | ||
| 538 | |||
| 539 | /** | ||
| 540 | * @brief Debug option, stack checks. | ||
| 541 | * @details If enabled then a runtime stack check is performed. | ||
| 542 | * | ||
| 543 | * @note The default is @p FALSE. | ||
| 544 | * @note The stack check is performed in a architecture/port dependent way. | ||
| 545 | * It may not be implemented or some ports. | ||
| 546 | * @note The default failure mode is to halt the system with the global | ||
| 547 | * @p panic_msg variable set to @p NULL. | ||
| 548 | */ | ||
| 549 | #if !defined(CH_DBG_ENABLE_STACK_CHECK) | ||
| 550 | #define CH_DBG_ENABLE_STACK_CHECK FALSE | ||
| 551 | #endif | ||
| 552 | |||
| 553 | /** | ||
| 554 | * @brief Debug option, stacks initialization. | ||
| 555 | * @details If enabled then the threads working area is filled with a byte | ||
| 556 | * value when a thread is created. This can be useful for the | ||
| 557 | * runtime measurement of the used stack. | ||
| 558 | * | ||
| 559 | * @note The default is @p FALSE. | ||
| 560 | */ | ||
| 561 | #if !defined(CH_DBG_FILL_THREADS) | ||
| 562 | #define CH_DBG_FILL_THREADS FALSE | ||
| 563 | #endif | ||
| 564 | |||
| 565 | /** | ||
| 566 | * @brief Debug option, threads profiling. | ||
| 567 | * @details If enabled then a field is added to the @p thread_t structure that | ||
| 568 | * counts the system ticks occurred while executing the thread. | ||
| 569 | * | ||
| 570 | * @note The default is @p FALSE. | ||
| 571 | * @note This debug option is not currently compatible with the | ||
| 572 | * tickless mode. | ||
| 573 | */ | ||
| 574 | #if !defined(CH_DBG_THREADS_PROFILING) | ||
| 575 | #define CH_DBG_THREADS_PROFILING FALSE | ||
| 576 | #endif | ||
| 577 | |||
| 578 | /** @} */ | ||
| 579 | |||
| 580 | /*===========================================================================*/ | ||
| 581 | /** | ||
| 582 | * @name Kernel hooks | ||
| 583 | * @{ | ||
| 584 | */ | ||
| 585 | /*===========================================================================*/ | ||
| 586 | |||
| 587 | /** | ||
| 588 | * @brief System structure extension. | ||
| 589 | * @details User fields added to the end of the @p ch_system_t structure. | ||
| 590 | */ | ||
| 591 | #define CH_CFG_SYSTEM_EXTRA_FIELDS \ | ||
| 592 | /* Add threads custom fields here.*/ | ||
| 593 | |||
| 594 | /** | ||
| 595 | * @brief System initialization hook. | ||
| 596 | * @details User initialization code added to the @p chSysInit() function | ||
| 597 | * just before interrupts are enabled globally. | ||
| 598 | */ | ||
| 599 | #define CH_CFG_SYSTEM_INIT_HOOK() { \ | ||
| 600 | /* Add threads initialization code here.*/ \ | ||
| 601 | } | ||
| 602 | |||
| 603 | /** | ||
| 604 | * @brief Threads descriptor structure extension. | ||
| 605 | * @details User fields added to the end of the @p thread_t structure. | ||
| 606 | */ | ||
| 607 | #define CH_CFG_THREAD_EXTRA_FIELDS \ | ||
| 608 | /* Add threads custom fields here.*/ | ||
| 609 | |||
| 610 | /** | ||
| 611 | * @brief Threads initialization hook. | ||
| 612 | * @details User initialization code added to the @p _thread_init() function. | ||
| 613 | * | ||
| 614 | * @note It is invoked from within @p _thread_init() and implicitly from all | ||
| 615 | * the threads creation APIs. | ||
| 616 | */ | ||
| 617 | #define CH_CFG_THREAD_INIT_HOOK(tp) { \ | ||
| 618 | /* Add threads initialization code here.*/ \ | ||
| 619 | } | ||
| 620 | |||
| 621 | /** | ||
| 622 | * @brief Threads finalization hook. | ||
| 623 | * @details User finalization code added to the @p chThdExit() API. | ||
| 624 | */ | ||
| 625 | #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ | ||
| 626 | /* Add threads finalization code here.*/ \ | ||
| 627 | } | ||
| 628 | |||
| 629 | /** | ||
| 630 | * @brief Context switch hook. | ||
| 631 | * @details This hook is invoked just before switching between threads. | ||
| 632 | */ | ||
| 633 | #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ | ||
| 634 | /* Context switch code here.*/ \ | ||
| 635 | } | ||
| 636 | |||
| 637 | /** | ||
| 638 | * @brief ISR enter hook. | ||
| 639 | */ | ||
| 640 | #define CH_CFG_IRQ_PROLOGUE_HOOK() { \ | ||
| 641 | /* IRQ prologue code here.*/ \ | ||
| 642 | } | ||
| 643 | |||
| 644 | /** | ||
| 645 | * @brief ISR exit hook. | ||
| 646 | */ | ||
| 647 | #define CH_CFG_IRQ_EPILOGUE_HOOK() { \ | ||
| 648 | /* IRQ epilogue code here.*/ \ | ||
| 649 | } | ||
| 650 | |||
| 651 | /** | ||
| 652 | * @brief Idle thread enter hook. | ||
| 653 | * @note This hook is invoked within a critical zone, no OS functions | ||
| 654 | * should be invoked from here. | ||
| 655 | * @note This macro can be used to activate a power saving mode. | ||
| 656 | */ | ||
| 657 | #define CH_CFG_IDLE_ENTER_HOOK() { \ | ||
| 658 | /* Idle-enter code here.*/ \ | ||
| 659 | } | ||
| 660 | |||
| 661 | /** | ||
| 662 | * @brief Idle thread leave hook. | ||
| 663 | * @note This hook is invoked within a critical zone, no OS functions | ||
| 664 | * should be invoked from here. | ||
| 665 | * @note This macro can be used to deactivate a power saving mode. | ||
| 666 | */ | ||
| 667 | #define CH_CFG_IDLE_LEAVE_HOOK() { \ | ||
| 668 | /* Idle-leave code here.*/ \ | ||
| 669 | } | ||
| 670 | |||
| 671 | /** | ||
| 672 | * @brief Idle Loop hook. | ||
| 673 | * @details This hook is continuously invoked by the idle thread loop. | ||
| 674 | */ | ||
| 675 | #define CH_CFG_IDLE_LOOP_HOOK() { \ | ||
| 676 | /* Idle loop code here.*/ \ | ||
| 677 | } | ||
| 678 | |||
| 679 | /** | ||
| 680 | * @brief System tick event hook. | ||
| 681 | * @details This hook is invoked in the system tick handler immediately | ||
| 682 | * after processing the virtual timers queue. | ||
| 683 | */ | ||
| 684 | #define CH_CFG_SYSTEM_TICK_HOOK() { \ | ||
| 685 | /* System tick event code here.*/ \ | ||
| 686 | } | ||
| 687 | |||
| 688 | /** | ||
| 689 | * @brief System halt hook. | ||
| 690 | * @details This hook is invoked in case to a system halting error before | ||
| 691 | * the system is halted. | ||
| 692 | */ | ||
| 693 | #define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ | ||
| 694 | /* System halt code here.*/ \ | ||
| 695 | } | ||
| 696 | |||
| 697 | /** | ||
| 698 | * @brief Trace hook. | ||
| 699 | * @details This hook is invoked each time a new record is written in the | ||
| 700 | * trace buffer. | ||
| 701 | */ | ||
| 702 | #define CH_CFG_TRACE_HOOK(tep) { \ | ||
| 703 | /* Trace code here.*/ \ | ||
| 704 | } | ||
| 705 | |||
| 706 | /** @} */ | ||
| 707 | |||
| 708 | /*===========================================================================*/ | ||
| 709 | /* Port-specific settings (override port settings defaulted in chcore.h). */ | ||
| 710 | /*===========================================================================*/ | ||
| 711 | |||
| 712 | #endif /* CHCONF_H */ | ||
| 713 | |||
| 714 | /** @} */ | ||
diff --git a/keyboards/tkc/candybar/halconf.h b/keyboards/tkc/candybar/halconf.h new file mode 100644 index 000000000..16f32117d --- /dev/null +++ b/keyboards/tkc/candybar/halconf.h | |||
| @@ -0,0 +1,525 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
| 3 | |||
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | you may not use this file except in compliance with the License. | ||
| 6 | You may obtain a copy of the License at | ||
| 7 | |||
| 8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | |||
| 10 | Unless required by applicable law or agreed to in writing, software | ||
| 11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | See the License for the specific language governing permissions and | ||
| 14 | limitations under the License. | ||
| 15 | */ | ||
| 16 | |||
| 17 | /** | ||
| 18 | * @file templates/halconf.h | ||
| 19 | * @brief HAL configuration header. | ||
| 20 | * @details HAL configuration file, this file allows to enable or disable the | ||
| 21 | * various device drivers from your application. You may also use | ||
| 22 | * this file in order to override the device drivers default settings. | ||
| 23 | * | ||
| 24 | * @addtogroup HAL_CONF | ||
| 25 | * @{ | ||
| 26 | */ | ||
| 27 | |||
| 28 | #ifndef HALCONF_H | ||
| 29 | #define HALCONF_H | ||
| 30 | |||
| 31 | #define _CHIBIOS_HAL_CONF_ | ||
| 32 | #define _CHIBIOS_HAL_CONF_VER_7_0_ | ||
| 33 | |||
| 34 | #include "mcuconf.h" | ||
| 35 | |||
| 36 | /** | ||
| 37 | * @brief Enables the PAL subsystem. | ||
| 38 | */ | ||
| 39 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) | ||
| 40 | #define HAL_USE_PAL TRUE | ||
| 41 | #endif | ||
| 42 | |||
| 43 | /** | ||
| 44 | * @brief Enables the ADC subsystem. | ||
| 45 | */ | ||
| 46 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) | ||
| 47 | #define HAL_USE_ADC FALSE | ||
| 48 | #endif | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @brief Enables the CAN subsystem. | ||
| 52 | */ | ||
| 53 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) | ||
| 54 | #define HAL_USE_CAN FALSE | ||
| 55 | #endif | ||
| 56 | |||
| 57 | /** | ||
| 58 | * @brief Enables the cryptographic subsystem. | ||
| 59 | */ | ||
| 60 | #if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) | ||
| 61 | #define HAL_USE_CRY FALSE | ||
| 62 | #endif | ||
| 63 | |||
| 64 | /** | ||
| 65 | * @brief Enables the DAC subsystem. | ||
| 66 | */ | ||
| 67 | #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) | ||
| 68 | #define HAL_USE_DAC FALSE | ||
| 69 | #endif | ||
| 70 | |||
| 71 | /** | ||
| 72 | * @brief Enables the GPT subsystem. | ||
| 73 | */ | ||
| 74 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) | ||
| 75 | #define HAL_USE_GPT FALSE | ||
| 76 | #endif | ||
| 77 | |||
| 78 | /** | ||
| 79 | * @brief Enables the I2C subsystem. | ||
| 80 | */ | ||
| 81 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) | ||
| 82 | #define HAL_USE_I2C FALSE | ||
| 83 | #endif | ||
| 84 | |||
| 85 | /** | ||
| 86 | * @brief Enables the I2S subsystem. | ||
| 87 | */ | ||
| 88 | #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) | ||
| 89 | #define HAL_USE_I2S FALSE | ||
| 90 | #endif | ||
| 91 | |||
| 92 | /** | ||
| 93 | * @brief Enables the ICU subsystem. | ||
| 94 | */ | ||
| 95 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) | ||
| 96 | #define HAL_USE_ICU FALSE | ||
| 97 | #endif | ||
| 98 | |||
| 99 | /** | ||
| 100 | * @brief Enables the MAC subsystem. | ||
| 101 | */ | ||
| 102 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) | ||
| 103 | #define HAL_USE_MAC FALSE | ||
| 104 | #endif | ||
| 105 | |||
| 106 | /** | ||
| 107 | * @brief Enables the MMC_SPI subsystem. | ||
| 108 | */ | ||
| 109 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) | ||
| 110 | #define HAL_USE_MMC_SPI FALSE | ||
| 111 | #endif | ||
| 112 | |||
| 113 | /** | ||
| 114 | * @brief Enables the PWM subsystem. | ||
| 115 | */ | ||
| 116 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) | ||
| 117 | #define HAL_USE_PWM FALSE | ||
| 118 | #endif | ||
| 119 | |||
| 120 | /** | ||
| 121 | * @brief Enables the RTC subsystem. | ||
| 122 | */ | ||
| 123 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) | ||
| 124 | #define HAL_USE_RTC FALSE | ||
| 125 | #endif | ||
| 126 | |||
| 127 | /** | ||
| 128 | * @brief Enables the SDC subsystem. | ||
| 129 | */ | ||
| 130 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) | ||
| 131 | #define HAL_USE_SDC FALSE | ||
| 132 | #endif | ||
| 133 | |||
| 134 | /** | ||
| 135 | * @brief Enables the SERIAL subsystem. | ||
| 136 | */ | ||
| 137 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) | ||
| 138 | #define HAL_USE_SERIAL FALSE | ||
| 139 | #endif | ||
| 140 | |||
| 141 | /** | ||
| 142 | * @brief Enables the SERIAL over USB subsystem. | ||
| 143 | */ | ||
| 144 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) | ||
| 145 | #define HAL_USE_SERIAL_USB FALSE | ||
| 146 | #endif | ||
| 147 | |||
| 148 | /** | ||
| 149 | * @brief Enables the SIO subsystem. | ||
| 150 | */ | ||
| 151 | #if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) | ||
| 152 | #define HAL_USE_SIO FALSE | ||
| 153 | #endif | ||
| 154 | |||
| 155 | /** | ||
| 156 | * @brief Enables the SPI subsystem. | ||
| 157 | */ | ||
| 158 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) | ||
| 159 | #define HAL_USE_SPI FALSE | ||
| 160 | #endif | ||
| 161 | |||
| 162 | /** | ||
| 163 | * @brief Enables the TRNG subsystem. | ||
| 164 | */ | ||
| 165 | #if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) | ||
| 166 | #define HAL_USE_TRNG FALSE | ||
| 167 | #endif | ||
| 168 | |||
| 169 | /** | ||
| 170 | * @brief Enables the UART subsystem. | ||
| 171 | */ | ||
| 172 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) | ||
| 173 | #define HAL_USE_UART FALSE | ||
| 174 | #endif | ||
| 175 | |||
| 176 | /** | ||
| 177 | * @brief Enables the USB subsystem. | ||
| 178 | */ | ||
| 179 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) | ||
| 180 | #define HAL_USE_USB TRUE | ||
| 181 | #endif | ||
| 182 | |||
| 183 | /** | ||
| 184 | * @brief Enables the WDG subsystem. | ||
| 185 | */ | ||
| 186 | #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) | ||
| 187 | #define HAL_USE_WDG FALSE | ||
| 188 | #endif | ||
| 189 | |||
| 190 | /** | ||
| 191 | * @brief Enables the WSPI subsystem. | ||
| 192 | */ | ||
| 193 | #if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) | ||
| 194 | #define HAL_USE_WSPI FALSE | ||
| 195 | #endif | ||
| 196 | |||
| 197 | /*===========================================================================*/ | ||
| 198 | /* PAL driver related settings. */ | ||
| 199 | /*===========================================================================*/ | ||
| 200 | |||
| 201 | /** | ||
| 202 | * @brief Enables synchronous APIs. | ||
| 203 | * @note Disabling this option saves both code and data space. | ||
| 204 | */ | ||
| 205 | #if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) | ||
| 206 | #define PAL_USE_CALLBACKS FALSE | ||
| 207 | #endif | ||
| 208 | |||
| 209 | /** | ||
| 210 | * @brief Enables synchronous APIs. | ||
| 211 | * @note Disabling this option saves both code and data space. | ||
| 212 | */ | ||
| 213 | #if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) | ||
| 214 | #define PAL_USE_WAIT FALSE | ||
| 215 | #endif | ||
| 216 | |||
| 217 | /*===========================================================================*/ | ||
| 218 | /* ADC driver related settings. */ | ||
| 219 | /*===========================================================================*/ | ||
| 220 | |||
| 221 | /** | ||
| 222 | * @brief Enables synchronous APIs. | ||
| 223 | * @note Disabling this option saves both code and data space. | ||
| 224 | */ | ||
| 225 | #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) | ||
| 226 | #define ADC_USE_WAIT TRUE | ||
| 227 | #endif | ||
| 228 | |||
| 229 | /** | ||
| 230 | * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. | ||
| 231 | * @note Disabling this option saves both code and data space. | ||
| 232 | */ | ||
| 233 | #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 234 | #define ADC_USE_MUTUAL_EXCLUSION TRUE | ||
| 235 | #endif | ||
| 236 | |||
| 237 | /*===========================================================================*/ | ||
| 238 | /* CAN driver related settings. */ | ||
| 239 | /*===========================================================================*/ | ||
| 240 | |||
| 241 | /** | ||
| 242 | * @brief Sleep mode related APIs inclusion switch. | ||
| 243 | */ | ||
| 244 | #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) | ||
| 245 | #define CAN_USE_SLEEP_MODE TRUE | ||
| 246 | #endif | ||
| 247 | |||
| 248 | /** | ||
| 249 | * @brief Enforces the driver to use direct callbacks rather than OSAL events. | ||
| 250 | */ | ||
| 251 | #if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) | ||
| 252 | #define CAN_ENFORCE_USE_CALLBACKS FALSE | ||
| 253 | #endif | ||
| 254 | |||
| 255 | /*===========================================================================*/ | ||
| 256 | /* CRY driver related settings. */ | ||
| 257 | /*===========================================================================*/ | ||
| 258 | |||
| 259 | /** | ||
| 260 | * @brief Enables the SW fall-back of the cryptographic driver. | ||
| 261 | * @details When enabled, this option, activates a fall-back software | ||
| 262 | * implementation for algorithms not supported by the underlying | ||
| 263 | * hardware. | ||
| 264 | * @note Fall-back implementations may not be present for all algorithms. | ||
| 265 | */ | ||
| 266 | #if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) | ||
| 267 | #define HAL_CRY_USE_FALLBACK FALSE | ||
| 268 | #endif | ||
| 269 | |||
| 270 | /** | ||
| 271 | * @brief Makes the driver forcibly use the fall-back implementations. | ||
| 272 | */ | ||
| 273 | #if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) | ||
| 274 | #define HAL_CRY_ENFORCE_FALLBACK FALSE | ||
| 275 | #endif | ||
| 276 | |||
| 277 | /*===========================================================================*/ | ||
| 278 | /* DAC driver related settings. */ | ||
| 279 | /*===========================================================================*/ | ||
| 280 | |||
| 281 | /** | ||
| 282 | * @brief Enables synchronous APIs. | ||
| 283 | * @note Disabling this option saves both code and data space. | ||
| 284 | */ | ||
| 285 | #if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) | ||
| 286 | #define DAC_USE_WAIT TRUE | ||
| 287 | #endif | ||
| 288 | |||
| 289 | /** | ||
| 290 | * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. | ||
| 291 | * @note Disabling this option saves both code and data space. | ||
| 292 | */ | ||
| 293 | #if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 294 | #define DAC_USE_MUTUAL_EXCLUSION TRUE | ||
| 295 | #endif | ||
| 296 | |||
| 297 | /*===========================================================================*/ | ||
| 298 | /* I2C driver related settings. */ | ||
| 299 | /*===========================================================================*/ | ||
| 300 | |||
| 301 | /** | ||
| 302 | * @brief Enables the mutual exclusion APIs on the I2C bus. | ||
| 303 | */ | ||
| 304 | #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 305 | #define I2C_USE_MUTUAL_EXCLUSION TRUE | ||
| 306 | #endif | ||
| 307 | |||
| 308 | /*===========================================================================*/ | ||
| 309 | /* MAC driver related settings. */ | ||
| 310 | /*===========================================================================*/ | ||
| 311 | |||
| 312 | /** | ||
| 313 | * @brief Enables the zero-copy API. | ||
| 314 | */ | ||
| 315 | #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) | ||
| 316 | #define MAC_USE_ZERO_COPY FALSE | ||
| 317 | #endif | ||
| 318 | |||
| 319 | /** | ||
| 320 | * @brief Enables an event sources for incoming packets. | ||
| 321 | */ | ||
| 322 | #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) | ||
| 323 | #define MAC_USE_EVENTS TRUE | ||
| 324 | #endif | ||
| 325 | |||
| 326 | /*===========================================================================*/ | ||
| 327 | /* MMC_SPI driver related settings. */ | ||
| 328 | /*===========================================================================*/ | ||
| 329 | |||
| 330 | /** | ||
| 331 | * @brief Delays insertions. | ||
| 332 | * @details If enabled this options inserts delays into the MMC waiting | ||
| 333 | * routines releasing some extra CPU time for the threads with | ||
| 334 | * lower priority, this may slow down the driver a bit however. | ||
| 335 | * This option is recommended also if the SPI driver does not | ||
| 336 | * use a DMA channel and heavily loads the CPU. | ||
| 337 | */ | ||
| 338 | #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) | ||
| 339 | #define MMC_NICE_WAITING TRUE | ||
| 340 | #endif | ||
| 341 | |||
| 342 | /*===========================================================================*/ | ||
| 343 | /* SDC driver related settings. */ | ||
| 344 | /*===========================================================================*/ | ||
| 345 | |||
| 346 | /** | ||
| 347 | * @brief Number of initialization attempts before rejecting the card. | ||
| 348 | * @note Attempts are performed at 10mS intervals. | ||
| 349 | */ | ||
| 350 | #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) | ||
| 351 | #define SDC_INIT_RETRY 100 | ||
| 352 | #endif | ||
| 353 | |||
| 354 | /** | ||
| 355 | * @brief Include support for MMC cards. | ||
| 356 | * @note MMC support is not yet implemented so this option must be kept | ||
| 357 | * at @p FALSE. | ||
| 358 | */ | ||
| 359 | #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) | ||
| 360 | #define SDC_MMC_SUPPORT FALSE | ||
| 361 | #endif | ||
| 362 | |||
| 363 | /** | ||
| 364 | * @brief Delays insertions. | ||
| 365 | * @details If enabled this options inserts delays into the MMC waiting | ||
| 366 | * routines releasing some extra CPU time for the threads with | ||
| 367 | * lower priority, this may slow down the driver a bit however. | ||
| 368 | */ | ||
| 369 | #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) | ||
| 370 | #define SDC_NICE_WAITING TRUE | ||
| 371 | #endif | ||
| 372 | |||
| 373 | /** | ||
| 374 | * @brief OCR initialization constant for V20 cards. | ||
| 375 | */ | ||
| 376 | #if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) | ||
| 377 | #define SDC_INIT_OCR_V20 0x50FF8000U | ||
| 378 | #endif | ||
| 379 | |||
| 380 | /** | ||
| 381 | * @brief OCR initialization constant for non-V20 cards. | ||
| 382 | */ | ||
| 383 | #if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) | ||
| 384 | #define SDC_INIT_OCR 0x80100000U | ||
| 385 | #endif | ||
| 386 | |||
| 387 | /*===========================================================================*/ | ||
| 388 | /* SERIAL driver related settings. */ | ||
| 389 | /*===========================================================================*/ | ||
| 390 | |||
| 391 | /** | ||
| 392 | * @brief Default bit rate. | ||
| 393 | * @details Configuration parameter, this is the baud rate selected for the | ||
| 394 | * default configuration. | ||
| 395 | */ | ||
| 396 | #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) | ||
| 397 | #define SERIAL_DEFAULT_BITRATE 38400 | ||
| 398 | #endif | ||
| 399 | |||
| 400 | /** | ||
| 401 | * @brief Serial buffers size. | ||
| 402 | * @details Configuration parameter, you can change the depth of the queue | ||
| 403 | * buffers depending on the requirements of your application. | ||
| 404 | * @note The default is 16 bytes for both the transmission and receive | ||
| 405 | * buffers. | ||
| 406 | */ | ||
| 407 | #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) | ||
| 408 | #define SERIAL_BUFFERS_SIZE 16 | ||
| 409 | #endif | ||
| 410 | |||
| 411 | /*===========================================================================*/ | ||
| 412 | /* SERIAL_USB driver related setting. */ | ||
| 413 | /*===========================================================================*/ | ||
| 414 | |||
| 415 | /** | ||
| 416 | * @brief Serial over USB buffers size. | ||
| 417 | * @details Configuration parameter, the buffer size must be a multiple of | ||
| 418 | * the USB data endpoint maximum packet size. | ||
| 419 | * @note The default is 256 bytes for both the transmission and receive | ||
| 420 | * buffers. | ||
| 421 | */ | ||
| 422 | #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) | ||
| 423 | #define SERIAL_USB_BUFFERS_SIZE 1 | ||
| 424 | #endif | ||
| 425 | |||
| 426 | /** | ||
| 427 | * @brief Serial over USB number of buffers. | ||
| 428 | * @note The default is 2 buffers. | ||
| 429 | */ | ||
| 430 | #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) | ||
| 431 | #define SERIAL_USB_BUFFERS_NUMBER 2 | ||
| 432 | #endif | ||
| 433 | |||
| 434 | /*===========================================================================*/ | ||
| 435 | /* SPI driver related settings. */ | ||
| 436 | /*===========================================================================*/ | ||
| 437 | |||
| 438 | /** | ||
| 439 | * @brief Enables synchronous APIs. | ||
| 440 | * @note Disabling this option saves both code and data space. | ||
| 441 | */ | ||
| 442 | #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) | ||
| 443 | #define SPI_USE_WAIT TRUE | ||
| 444 | #endif | ||
| 445 | |||
| 446 | /** | ||
| 447 | * @brief Enables circular transfers APIs. | ||
| 448 | * @note Disabling this option saves both code and data space. | ||
| 449 | */ | ||
| 450 | #if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) | ||
| 451 | #define SPI_USE_CIRCULAR FALSE | ||
| 452 | #endif | ||
| 453 | |||
| 454 | |||
| 455 | /** | ||
| 456 | * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. | ||
| 457 | * @note Disabling this option saves both code and data space. | ||
| 458 | */ | ||
| 459 | #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 460 | #define SPI_USE_MUTUAL_EXCLUSION TRUE | ||
| 461 | #endif | ||
| 462 | |||
| 463 | /** | ||
| 464 | * @brief Handling method for SPI CS line. | ||
| 465 | * @note Disabling this option saves both code and data space. | ||
| 466 | */ | ||
| 467 | #if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) | ||
| 468 | #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD | ||
| 469 | #endif | ||
| 470 | |||
| 471 | /*===========================================================================*/ | ||
| 472 | /* UART driver related settings. */ | ||
| 473 | /*===========================================================================*/ | ||
| 474 | |||
| 475 | /** | ||
| 476 | * @brief Enables synchronous APIs. | ||
| 477 | * @note Disabling this option saves both code and data space. | ||
| 478 | */ | ||
| 479 | #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) | ||
| 480 | #define UART_USE_WAIT FALSE | ||
| 481 | #endif | ||
| 482 | |||
| 483 | /** | ||
| 484 | * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. | ||
| 485 | * @note Disabling this option saves both code and data space. | ||
| 486 | */ | ||
| 487 | #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 488 | #define UART_USE_MUTUAL_EXCLUSION FALSE | ||
| 489 | #endif | ||
| 490 | |||
| 491 | /*===========================================================================*/ | ||
| 492 | /* USB driver related settings. */ | ||
| 493 | /*===========================================================================*/ | ||
| 494 | |||
| 495 | /** | ||
| 496 | * @brief Enables synchronous APIs. | ||
| 497 | * @note Disabling this option saves both code and data space. | ||
| 498 | */ | ||
| 499 | #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) | ||
| 500 | #define USB_USE_WAIT TRUE | ||
| 501 | #endif | ||
| 502 | |||
| 503 | /*===========================================================================*/ | ||
| 504 | /* WSPI driver related settings. */ | ||
| 505 | /*===========================================================================*/ | ||
| 506 | |||
| 507 | /** | ||
| 508 | * @brief Enables synchronous APIs. | ||
| 509 | * @note Disabling this option saves both code and data space. | ||
| 510 | */ | ||
| 511 | #if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) | ||
| 512 | #define WSPI_USE_WAIT TRUE | ||
| 513 | #endif | ||
| 514 | |||
| 515 | /** | ||
| 516 | * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. | ||
| 517 | * @note Disabling this option saves both code and data space. | ||
| 518 | */ | ||
| 519 | #if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 520 | #define WSPI_USE_MUTUAL_EXCLUSION TRUE | ||
| 521 | #endif | ||
| 522 | |||
| 523 | #endif /* HALCONF_H */ | ||
| 524 | |||
| 525 | /** @} */ | ||
diff --git a/keyboards/tkc/candybar/lefty/config.h b/keyboards/tkc/candybar/lefty/config.h new file mode 100644 index 000000000..e8a1f0081 --- /dev/null +++ b/keyboards/tkc/candybar/lefty/config.h | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert | ||
| 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 0x544B //TK | ||
| 23 | #define PRODUCT_ID 0x0003 | ||
| 24 | #define DEVICE_VER 0x0006 | ||
| 25 | #define MANUFACTURER The Key Company | ||
| 26 | #define PRODUCT Candybar | ||
| 27 | #define DESCRIPTION A compact staggered 40% keyboard with attached numpad | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 4 | ||
| 31 | #define MATRIX_COLS 17 | ||
| 32 | #define DIODE_DIRECTION COL2ROW | ||
| 33 | #define MATRIX_ROW_PINS { A8, A9, A10, A13 } | ||
| 34 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, B2, B10, B11, B12, B13, B14, B15 } | ||
| 35 | |||
| 36 | |||
| 37 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 38 | #define DEBOUNCE 5 | ||
| 39 | |||
| 40 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 41 | //#define LOCKING_SUPPORT_ENABLE | ||
| 42 | /* Locking resynchronize hack */ | ||
| 43 | //#define LOCKING_RESYNC_ENABLE | ||
| 44 | |||
| 45 | /* | ||
| 46 | * Force NKRO | ||
| 47 | * | ||
| 48 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 49 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 50 | * makefile for this to work.) | ||
| 51 | * | ||
| 52 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 53 | * until the next keyboard reset. | ||
| 54 | * | ||
| 55 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 56 | * fully operational during normal computer usage. | ||
| 57 | * | ||
| 58 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 59 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 60 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 61 | * power-up. | ||
| 62 | * | ||
| 63 | */ | ||
| 64 | //#define FORCE_NKRO | ||
| 65 | |||
| 66 | /* | ||
| 67 | * Feature disable options | ||
| 68 | * These options are also useful to firmware size reduction. | ||
| 69 | */ | ||
| 70 | |||
| 71 | /* disable debug print */ | ||
| 72 | //#define NO_DEBUG | ||
| 73 | |||
| 74 | /* disable print */ | ||
| 75 | //#define NO_PRINT | ||
| 76 | |||
| 77 | /* disable action features */ | ||
| 78 | //#define NO_ACTION_LAYER | ||
| 79 | //#define NO_ACTION_TAPPING | ||
| 80 | //#define NO_ACTION_ONESHOT | ||
| 81 | //#define NO_ACTION_MACRO | ||
| 82 | //#define NO_ACTION_FUNCTION | ||
| 83 | |||
| 84 | /* | ||
| 85 | * MIDI options | ||
| 86 | */ | ||
| 87 | |||
| 88 | /* Prevent use of disabled MIDI features in the keymap */ | ||
| 89 | //#define MIDI_ENABLE_STRICT 1 | ||
| 90 | |||
| 91 | /* enable basic MIDI features: | ||
| 92 | - MIDI notes can be sent when in Music mode is on | ||
| 93 | */ | ||
| 94 | //#define MIDI_BASIC | ||
| 95 | |||
| 96 | /* enable advanced MIDI features: | ||
| 97 | - MIDI notes can be added to the keymap | ||
| 98 | - Octave shift and transpose | ||
| 99 | - Virtual sustain, portamento, and modulation wheel | ||
| 100 | - etc. | ||
| 101 | */ | ||
| 102 | //#define MIDI_ADVANCED | ||
| 103 | |||
| 104 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
| 105 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | ||
| 106 | |||
| 107 | // #define WS2812_LED_N 2 | ||
| 108 | // #define RGBLED_NUM WS2812_LED_N | ||
| 109 | // #define WS2812_TIM_N 2 | ||
| 110 | // #define WS2812_TIM_CH 2 | ||
| 111 | // #define PORT_WS2812 GPIOA | ||
| 112 | // #define PIN_WS2812 1 | ||
| 113 | // #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) | ||
| 114 | //#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP | ||
| 115 | //#define WS2812_EXTERNAL_PULLUP | ||
diff --git a/keyboards/tkc/candybar/lefty/info.json b/keyboards/tkc/candybar/lefty/info.json new file mode 100644 index 000000000..1ef3dcd54 --- /dev/null +++ b/keyboards/tkc/candybar/lefty/info.json | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "TKC Candybar", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "terrymathews", | ||
| 5 | "width": 17, | ||
| 6 | "height": 4, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"label":"7", "x":0, "y":0}, {"label":"8", "x":1, "y":0}, {"label":"9", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"Esc", "x":4, "y":0}, {"label":"Q", "x":5, "y":0}, {"label":"W", "x":6, "y":0}, {"label":"E", "x":7, "y":0}, {"label":"R", "x":8, "y":0}, {"label":"T", "x":9, "y":0}, {"label":"Y", "x":10, "y":0}, {"label":"U", "x":11, "y":0}, {"label":"I", "x":12, "y":0}, {"label":"O", "x":13, "y":0}, {"label":"P", "x":14, "y":0}, {"label":"{", "x":15, "y":0}, {"label":"}", "x":16, "y":0}, | ||
| 11 | {"label":"4", "x":0, "y":1}, {"label":"5", "x":1, "y":1}, {"label":"6", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"Tab", "x":4, "y":1, "w":1.25}, {"label":"A", "x":5.25, "y":1}, {"label":"S", "x":6.25, "y":1}, {"label":"D", "x":7.25, "y":1}, {"label":"F", "x":8.25, "y":1}, {"label":"G", "x":9.25, "y":1}, {"label":"H", "x":10.25, "y":1}, {"label":"J", "x":11.25, "y":1}, {"label":"K", "x":12.25, "y":1}, {"label":"L", "x":13.25, "y":1}, {"label":":", "x":14.25, "y":1}, {"label":"Enter", "x":15.25, "y":1, "w":1.75}, | ||
| 12 | {"label":"1", "x":0, "y":2}, {"label":"2", "x":1, "y":2}, {"label":"3", "x":2, "y":2}, {"x":3, "y":2}, {"label":"Shift", "x":4, "y":2, "w":1.75}, {"label":"Z", "x":5.75, "y":2}, {"label":"X", "x":6.75, "y":2}, {"label":"C", "x":7.75, "y":2}, {"label":"V", "x":8.75, "y":2}, {"label":"B", "x":9.75, "y":2}, {"label":"N", "x":10.75, "y":2}, {"label":"M", "x":11.75, "y":2}, {"label":"<", "x":12.75, "y":2}, {"label":">", "x":13.75, "y":2}, {"label":"\u2191", "x":14.75, "y":2}, {"label":"Shift", "x":15.75, "y":2, "w":1.25}, | ||
| 13 | {"label":"Fn", "x":0, "y":3}, {"label":"0", "x":1, "y":3}, {"label":".", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3}, {"label":"Ctrl", "x":4, "y":3, "w":1.25}, {"label":"Win", "x":5.25, "y":3, "w":1.25}, {"label":"Alt", "x":6.5, "y":3, "w":1.25}, {"x":7.75, "y":3, "w":1.75}, {"x":9.5, "y":3}, {"x":10.5, "y":3, "w":2.25}, {"label":"Win", "x":12.75, "y":3, "w":1.25}, {"label":"\u2190", "x":14, "y":3}, {"label":"\u2193", "x":15, "y":3}, {"label":"\u2192", "x":16, "y":3} | ||
| 14 | ] | ||
| 15 | } | ||
| 16 | } | ||
| 17 | } | ||
diff --git a/keyboards/tkc/candybar/lefty/keymaps/default/keymap.c b/keyboards/tkc/candybar/lefty/keymaps/default/keymap.c new file mode 100644 index 000000000..153fd99c5 --- /dev/null +++ b/keyboards/tkc/candybar/lefty/keymaps/default/keymap.c | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | #define _BL 0 | ||
| 20 | #define _FL 1 | ||
| 21 | |||
| 22 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 23 | /* Keymap _BL: Base Layer (Default Layer) | ||
| 24 | */ | ||
| 25 | [_BL] = LAYOUT( | ||
| 26 | KC_P7 , KC_P8, KC_P9 , KC_PAST, KC_ESC , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_O , KC_P , KC_DEL , KC_BSPC , \ | ||
| 27 | KC_P4 , KC_P5, KC_P6 , KC_PMNS, KC_TAB , KC_A , KC_S , KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_SCLN, KC_ENT , \ | ||
| 28 | KC_P1 , KC_P2, KC_P3 , KC_PPLS, KC_LSFT, KC_Z , KC_X, KC_C , KC_V , KC_B, KC_N , KC_M , KC_COMM, KC_DOT , KC_UP ,KC_RSFT , \ | ||
| 29 | MO(_FL), KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , KC_LEFT, KC_DOWN, KC_RGHT), | ||
| 30 | |||
| 31 | /* Keymap _FL: Function Layer | ||
| 32 | */ | ||
| 33 | [_FL] = LAYOUT( | ||
| 34 | KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \ | ||
| 35 | KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \ | ||
| 36 | KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \ | ||
| 37 | KC_END, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , MO(_FL), KC_HOME, KC_PGDN), | ||
| 38 | }; | ||
diff --git a/keyboards/tkc/candybar/lefty/keymaps/via/keymap.c b/keyboards/tkc/candybar/lefty/keymaps/via/keymap.c new file mode 100644 index 000000000..fd927195b --- /dev/null +++ b/keyboards/tkc/candybar/lefty/keymaps/via/keymap.c | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | #define _BL 0 | ||
| 20 | #define _FL 1 | ||
| 21 | #define _AL 2 | ||
| 22 | #define _LL 3 | ||
| 23 | |||
| 24 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 25 | /* Keymap _BL: Base Layer (Default Layer) | ||
| 26 | */ | ||
| 27 | [_BL] = LAYOUT( | ||
| 28 | KC_P7 , KC_P8, KC_P9 , KC_PAST, KC_ESC , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_O , KC_P , KC_DEL , KC_BSPC , \ | ||
| 29 | KC_P4 , KC_P5, KC_P6 , KC_PMNS, KC_TAB , KC_A , KC_S , KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_SCLN, KC_ENT , \ | ||
| 30 | KC_P1 , KC_P2, KC_P3 , KC_PPLS, KC_LSFT, KC_Z , KC_X, KC_C , KC_V , KC_B, KC_N , KC_M , KC_COMM, KC_DOT , KC_UP ,KC_RSFT , \ | ||
| 31 | MO(_FL), KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , KC_LEFT, KC_DOWN, KC_RGHT), | ||
| 32 | |||
| 33 | /* Keymap _FL: Function Layer | ||
| 34 | */ | ||
| 35 | [_FL] = LAYOUT( | ||
| 36 | KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \ | ||
| 37 | KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \ | ||
| 38 | KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \ | ||
| 39 | KC_END, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , MO(_FL), KC_HOME, KC_PGDN), | ||
| 40 | |||
| 41 | [_AL] = LAYOUT( | ||
| 42 | KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \ | ||
| 43 | KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \ | ||
| 44 | KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \ | ||
| 45 | KC_END, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , MO(_FL), KC_HOME, KC_PGDN), | ||
| 46 | |||
| 47 | [_LL] = LAYOUT( | ||
| 48 | KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \ | ||
| 49 | KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \ | ||
| 50 | KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \ | ||
| 51 | KC_END, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , MO(_FL), KC_HOME, KC_PGDN), | ||
| 52 | }; | ||
diff --git a/keyboards/tkc/candybar/lefty/keymaps/via/rules.mk b/keyboards/tkc/candybar/lefty/keymaps/via/rules.mk new file mode 100644 index 000000000..036bd6d1c --- /dev/null +++ b/keyboards/tkc/candybar/lefty/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes \ No newline at end of file | |||
diff --git a/keyboards/tkc/candybar/lefty/lefty.c b/keyboards/tkc/candybar/lefty/lefty.c new file mode 100644 index 000000000..920811b83 --- /dev/null +++ b/keyboards/tkc/candybar/lefty/lefty.c | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert | ||
| 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 | #include "lefty.h" | ||
| 18 | |||
| 19 | void matrix_init_kb(void) { | ||
| 20 | matrix_init_user(); | ||
| 21 | } | ||
diff --git a/keyboards/tkc/candybar/lefty/lefty.h b/keyboards/tkc/candybar/lefty/lefty.h new file mode 100644 index 000000000..07af4b31b --- /dev/null +++ b/keyboards/tkc/candybar/lefty/lefty.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert | ||
| 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 | #include "quantum.h" | ||
| 19 | |||
| 20 | |||
| 21 | #define LAYOUT( \ | ||
| 22 | k0d, k0e, k0f, k0g, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ | ||
| 23 | k1d, k1e, k1f, k1g, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ | ||
| 24 | k2d, k2e, k2f, k2g, k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ | ||
| 25 | k3d, k3e, k3f, k3g, k30, k31, k32, k35, k37, k38, k39, k3a, k3b, k3c \ | ||
| 26 | ) { \ | ||
| 27 | { k00, k01 , k02, k03 , k04 , k05, k06 , k07, k08, k09, k0a, k0b , k0c, k0d, k0e, k0f, k0g } , \ | ||
| 28 | { k10, k11 , k12, k13 , k14 , k15, k16 , k17, k18, k19, k1a, KC_NO, k1c, k1d, k1e, k1f, k1g } , \ | ||
| 29 | { k20, KC_NO, k22, k23 , k24 , k25, k26 , k27, k28, k29, k2a, k2b , k2c, k2d, k2e, k2f, k2g } , \ | ||
| 30 | { k30, k31 , k32, KC_NO, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b , k3c, k3d, k3e, k3f, k3g } \ | ||
| 31 | } | ||
diff --git a/keyboards/tkc/candybar/lefty/readme.md b/keyboards/tkc/candybar/lefty/readme.md new file mode 100644 index 000000000..75ca1cbd8 --- /dev/null +++ b/keyboards/tkc/candybar/lefty/readme.md | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # The Key Company Candybar | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | The Key Company Candybar is a staggered 40% board with a numpad utilizing the STM32F072 microcontroller. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) | ||
| 8 | * Hardware Supported: TKC Candybar | ||
| 9 | * Hardware Availability: [TheKey.Company](https://thekey.company/collections/candybar) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make tkc/candybar/lefty:default:dfu-util | ||
| 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/tkc/candybar/lefty/rules.mk b/keyboards/tkc/candybar/lefty/rules.mk new file mode 100644 index 000000000..52ef91c47 --- /dev/null +++ b/keyboards/tkc/candybar/lefty/rules.mk | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = STM32F072 | ||
| 3 | |||
| 4 | # Build Options | ||
| 5 | # comment out to disable the options. | ||
| 6 | # | ||
| 7 | # EXTRAFLAGS+=-flto | ||
| 8 | LINK_TIME_OPTIMIZATION_ENABLE = yes | ||
| 9 | BACKLIGHT_ENABLE = no | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) | ||
| 12 | MOUSEKEY_ENABLE = no # Mouse keys | ||
| 13 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 14 | CONSOLE_ENABLE = no # Console for debug | ||
| 15 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 18 | AUDIO_ENABLE = no | ||
| 19 | RGBLIGHT_ENABLE = no | ||
| 20 | SERIAL_LINK_ENABLE = no | ||
| 21 | |||
| 22 | |||
| 23 | # Enter lower-power sleep mode when on the ChibiOS idle thread | ||
| 24 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | ||
diff --git a/keyboards/tkc/candybar/mcuconf.h b/keyboards/tkc/candybar/mcuconf.h new file mode 100644 index 000000000..faca3defd --- /dev/null +++ b/keyboards/tkc/candybar/mcuconf.h | |||
| @@ -0,0 +1,171 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio | ||
| 3 | |||
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | you may not use this file except in compliance with the License. | ||
| 6 | You may obtain a copy of the License at | ||
| 7 | |||
| 8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | |||
| 10 | Unless required by applicable law or agreed to in writing, software | ||
| 11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | See the License for the specific language governing permissions and | ||
| 14 | limitations under the License. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef _MCUCONF_H_ | ||
| 18 | #define _MCUCONF_H_ | ||
| 19 | |||
| 20 | /* | ||
| 21 | * STM32F0xx drivers configuration. | ||
| 22 | * The following settings override the default settings present in | ||
| 23 | * the various device driver implementation headers. | ||
| 24 | * Note that the settings for each driver only have effect if the whole | ||
| 25 | * driver is enabled in halconf.h. | ||
| 26 | * | ||
| 27 | * IRQ priorities: | ||
| 28 | * 3...0 Lowest...Highest. | ||
| 29 | * | ||
| 30 | * DMA priorities: | ||
| 31 | * 0...3 Lowest...Highest. | ||
| 32 | */ | ||
| 33 | |||
| 34 | #define STM32F0xx_MCUCONF | ||
| 35 | |||
| 36 | /* | ||
| 37 | * HAL driver system settings. | ||
| 38 | */ | ||
| 39 | #define STM32_NO_INIT FALSE | ||
| 40 | #define STM32_PVD_ENABLE FALSE | ||
| 41 | #define STM32_PLS STM32_PLS_LEV0 | ||
| 42 | #define STM32_HSI_ENABLED TRUE | ||
| 43 | #define STM32_HSI14_ENABLED TRUE | ||
| 44 | #define STM32_HSI48_ENABLED FALSE | ||
| 45 | #define STM32_LSI_ENABLED TRUE | ||
| 46 | #define STM32_HSE_ENABLED FALSE | ||
| 47 | #define STM32_LSE_ENABLED FALSE | ||
| 48 | #define STM32_SW STM32_SW_PLL | ||
| 49 | #define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 | ||
| 50 | #define STM32_PREDIV_VALUE 1 | ||
| 51 | #define STM32_PLLMUL_VALUE 12 | ||
| 52 | #define STM32_HPRE STM32_HPRE_DIV1 | ||
| 53 | #define STM32_PPRE STM32_PPRE_DIV1 | ||
| 54 | #define STM32_ADCSW STM32_ADCSW_HSI14 | ||
| 55 | #define STM32_ADCPRE STM32_ADCPRE_DIV4 | ||
| 56 | #define STM32_MCOSEL STM32_MCOSEL_NOCLOCK | ||
| 57 | #define STM32_ADCPRE STM32_ADCPRE_DIV4 | ||
| 58 | #define STM32_ADCSW STM32_ADCSW_HSI14 | ||
| 59 | #define STM32_USBSW STM32_USBSW_HSI48 | ||
| 60 | #define STM32_CECSW STM32_CECSW_HSI | ||
| 61 | #define STM32_I2C1SW STM32_I2C1SW_HSI | ||
| 62 | #define STM32_USART1SW STM32_USART1SW_PCLK | ||
| 63 | #define STM32_RTCSEL STM32_RTCSEL_LSI | ||
| 64 | |||
| 65 | /* | ||
| 66 | * ADC driver system settings. | ||
| 67 | */ | ||
| 68 | #define STM32_ADC_USE_ADC1 FALSE | ||
| 69 | #define STM32_ADC_ADC1_DMA_PRIORITY 2 | ||
| 70 | #define STM32_ADC_IRQ_PRIORITY 2 | ||
| 71 | #define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 | ||
| 72 | |||
| 73 | /* | ||
| 74 | * EXT driver system settings. | ||
| 75 | */ | ||
| 76 | #define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 | ||
| 77 | #define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 | ||
| 78 | #define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 | ||
| 79 | #define STM32_EXT_EXTI16_IRQ_PRIORITY 3 | ||
| 80 | #define STM32_EXT_EXTI17_IRQ_PRIORITY 3 | ||
| 81 | |||
| 82 | /* | ||
| 83 | * GPT driver system settings. | ||
| 84 | */ | ||
| 85 | #define STM32_GPT_USE_TIM1 FALSE | ||
| 86 | #define STM32_GPT_USE_TIM2 FALSE | ||
| 87 | #define STM32_GPT_USE_TIM3 FALSE | ||
| 88 | #define STM32_GPT_USE_TIM14 FALSE | ||
| 89 | #define STM32_GPT_TIM1_IRQ_PRIORITY 2 | ||
| 90 | #define STM32_GPT_TIM2_IRQ_PRIORITY 2 | ||
| 91 | #define STM32_GPT_TIM3_IRQ_PRIORITY 2 | ||
| 92 | #define STM32_GPT_TIM14_IRQ_PRIORITY 2 | ||
| 93 | |||
| 94 | /* | ||
| 95 | * I2C driver system settings. | ||
| 96 | */ | ||
| 97 | #define STM32_I2C_USE_I2C1 FALSE | ||
| 98 | #define STM32_I2C_USE_I2C2 FALSE | ||
| 99 | #define STM32_I2C_BUSY_TIMEOUT 50 | ||
| 100 | #define STM32_I2C_I2C1_IRQ_PRIORITY 3 | ||
| 101 | #define STM32_I2C_I2C2_IRQ_PRIORITY 3 | ||
| 102 | #define STM32_I2C_USE_DMA TRUE | ||
| 103 | #define STM32_I2C_I2C1_DMA_PRIORITY 1 | ||
| 104 | #define STM32_I2C_I2C2_DMA_PRIORITY 1 | ||
| 105 | #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") | ||
| 106 | |||
| 107 | /* | ||
| 108 | * ICU driver system settings. | ||
| 109 | */ | ||
| 110 | #define STM32_ICU_USE_TIM1 FALSE | ||
| 111 | #define STM32_ICU_USE_TIM2 FALSE | ||
| 112 | #define STM32_ICU_USE_TIM3 FALSE | ||
| 113 | #define STM32_ICU_TIM1_IRQ_PRIORITY 3 | ||
| 114 | #define STM32_ICU_TIM2_IRQ_PRIORITY 3 | ||
| 115 | #define STM32_ICU_TIM3_IRQ_PRIORITY 3 | ||
| 116 | |||
| 117 | /* | ||
| 118 | * PWM driver system settings. | ||
| 119 | */ | ||
| 120 | #define STM32_PWM_USE_ADVANCED FALSE | ||
| 121 | #define STM32_PWM_USE_TIM1 FALSE | ||
| 122 | #define STM32_PWM_USE_TIM2 FALSE | ||
| 123 | #define STM32_PWM_USE_TIM3 FALSE | ||
| 124 | #define STM32_PWM_TIM1_IRQ_PRIORITY 3 | ||
| 125 | #define STM32_PWM_TIM2_IRQ_PRIORITY 3 | ||
| 126 | #define STM32_PWM_TIM3_IRQ_PRIORITY 3 | ||
| 127 | |||
| 128 | /* | ||
| 129 | * SERIAL driver system settings. | ||
| 130 | */ | ||
| 131 | #define STM32_SERIAL_USE_USART1 FALSE | ||
| 132 | #define STM32_SERIAL_USE_USART2 FALSE | ||
| 133 | #define STM32_SERIAL_USART1_PRIORITY 3 | ||
| 134 | #define STM32_SERIAL_USART2_PRIORITY 3 | ||
| 135 | |||
| 136 | /* | ||
| 137 | * SPI driver system settings. | ||
| 138 | */ | ||
| 139 | #define STM32_SPI_USE_SPI1 FALSE | ||
| 140 | #define STM32_SPI_USE_SPI2 FALSE | ||
| 141 | #define STM32_SPI_SPI1_DMA_PRIORITY 1 | ||
| 142 | #define STM32_SPI_SPI2_DMA_PRIORITY 1 | ||
| 143 | #define STM32_SPI_SPI1_IRQ_PRIORITY 2 | ||
| 144 | #define STM32_SPI_SPI2_IRQ_PRIORITY 2 | ||
| 145 | #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") | ||
| 146 | |||
| 147 | /* | ||
| 148 | * ST driver system settings. | ||
| 149 | */ | ||
| 150 | #define STM32_ST_IRQ_PRIORITY 2 | ||
| 151 | #define STM32_ST_USE_TIMER 2 | ||
| 152 | |||
| 153 | /* | ||
| 154 | * UART driver system settings. | ||
| 155 | */ | ||
| 156 | #define STM32_UART_USE_USART1 FALSE | ||
| 157 | #define STM32_UART_USE_USART2 FALSE | ||
| 158 | #define STM32_UART_USART1_IRQ_PRIORITY 3 | ||
| 159 | #define STM32_UART_USART2_IRQ_PRIORITY 3 | ||
| 160 | #define STM32_UART_USART1_DMA_PRIORITY 0 | ||
| 161 | #define STM32_UART_USART2_DMA_PRIORITY 0 | ||
| 162 | #define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") | ||
| 163 | |||
| 164 | /* | ||
| 165 | * USB driver system settings. | ||
| 166 | */ | ||
| 167 | #define STM32_USB_USE_USB1 TRUE | ||
| 168 | #define STM32_USB_LOW_POWER_ON_SUSPEND FALSE | ||
| 169 | #define STM32_USB_USB1_LP_IRQ_PRIORITY 3 | ||
| 170 | |||
| 171 | #endif /* _MCUCONF_H_ */ | ||
diff --git a/keyboards/tkc/candybar/righty/config.h b/keyboards/tkc/candybar/righty/config.h new file mode 100644 index 000000000..500453784 --- /dev/null +++ b/keyboards/tkc/candybar/righty/config.h | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert | ||
| 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 0x544B //TK | ||
| 23 | #define PRODUCT_ID 0x0002 | ||
| 24 | #define DEVICE_VER 0x0006 | ||
| 25 | #define MANUFACTURER The Key Company | ||
| 26 | #define PRODUCT Candybar | ||
| 27 | #define DESCRIPTION A compact staggered 40% keyboard with attached numpad | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 4 | ||
| 31 | #define MATRIX_COLS 17 | ||
| 32 | #define DIODE_DIRECTION COL2ROW | ||
| 33 | #define MATRIX_ROW_PINS { A8, A9, A10, A13 } | ||
| 34 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, B2, B10, B11, B12, B13, B14, B15 } | ||
| 35 | |||
| 36 | |||
| 37 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 38 | #define DEBOUNCE 5 | ||
| 39 | |||
| 40 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 41 | //#define LOCKING_SUPPORT_ENABLE | ||
| 42 | /* Locking resynchronize hack */ | ||
| 43 | //#define LOCKING_RESYNC_ENABLE | ||
| 44 | |||
| 45 | /* | ||
| 46 | * Force NKRO | ||
| 47 | * | ||
| 48 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 49 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 50 | * makefile for this to work.) | ||
| 51 | * | ||
| 52 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 53 | * until the next keyboard reset. | ||
| 54 | * | ||
| 55 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 56 | * fully operational during normal computer usage. | ||
| 57 | * | ||
| 58 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 59 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 60 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 61 | * power-up. | ||
| 62 | * | ||
| 63 | */ | ||
| 64 | //#define FORCE_NKRO | ||
| 65 | |||
| 66 | /* | ||
| 67 | * Feature disable options | ||
| 68 | * These options are also useful to firmware size reduction. | ||
| 69 | */ | ||
| 70 | |||
| 71 | /* disable debug print */ | ||
| 72 | //#define NO_DEBUG | ||
| 73 | |||
| 74 | /* disable print */ | ||
| 75 | //#define NO_PRINT | ||
| 76 | |||
| 77 | /* disable action features */ | ||
| 78 | //#define NO_ACTION_LAYER | ||
| 79 | //#define NO_ACTION_TAPPING | ||
| 80 | //#define NO_ACTION_ONESHOT | ||
| 81 | //#define NO_ACTION_MACRO | ||
| 82 | //#define NO_ACTION_FUNCTION | ||
| 83 | |||
| 84 | /* | ||
| 85 | * MIDI options | ||
| 86 | */ | ||
| 87 | |||
| 88 | /* Prevent use of disabled MIDI features in the keymap */ | ||
| 89 | //#define MIDI_ENABLE_STRICT 1 | ||
| 90 | |||
| 91 | /* enable basic MIDI features: | ||
| 92 | - MIDI notes can be sent when in Music mode is on | ||
| 93 | */ | ||
| 94 | //#define MIDI_BASIC | ||
| 95 | |||
| 96 | /* enable advanced MIDI features: | ||
| 97 | - MIDI notes can be added to the keymap | ||
| 98 | - Octave shift and transpose | ||
| 99 | - Virtual sustain, portamento, and modulation wheel | ||
| 100 | - etc. | ||
| 101 | */ | ||
| 102 | //#define MIDI_ADVANCED | ||
| 103 | |||
| 104 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
| 105 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | ||
| 106 | |||
| 107 | // #define WS2812_LED_N 2 | ||
| 108 | // #define RGBLED_NUM WS2812_LED_N | ||
| 109 | // #define WS2812_TIM_N 2 | ||
| 110 | // #define WS2812_TIM_CH 2 | ||
| 111 | // #define PORT_WS2812 GPIOA | ||
| 112 | // #define PIN_WS2812 1 | ||
| 113 | // #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) | ||
| 114 | //#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP | ||
| 115 | //#define WS2812_EXTERNAL_PULLUP | ||
diff --git a/keyboards/tkc/candybar/righty/info.json b/keyboards/tkc/candybar/righty/info.json new file mode 100644 index 000000000..81dc4f8ec --- /dev/null +++ b/keyboards/tkc/candybar/righty/info.json | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "TKC Candybar", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "terrymathews", | ||
| 5 | "width": 17, | ||
| 6 | "height": 4, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Del", "x":11, "y":0}, {"label":"BkSp", "x":12, "y":0}, {"label":"7", "x":13, "y":0}, {"label":"8", "x":14, "y":0}, {"label":"9", "x":15, "y":0}, {"label":"*", "x":16, "y":0}, | ||
| 11 | {"label":"Tab", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"Enter", "x":11.25, "y":1, "w":1.75}, {"label":"4", "x":13, "y":1}, {"label":"5", "x":14, "y":1}, {"label":"6", "x":15, "y":1}, {"label":"-", "x":16, "y":1}, | ||
| 12 | {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"Shift", "x":10.75, "y":2, "w":1.25}, {"label":"↑", "x":12, "y":2}, {"label":"1", "x":13, "y":2}, {"label":"2", "x":14, "y":2}, {"label":"3", "x":15, "y":2}, {"label":"+", "x":16, "y":2}, | ||
| 13 | {"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"GUI", "x":1.25, "y":3, "w":1.25}, {"label":"Alt", "x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":1.75}, {"x":5.5, "y":3, "w":1}, {"label":"Backspace", "x":6.5, "y":3, "w":2.25}, {"label":"Menu", "x":8.75, "y":3, "w":1.25}, {"label":"Fn", "x":10, "y":3}, {"label":"←", "x":11, "y":3}, {"label":"↓", "x":12, "y":3}, {"label":"→", "x":13, "y":3}, {"label":"0", "x":14, "y":3}, {"label":".", "x":15, "y":3}, {"label":"Enter", "x":16, "y":3}] | ||
| 14 | } | ||
| 15 | } | ||
| 16 | } | ||
diff --git a/keyboards/tkc/candybar/righty/keymaps/default/keymap.c b/keyboards/tkc/candybar/righty/keymaps/default/keymap.c new file mode 100644 index 000000000..8f4cc08c7 --- /dev/null +++ b/keyboards/tkc/candybar/righty/keymaps/default/keymap.c | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | #define _BL 0 | ||
| 20 | #define _FL 1 | ||
| 21 | |||
| 22 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 23 | /* Keymap _BL: Base Layer (Default Layer) | ||
| 24 | */ | ||
| 25 | [_BL] = LAYOUT( | ||
| 26 | KC_ESC,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_DEL,KC_BSPC,KC_P7,KC_P8,KC_P9,KC_PAST, \ | ||
| 27 | KC_TAB,KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_ENT,KC_P4,KC_P5,KC_P6,KC_PMNS, \ | ||
| 28 | KC_LSFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_RSFT,KC_UP,KC_P1,KC_P2,KC_P3,KC_PPLS, \ | ||
| 29 | KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_LEFT,KC_DOWN,KC_RGHT,KC_P0,KC_PDOT,KC_PENT), | ||
| 30 | |||
| 31 | /* Keymap _FL: Function Layer | ||
| 32 | */ | ||
| 33 | [_FL] = LAYOUT( | ||
| 34 | RESET,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_LBRC,KC_RBRC,KC_INS,KC_BSPC,KC_P7,KC_P8,KC_P9,KC_VOLU, \ | ||
| 35 | KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ | ||
| 36 | KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ | ||
| 37 | KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), | ||
| 38 | }; | ||
diff --git a/keyboards/tkc/candybar/righty/keymaps/via/keymap.c b/keyboards/tkc/candybar/righty/keymaps/via/keymap.c new file mode 100644 index 000000000..fb8ac93d4 --- /dev/null +++ b/keyboards/tkc/candybar/righty/keymaps/via/keymap.c | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | #define _BL 0 | ||
| 20 | #define _FL 1 | ||
| 21 | #define _AL 2 | ||
| 22 | #define _LL 3 | ||
| 23 | |||
| 24 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 25 | /* Keymap _BL: Base Layer (Default Layer) | ||
| 26 | */ | ||
| 27 | [_BL] = LAYOUT( | ||
| 28 | KC_ESC,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_DEL,KC_BSPC,KC_P7,KC_P8,KC_P9,KC_PAST, \ | ||
| 29 | KC_TAB,KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_ENT,KC_P4,KC_P5,KC_P6,KC_PMNS, \ | ||
| 30 | KC_LSFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_RSFT,KC_UP,KC_P1,KC_P2,KC_P3,KC_PPLS, \ | ||
| 31 | KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_LEFT,KC_DOWN,KC_RGHT,KC_P0,KC_PDOT,KC_PENT), | ||
| 32 | |||
| 33 | /* Keymap _FL: Function Layer | ||
| 34 | */ | ||
| 35 | [_FL] = LAYOUT( | ||
| 36 | RESET,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_LBRC,KC_RBRC,KC_INS,KC_BSPC,KC_P7,KC_P8,KC_P9,KC_VOLU, \ | ||
| 37 | KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ | ||
| 38 | KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ | ||
| 39 | KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), | ||
| 40 | |||
| 41 | [_AL] = LAYOUT( | ||
| 42 | RESET,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_LBRC,KC_RBRC,KC_INS,KC_BSPC,KC_P7,KC_P8,KC_P9,KC_VOLU, \ | ||
| 43 | KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ | ||
| 44 | KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ | ||
| 45 | KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), | ||
| 46 | |||
| 47 | [_LL] = LAYOUT( | ||
| 48 | RESET,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_LBRC,KC_RBRC,KC_INS,KC_BSPC,KC_P7,KC_P8,KC_P9,KC_VOLU, \ | ||
| 49 | KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ | ||
| 50 | KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ | ||
| 51 | KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), | ||
| 52 | }; | ||
diff --git a/keyboards/tkc/candybar/righty/keymaps/via/rules.mk b/keyboards/tkc/candybar/righty/keymaps/via/rules.mk new file mode 100644 index 000000000..036bd6d1c --- /dev/null +++ b/keyboards/tkc/candybar/righty/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes \ No newline at end of file | |||
diff --git a/keyboards/tkc/candybar/righty/readme.md b/keyboards/tkc/candybar/righty/readme.md new file mode 100644 index 000000000..4e2a0f847 --- /dev/null +++ b/keyboards/tkc/candybar/righty/readme.md | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # The Key Company Candybar | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | The Key Company Candybar is a staggered 40% board with a numpad utilizing the STM32F072 microcontroller. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) | ||
| 8 | * Hardware Supported: TKC Candybar | ||
| 9 | * Hardware Availability: [TheKey.Company](https://thekey.company/collections/candybar) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make tkc/candybar/righty:default:dfu-util | ||
| 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/tkc/candybar/righty/righty.c b/keyboards/tkc/candybar/righty/righty.c new file mode 100644 index 000000000..c3b611574 --- /dev/null +++ b/keyboards/tkc/candybar/righty/righty.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert | ||
| 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 | #include "righty.h" | ||
diff --git a/keyboards/tkc/candybar/righty/righty.h b/keyboards/tkc/candybar/righty/righty.h new file mode 100644 index 000000000..67e023883 --- /dev/null +++ b/keyboards/tkc/candybar/righty/righty.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* Copyright 2018 Jack Humbert | ||
| 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 | #include "quantum.h" | ||
| 19 | |||
| 20 | #define LAYOUT( \ | ||
| 21 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \ | ||
| 22 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, k1d, k1e, k1f, k1g, \ | ||
| 23 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \ | ||
| 24 | k30, k31, k32, k35, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g \ | ||
| 25 | ) { \ | ||
| 26 | { k00, k01 , k02, k03 , k04 , k05, k06 , k07, k08, k09, k0a, k0b , k0c, k0d, k0e, k0f, k0g } , \ | ||
| 27 | { k10, k11 , k12, k13 , k14 , k15, k16 , k17, k18, k19, k1a, KC_NO, k1c, k1d, k1e, k1f, k1g } , \ | ||
| 28 | { k20, KC_NO, k22, k23 , k24 , k25, k26 , k27, k28, k29, k2a, k2b , k2c, k2d, k2e, k2f, k2g } , \ | ||
| 29 | { k30, k31 , k32, KC_NO, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b , k3c, k3d, k3e, k3f, k3g } \ | ||
| 30 | } | ||
diff --git a/keyboards/tkc/candybar/righty/rules.mk b/keyboards/tkc/candybar/righty/rules.mk new file mode 100644 index 000000000..52ef91c47 --- /dev/null +++ b/keyboards/tkc/candybar/righty/rules.mk | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = STM32F072 | ||
| 3 | |||
| 4 | # Build Options | ||
| 5 | # comment out to disable the options. | ||
| 6 | # | ||
| 7 | # EXTRAFLAGS+=-flto | ||
| 8 | LINK_TIME_OPTIMIZATION_ENABLE = yes | ||
| 9 | BACKLIGHT_ENABLE = no | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) | ||
| 12 | MOUSEKEY_ENABLE = no # Mouse keys | ||
| 13 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 14 | CONSOLE_ENABLE = no # Console for debug | ||
| 15 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 18 | AUDIO_ENABLE = no | ||
| 19 | RGBLIGHT_ENABLE = no | ||
| 20 | SERIAL_LINK_ENABLE = no | ||
| 21 | |||
| 22 | |||
| 23 | # Enter lower-power sleep mode when on the ChibiOS idle thread | ||
| 24 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | ||
diff --git a/keyboards/tkc/m0lly/README.md b/keyboards/tkc/m0lly/README.md new file mode 100644 index 000000000..9af80c7e9 --- /dev/null +++ b/keyboards/tkc/m0lly/README.md | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | The Key Company M0LLY | ||
| 2 | |||
| 3 | [TKC M0LLY](https://cdn.shopify.com/s/files/1/1679/2319/files/Molly_Terminal_1024x1024.jpg?v=1529067702) | ||
| 4 | |||
| 5 | |||
| 6 | The Key Company's M0LLY keyboard is inspired by the Apple Macintosh M0110A, and utilizes the AT90USB1286 microcontroller. | ||
| 7 | |||
| 8 | Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) | ||
| 9 | Hardware Supported: TKC M0LLY | ||
| 10 | Hardware Availability: [TheKey.Company](https://thekey.company) | ||
| 11 | |||
| 12 | |||
| 13 | Make example for this keyboard (after setting up your build environment): | ||
| 14 | |||
| 15 | make tkc/m0lly:default | ||
| 16 | |||
| 17 | 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/tkc/m0lly/config.h b/keyboards/tkc/m0lly/config.h new file mode 100644 index 000000000..29bd8411e --- /dev/null +++ b/keyboards/tkc/m0lly/config.h | |||
| @@ -0,0 +1,183 @@ | |||
| 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 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0x544B // "TK" | ||
| 24 | #define PRODUCT_ID 0x0004 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER The Key Company | ||
| 27 | #define PRODUCT M0lly | ||
| 28 | #define DESCRIPTION QMK keyboard firmware for M0lly | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 5 | ||
| 32 | #define MATRIX_COLS 19 | ||
| 33 | |||
| 34 | // ROWS: Top to bottom, COLS: Left to right | ||
| 35 | /* Row pin configuration | ||
| 36 | */ | ||
| 37 | #define MATRIX_ROW_PINS { F2, F1, F0, E1, E0 } | ||
| 38 | /* Column pin configuration | ||
| 39 | */ | ||
| 40 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, F5, F6, F7 } | ||
| 41 | #define UNUSED_PINS | ||
| 42 | |||
| 43 | /* COL2ROW or ROW2COL */ | ||
| 44 | #define DIODE_DIRECTION COL2ROW | ||
| 45 | |||
| 46 | #define BACKLIGHT_PIN B6 | ||
| 47 | #define BACKLIGHT_BREATHING | ||
| 48 | #define BACKLIGHT_LEVELS 3 | ||
| 49 | |||
| 50 | /* Underlight configuration | ||
| 51 | */ | ||
| 52 | #define RGB_DI_PIN D7 | ||
| 53 | #define RGBLIGHT_ANIMATIONS | ||
| 54 | #define RGBLED_NUM 30 // Number of LEDs | ||
| 55 | #define RGBLIGHT_HUE_STEP 5 | ||
| 56 | #define RGBLIGHT_SAT_STEP 10 | ||
| 57 | #define RGBLIGHT_VAL_STEP 10 | ||
| 58 | |||
| 59 | /* define if matrix has ghost */ | ||
| 60 | //#define MATRIX_HAS_GHOST | ||
| 61 | |||
| 62 | /* Set 0 if debouncing isn't needed */ | ||
| 63 | #define DEBOUNCE 5 | ||
| 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 | #define QMK_ESC_OUTPUT A0 // usually COL | ||
| 71 | #define QMK_ESC_INPUT F4 // usually ROW | ||
| 72 | #define QMK_LED D2 // NumLock on M0lly | ||
| 73 | //#define QMK_SPEAKER C6 | ||
| 74 | |||
| 75 | /* | ||
| 76 | * Force NKRO | ||
| 77 | * | ||
| 78 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 79 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 80 | * makefile for this to work.) | ||
| 81 | * | ||
| 82 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 83 | * until the next keyboard reset. | ||
| 84 | * | ||
| 85 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 86 | * fully operational during normal computer usage. | ||
| 87 | * | ||
| 88 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 89 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 90 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 91 | * power-up. | ||
| 92 | * | ||
| 93 | */ | ||
| 94 | //#define FORCE_NKRO | ||
| 95 | |||
| 96 | /* | ||
| 97 | * Magic Key Options | ||
| 98 | * | ||
| 99 | * Magic keys are hotkey commands that allow control over firmware functions of | ||
| 100 | * the keyboard. They are best used in combination with the HID Listen program, | ||
| 101 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
| 102 | * | ||
| 103 | * The options below allow the magic key functionality to be changed. This is | ||
| 104 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
| 105 | * | ||
| 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 | /* | ||
| 163 | * MIDI options | ||
| 164 | */ | ||
| 165 | |||
| 166 | /* Prevent use of disabled MIDI features in the keymap */ | ||
| 167 | //#define MIDI_ENABLE_STRICT 1 | ||
| 168 | |||
| 169 | /* enable basic MIDI features: | ||
| 170 | - MIDI notes can be sent when in Music mode is on | ||
| 171 | */ | ||
| 172 | //#define MIDI_BASIC | ||
| 173 | |||
| 174 | /* enable advanced MIDI features: | ||
| 175 | - MIDI notes can be added to the keymap | ||
| 176 | - Octave shift and transpose | ||
| 177 | - Virtual sustain, portamento, and modulation wheel | ||
| 178 | - etc. | ||
| 179 | */ | ||
| 180 | //#define MIDI_ADVANCED | ||
| 181 | |||
| 182 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
| 183 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | ||
diff --git a/keyboards/tkc/m0lly/info.json b/keyboards/tkc/m0lly/info.json new file mode 100644 index 000000000..f2ac456b1 --- /dev/null +++ b/keyboards/tkc/m0lly/info.json | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "TKC M0LLY", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "qmk", | ||
| 5 | "width": 19.5, | ||
| 6 | "height": 5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_all": { | ||
| 9 | "layout": [ | ||
| 10 | {"label":"~", "x":0, "y":0}, | ||
| 11 | {"label":"!", "x":1, "y":0}, | ||
| 12 | {"label":"@", "x":2, "y":0}, | ||
| 13 | {"label":"#", "x":3, "y":0}, | ||
| 14 | {"label":"$", "x":4, "y":0}, | ||
| 15 | {"label":"%", "x":5, "y":0}, | ||
| 16 | {"label":"^", "x":6, "y":0}, | ||
| 17 | {"label":"&", "x":7, "y":0}, | ||
| 18 | {"label":"*", "x":8, "y":0}, | ||
| 19 | {"label":"(", "x":9, "y":0}, | ||
| 20 | {"label":")", "x":10, "y":0}, | ||
| 21 | {"label":"_", "x":11, "y":0}, | ||
| 22 | {"label":"+", "x":12, "y":0}, | ||
| 23 | {"label":"Bksp", "x":13, "y":0}, | ||
| 24 | {"x":14, "y":0}, | ||
| 25 | {"label":"Num", "x":15.5, "y":0}, | ||
| 26 | {"label":"/", "x":16.5, "y":0}, | ||
| 27 | {"label":"*", "x":17.5, "y":0}, | ||
| 28 | {"label":"-", "x":18.5, "y":0}, | ||
| 29 | {"label":"Tab", "x":0, "y":1, "w":1.5}, | ||
| 30 | {"label":"Q", "x":1.5, "y":1}, | ||
| 31 | {"label":"W", "x":2.5, "y":1}, | ||
| 32 | {"label":"E", "x":3.5, "y":1}, | ||
| 33 | {"label":"R", "x":4.5, "y":1}, | ||
| 34 | {"label":"T", "x":5.5, "y":1}, | ||
| 35 | {"label":"Y", "x":6.5, "y":1}, | ||
| 36 | {"label":"U", "x":7.5, "y":1}, | ||
| 37 | {"label":"I", "x":8.5, "y":1}, | ||
| 38 | {"label":"O", "x":9.5, "y":1}, | ||
| 39 | {"label":"P", "x":10.5, "y":1}, | ||
| 40 | {"label":"{", "x":11.5, "y":1}, | ||
| 41 | {"label":"}", "x":12.5, "y":1}, | ||
| 42 | {"label":"|", "x":13.5, "y":1, "w":1.5}, | ||
| 43 | {"label":"7", "x":15.5, "y":1}, | ||
| 44 | {"label":"8", "x":16.5, "y":1}, | ||
| 45 | {"label":"9", "x":17.5, "y":1}, | ||
| 46 | {"x":18.5, "y":1}, | ||
| 47 | {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, | ||
| 48 | {"label":"A", "x":1.75, "y":2}, | ||
| 49 | {"label":"S", "x":2.75, "y":2}, | ||
| 50 | {"label":"D", "x":3.75, "y":2}, | ||
| 51 | {"label":"F", "x":4.75, "y":2}, | ||
| 52 | {"label":"G", "x":5.75, "y":2}, | ||
| 53 | {"label":"H", "x":6.75, "y":2}, | ||
| 54 | {"label":"J", "x":7.75, "y":2}, | ||
| 55 | {"label":"K", "x":8.75, "y":2}, | ||
| 56 | {"label":"L", "x":9.75, "y":2}, | ||
| 57 | {"label":":", "x":10.75, "y":2}, | ||
| 58 | {"label":"\"", "x":11.75, "y":2}, | ||
| 59 | {"label":"ISO ~", "x":12.75, "y":2}, | ||
| 60 | {"label":"Enter", "x":13.75, "y":2, "w":1.25}, | ||
| 61 | {"label":"4", "x":15.5, "y":2}, | ||
| 62 | {"label":"5", "x":16.5, "y":2}, | ||
| 63 | {"label":"6", "x":17.5, "y":2}, | ||
| 64 | {"label":"+", "x":18.5, "y":2}, | ||
| 65 | {"label":"Shift", "x":0, "y":3, "w":1.25}, | ||
| 66 | {"x":1.25, "y":3}, | ||
| 67 | {"label":"Z", "x":2.25, "y":3}, | ||
| 68 | {"label":"X", "x":3.25, "y":3}, | ||
| 69 | {"label":"C", "x":4.25, "y":3}, | ||
| 70 | {"label":"V", "x":5.25, "y":3}, | ||
| 71 | {"label":"B", "x":6.25, "y":3}, | ||
| 72 | {"label":"N", "x":7.25, "y":3}, | ||
| 73 | {"label":"M", "x":8.25, "y":3}, | ||
| 74 | {"label":"<", "x":9.25, "y":3}, | ||
| 75 | {"label":">", "x":10.25, "y":3}, | ||
| 76 | {"label":"?", "x":11.25, "y":3}, | ||
| 77 | {"label":"Shift", "x":12.25, "y":3, "w":1.75}, | ||
| 78 | {"x":14, "y":3}, | ||
| 79 | {"label":"1", "x":15.5, "y":3}, | ||
| 80 | {"label":"2", "x":16.5, "y":3}, | ||
| 81 | {"label":"3", "x":17.5, "y":3}, | ||
| 82 | {"x":18.5, "y":3}, | ||
| 83 | {"label":"Ctrl", "x":0, "y":4, "w":1.25}, | ||
| 84 | {"label":"Win", "x":1.25, "y":4, "w":1.25}, | ||
| 85 | {"label":"Alt", "x":2.5, "y":4, "w":1.25}, | ||
| 86 | {"x":3.75, "y":4, "w":6.25}, | ||
| 87 | {"label":"Alt", "x":10, "y":4, "w":1.25}, | ||
| 88 | {"label":"Win", "x":11.25, "y":4, "w":1.25}, | ||
| 89 | {"label":"FN", "x":12.5, "y":4, "w":1.25}, | ||
| 90 | {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, | ||
| 91 | {"label":"0", "x":15.5, "y":4}, | ||
| 92 | {"x":16.5, "y":4}, | ||
| 93 | {"label":".", "x":17.5, "y":4}, | ||
| 94 | {"label":"Ent", "x":18.5, "y":4}] | ||
| 95 | } | ||
| 96 | } | ||
| 97 | } | ||
diff --git a/keyboards/tkc/m0lly/keymaps/default/keymap.c b/keyboards/tkc/m0lly/keymaps/default/keymap.c new file mode 100644 index 000000000..27e83cd21 --- /dev/null +++ b/keyboards/tkc/m0lly/keymaps/default/keymap.c | |||
| @@ -0,0 +1,94 @@ | |||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | //Layers | ||
| 20 | |||
| 21 | enum { | ||
| 22 | BASE = 0, | ||
| 23 | FUNCTION, | ||
| 24 | }; | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | /* Keymap BASE: (Base Layer) Default Layer | ||
| 28 | * | ||
| 29 | * ,-----------------------------------------------------------. .-------------------. | ||
| 30 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * | - | | ||
| 31 | * |-----------------------------------------------------------| |-------------------| | ||
| 32 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | | | ||
| 33 | * |-----------------------------------------------------------| |--------------| + | | ||
| 34 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | | | ||
| 35 | * |-----------------------------------------------------------| |-------------------| | ||
| 36 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 1 | 2 | 3 | Ent| | ||
| 37 | * |-----------------------------------------------------------| |--------------| | | ||
| 38 | * |Ctrl|Gui |Alt | Space | Alt | Win |FN |Ctr | | 0 | . | | | ||
| 39 | * `-----------------------------------------------------------' '-------------------' | ||
| 40 | */ | ||
| 41 | [BASE] = LAYOUT_all( | ||
| 42 | KC_GRV, 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, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ | ||
| 43 | 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, XXXXXXX, \ | ||
| 44 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 45 | KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, \ | ||
| 46 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, MO(FUNCTION), KC_RCTL, KC_P0, XXXXXXX, KC_PDOT, KC_PENT \ | ||
| 47 | ), | ||
| 48 | /* Keymap FUNCTION: (Function Layer) | ||
| 49 | * | ||
| 50 | * ,-----------------------------------------------------------. .-------------------. | ||
| 51 | * | | | | | | | | | | | | | | RESET | | | | | | | ||
| 52 | * |-----------------------------------------------------------| |-------------------| | ||
| 53 | * | | | | | | | | | | | | | | | | | | | | | ||
| 54 | * |-----------------------------------------------------------| |-------------------| | ||
| 55 | * | | | | | | | | | | | | | | | | | | | | ||
| 56 | * |-----------------------------------------------------------| |-------------------| | ||
| 57 | * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | | ||
| 58 | * |-----------------------------------------------------------| |--------------| | | ||
| 59 | * | | | | | | | | | | | | | | ||
| 60 | * `-----------------------------------------------------------' '-------------------' | ||
| 61 | */ | ||
| 62 | [FUNCTION] = LAYOUT_all( | ||
| 63 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 64 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 65 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 66 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, \ | ||
| 67 | _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ \ | ||
| 68 | ), | ||
| 69 | }; | ||
| 70 | |||
| 71 | #ifdef OLED_DRIVER_ENABLE | ||
| 72 | void oled_task_user(void) { | ||
| 73 | oled_write_P(PSTR("M0lly\n"),false); | ||
| 74 | // Host Keyboard Layer Status | ||
| 75 | oled_write_P(PSTR("Layer: "), false); | ||
| 76 | |||
| 77 | switch (get_highest_layer(layer_state)) { | ||
| 78 | case BASE: | ||
| 79 | oled_write_P(PSTR("Base\n"), false); | ||
| 80 | break; | ||
| 81 | case FUNCTION: | ||
| 82 | oled_write_P(PSTR("Function\n"), false); | ||
| 83 | break; | ||
| 84 | default: | ||
| 85 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 86 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 87 | } | ||
| 88 | // Host Keyboard LED Status | ||
| 89 | led_t led_state = host_keyboard_led_state(); | ||
| 90 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 91 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 92 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 93 | } | ||
| 94 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc/m0lly/keymaps/via/keymap.c b/keyboards/tkc/m0lly/keymaps/via/keymap.c new file mode 100644 index 000000000..b72b8f035 --- /dev/null +++ b/keyboards/tkc/m0lly/keymaps/via/keymap.c | |||
| @@ -0,0 +1,116 @@ | |||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | //Layers | ||
| 20 | |||
| 21 | enum { | ||
| 22 | BASE = 0, | ||
| 23 | FUNCTION, | ||
| 24 | ALTERNATE, | ||
| 25 | LAST, | ||
| 26 | }; | ||
| 27 | |||
| 28 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 29 | /* Keymap BASE: (Base Layer) Default Layer | ||
| 30 | * | ||
| 31 | * ,-----------------------------------------------------------. .-------------------. | ||
| 32 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * | - | | ||
| 33 | * |-----------------------------------------------------------| |-------------------| | ||
| 34 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | | | ||
| 35 | * |-----------------------------------------------------------| |--------------| + | | ||
| 36 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | | | ||
| 37 | * |-----------------------------------------------------------| |-------------------| | ||
| 38 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 1 | 2 | 3 | Ent| | ||
| 39 | * |-----------------------------------------------------------| |--------------| | | ||
| 40 | * |Ctrl|Gui |Alt | Space | Alt | Win |FN |Ctr | | 0 | . | | | ||
| 41 | * `-----------------------------------------------------------' '-------------------' | ||
| 42 | */ | ||
| 43 | [BASE] = LAYOUT_all( | ||
| 44 | KC_GRV, 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, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 45 | 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, XXXXXXX, | ||
| 46 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 47 | KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, | ||
| 48 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, MO(FUNCTION), KC_RCTL, KC_P0, XXXXXXX, KC_PDOT, KC_PENT | ||
| 49 | ), | ||
| 50 | /* Keymap FUNCTION: (Function Layer) | ||
| 51 | * | ||
| 52 | * ,-----------------------------------------------------------. .-------------------. | ||
| 53 | * | | | | | | | | | | | | | | RESET | | | | | | | ||
| 54 | * |-----------------------------------------------------------| |-------------------| | ||
| 55 | * | | | | | | | | | | | | | | | | | | | | | ||
| 56 | * |-----------------------------------------------------------| |-------------------| | ||
| 57 | * | | | | | | | | | | | | | | | | | | | | ||
| 58 | * |-----------------------------------------------------------| |-------------------| | ||
| 59 | * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | | ||
| 60 | * |-----------------------------------------------------------| |--------------| | | ||
| 61 | * | | | | | | | | | | | | | | ||
| 62 | * `-----------------------------------------------------------' '-------------------' | ||
| 63 | */ | ||
| 64 | [FUNCTION] = LAYOUT_all( | ||
| 65 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, | ||
| 66 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, | ||
| 67 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, | ||
| 68 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, | ||
| 69 | _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ | ||
| 70 | ), | ||
| 71 | [ALTERNATE] = LAYOUT_all( | ||
| 72 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, | ||
| 73 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, | ||
| 74 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, | ||
| 75 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, | ||
| 76 | _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ | ||
| 77 | ), | ||
| 78 | [LAST] = LAYOUT_all( | ||
| 79 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, | ||
| 80 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, | ||
| 81 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, | ||
| 82 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, | ||
| 83 | _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ | ||
| 84 | ), | ||
| 85 | }; | ||
| 86 | |||
| 87 | #ifdef OLED_DRIVER_ENABLE | ||
| 88 | void oled_task_user(void) { | ||
| 89 | oled_write_P(PSTR("M0lly\n"),false); | ||
| 90 | // Host Keyboard Layer Status | ||
| 91 | oled_write_P(PSTR("Layer: "), false); | ||
| 92 | |||
| 93 | switch (get_highest_layer(layer_state)) { | ||
| 94 | case BASE: | ||
| 95 | oled_write_P(PSTR("Base\n"), false); | ||
| 96 | break; | ||
| 97 | case FUNCTION: | ||
| 98 | oled_write_P(PSTR("Function\n"), false); | ||
| 99 | break; | ||
| 100 | case ALTERNATE: | ||
| 101 | oled_write_P(PSTR("Alternate\n"), false); | ||
| 102 | break; | ||
| 103 | case LAST: | ||
| 104 | oled_write_P(PSTR("Last\n"), false); | ||
| 105 | break; | ||
| 106 | default: | ||
| 107 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 108 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 109 | } | ||
| 110 | // Host Keyboard LED Status | ||
| 111 | led_t led_state = host_keyboard_led_state(); | ||
| 112 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 113 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 114 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 115 | } | ||
| 116 | #endif | ||
diff --git a/keyboards/tkc/m0lly/keymaps/via/rules.mk b/keyboards/tkc/m0lly/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/tkc/m0lly/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes | |||
diff --git a/keyboards/tkc/m0lly/m0lly.c b/keyboards/tkc/m0lly/m0lly.c new file mode 100644 index 000000000..e47f9531e --- /dev/null +++ b/keyboards/tkc/m0lly/m0lly.c | |||
| @@ -0,0 +1,76 @@ | |||
| 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 "m0lly.h" | ||
| 17 | #include "led.h" | ||
| 18 | |||
| 19 | void keyboard_pre_init_kb(void) { | ||
| 20 | setPinInputHigh(D0); | ||
| 21 | setPinInputHigh(D1); | ||
| 22 | |||
| 23 | keyboard_pre_init_user(); | ||
| 24 | } | ||
| 25 | |||
| 26 | void matrix_init_kb(void) { | ||
| 27 | // put your keyboard start-up code here | ||
| 28 | // runs once when the firmware starts up | ||
| 29 | led_init_ports(); | ||
| 30 | matrix_init_user(); | ||
| 31 | } | ||
| 32 | |||
| 33 | void matrix_scan_kb(void) { | ||
| 34 | // put your looping keyboard code here | ||
| 35 | // runs every cycle (a lot) | ||
| 36 | |||
| 37 | matrix_scan_user(); | ||
| 38 | } | ||
| 39 | |||
| 40 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 41 | // put your per-action keyboard code here | ||
| 42 | // runs for every action, just before processing by the firmware | ||
| 43 | |||
| 44 | return process_record_user(keycode, record); | ||
| 45 | } | ||
| 46 | |||
| 47 | void led_init_ports(void) { | ||
| 48 | DDRD |= (1<<2) | (1<<3) | (1<<4); // OUT | ||
| 49 | DDRB |= (1<<7); // OUT | ||
| 50 | PORTB |= (1<<7); | ||
| 51 | } | ||
| 52 | |||
| 53 | void led_set_kb(uint8_t usb_led) { | ||
| 54 | // led_set_user(usb_led); | ||
| 55 | if (usb_led & (1<<USB_LED_NUM_LOCK)) { | ||
| 56 | // Turn numlock on | ||
| 57 | PORTD |= (1<<2); | ||
| 58 | } else { | ||
| 59 | // Turn numlock off | ||
| 60 | PORTD &= ~(1<<2); | ||
| 61 | } | ||
| 62 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
| 63 | // Turn capslock on | ||
| 64 | PORTD |= (1<<3); | ||
| 65 | } else { | ||
| 66 | // Turn capslock off | ||
| 67 | PORTD &= ~(1<<3); | ||
| 68 | } | ||
| 69 | if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { | ||
| 70 | // Turn scrolllock on | ||
| 71 | PORTD |= (1<<4); | ||
| 72 | } else { | ||
| 73 | // Turn scrolllock off | ||
| 74 | PORTD &= ~(1<<4); | ||
| 75 | } | ||
| 76 | } \ No newline at end of file | ||
diff --git a/keyboards/tkc/m0lly/m0lly.h b/keyboards/tkc/m0lly/m0lly.h new file mode 100644 index 000000000..0c62876ef --- /dev/null +++ b/keyboards/tkc/m0lly/m0lly.h | |||
| @@ -0,0 +1,32 @@ | |||
| 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 | #pragma once | ||
| 17 | |||
| 18 | #include "quantum.h" | ||
| 19 | |||
| 20 | #define LAYOUT_all( \ | ||
| 21 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, \ | ||
| 22 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, K1I, \ | ||
| 23 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, K2I, \ | ||
| 24 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, K3H, K3I, \ | ||
| 25 | K40, K41, K42, K45, K49, K4B, K4C, K4D, K4F, K4G, K4H, K4I \ | ||
| 26 | ) { \ | ||
| 27 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I }, \ | ||
| 28 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1F, K1G, K1H, K1I }, \ | ||
| 29 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F, K2G, K2H, K2I }, \ | ||
| 30 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \ | ||
| 31 | { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, KC_NO, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I } \ | ||
| 32 | } | ||
diff --git a/keyboards/tkc/m0lly/rules.mk b/keyboards/tkc/m0lly/rules.mk new file mode 100644 index 000000000..05e629075 --- /dev/null +++ b/keyboards/tkc/m0lly/rules.mk | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = at90usb1286 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | # Teensy halfkay | ||
| 6 | # Pro Micro caterina | ||
| 7 | # Atmel DFU atmel-dfu | ||
| 8 | # LUFA DFU lufa-dfu | ||
| 9 | # QMK DFU qmk-dfu | ||
| 10 | # ATmega32A bootloadHID | ||
| 11 | # ATmega328P USBasp | ||
| 12 | BOOTLOADER = qmk-dfu | ||
| 13 | |||
| 14 | # Build Options | ||
| 15 | # change yes to no to disable | ||
| 16 | # | ||
| 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 18 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 19 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 20 | CONSOLE_ENABLE = yes # Console for debug | ||
| 21 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 22 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 23 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 24 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 25 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 26 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default | ||
| 27 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 28 | MIDI_ENABLE = no # MIDI controls | ||
| 29 | UNICODE_ENABLE = no # Unicode | ||
| 30 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 31 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 32 | OLED_DRIVER_ENABLE = yes \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/README.md b/keyboards/tkc/tkc1800/README.md new file mode 100644 index 000000000..5382b91b3 --- /dev/null +++ b/keyboards/tkc/tkc1800/README.md | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | The Key Company TKC1800 | ||
| 2 | |||
| 3 | [TKC1800 Image Gallery](https://imgur.com/a/Xlttp) | ||
| 4 | |||
| 5 | |||
| 6 | The Key Company TKC1800 is a Cherry 1800 form factor replacement PCB utilizing the AT90USB1286 microcontroller. | ||
| 7 | |||
| 8 | Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) | ||
| 9 | Hardware Supported: TKC1800 PCB | ||
| 10 | Hardware Availability: [TheKey.Company](https://thekey.company/collections/tkc-1800) | ||
| 11 | |||
| 12 | |||
| 13 | Make example for this keyboard (after setting up your build environment): | ||
| 14 | |||
| 15 | make tkc/tkc1800:default | ||
| 16 | |||
| 17 | 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/tkc/tkc1800/config.h b/keyboards/tkc/tkc1800/config.h new file mode 100644 index 000000000..9c35699c9 --- /dev/null +++ b/keyboards/tkc/tkc1800/config.h | |||
| @@ -0,0 +1,183 @@ | |||
| 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 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0x544B // "TK" | ||
| 24 | #define PRODUCT_ID 0x0001 | ||
| 25 | #define DEVICE_VER 0x0003 | ||
| 26 | #define MANUFACTURER The Key Company | ||
| 27 | #define PRODUCT TKC1800 | ||
| 28 | #define DESCRIPTION QMK keyboard firmware for TKC1800 | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 7 | ||
| 32 | #define MATRIX_COLS 19 | ||
| 33 | |||
| 34 | // ROWS: Top to bottom, COLS: Left to right | ||
| 35 | /* Row pin configuration | ||
| 36 | */ | ||
| 37 | #define MATRIX_ROW_PINS { F4, F3, F2, F1, F0, E1, E0 } | ||
| 38 | /* Column pin configuration | ||
| 39 | */ | ||
| 40 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, F5, F6, F7 } | ||
| 41 | #define UNUSED_PINS | ||
| 42 | |||
| 43 | /* COL2ROW or ROW2COL */ | ||
| 44 | #define DIODE_DIRECTION COL2ROW | ||
| 45 | |||
| 46 | #define BACKLIGHT_PIN B6 | ||
| 47 | #define BACKLIGHT_BREATHING | ||
| 48 | #define BACKLIGHT_LEVELS 3 | ||
| 49 | |||
| 50 | /* Underlight configuration | ||
| 51 | */ | ||
| 52 | #define RGB_DI_PIN D7 | ||
| 53 | #define RGBLIGHT_ANIMATIONS | ||
| 54 | #define RGBLED_NUM 30 // Number of LEDs | ||
| 55 | #define RGBLIGHT_HUE_STEP 5 | ||
| 56 | #define RGBLIGHT_SAT_STEP 10 | ||
| 57 | #define RGBLIGHT_VAL_STEP 10 | ||
| 58 | |||
| 59 | /* define if matrix has ghost */ | ||
| 60 | //#define MATRIX_HAS_GHOST | ||
| 61 | |||
| 62 | /* Set 0 if debouncing isn't needed */ | ||
| 63 | #define DEBOUNCE 5 | ||
| 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 | #define QMK_ESC_OUTPUT A0 // usually COL | ||
| 71 | #define QMK_ESC_INPUT F4 // usually ROW | ||
| 72 | #define QMK_LED D2 // NumLock on TKC1800 | ||
| 73 | //#define QMK_SPEAKER C6 | ||
| 74 | |||
| 75 | /* | ||
| 76 | * Force NKRO | ||
| 77 | * | ||
| 78 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 79 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 80 | * makefile for this to work.) | ||
| 81 | * | ||
| 82 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 83 | * until the next keyboard reset. | ||
| 84 | * | ||
| 85 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 86 | * fully operational during normal computer usage. | ||
| 87 | * | ||
| 88 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 89 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 90 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 91 | * power-up. | ||
| 92 | * | ||
| 93 | */ | ||
| 94 | //#define FORCE_NKRO | ||
| 95 | |||
| 96 | /* | ||
| 97 | * Magic Key Options | ||
| 98 | * | ||
| 99 | * Magic keys are hotkey commands that allow control over firmware functions of | ||
| 100 | * the keyboard. They are best used in combination with the HID Listen program, | ||
| 101 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
| 102 | * | ||
| 103 | * The options below allow the magic key functionality to be changed. This is | ||
| 104 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
| 105 | * | ||
| 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 | /* | ||
| 163 | * MIDI options | ||
| 164 | */ | ||
| 165 | |||
| 166 | /* Prevent use of disabled MIDI features in the keymap */ | ||
| 167 | //#define MIDI_ENABLE_STRICT 1 | ||
| 168 | |||
| 169 | /* enable basic MIDI features: | ||
| 170 | - MIDI notes can be sent when in Music mode is on | ||
| 171 | */ | ||
| 172 | //#define MIDI_BASIC | ||
| 173 | |||
| 174 | /* enable advanced MIDI features: | ||
| 175 | - MIDI notes can be added to the keymap | ||
| 176 | - Octave shift and transpose | ||
| 177 | - Virtual sustain, portamento, and modulation wheel | ||
| 178 | - etc. | ||
| 179 | */ | ||
| 180 | //#define MIDI_ADVANCED | ||
| 181 | |||
| 182 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
| 183 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | ||
diff --git a/keyboards/tkc/tkc1800/info.json b/keyboards/tkc/tkc1800/info.json new file mode 100644 index 000000000..3e3ab1484 --- /dev/null +++ b/keyboards/tkc/tkc1800/info.json | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "TKC1800", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "qmk", | ||
| 5 | "width": 19.5, | ||
| 6 | "height": 7.25, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "key_count": 107, | ||
| 10 | "layout": [ | ||
| 11 | { "label": "Esc", "x": 0, "y": 0 }, | ||
| 12 | { "label": "F1", "x": 1.25, "y": 0 }, | ||
| 13 | { "label": "F2", "x": 2.25, "y": 0 }, | ||
| 14 | { "label": "F3", "x": 3.25, "y": 0 }, | ||
| 15 | { "label": "F4", "x": 4.25, "y": 0 }, | ||
| 16 | { "label": "F5", "x": 5.5, "y": 0 }, | ||
| 17 | { "label": "F6", "x": 6.5, "y": 0 }, | ||
| 18 | { "label": "F7", "x": 7.5, "y": 0 }, | ||
| 19 | { "label": "F8", "x": 8.5, "y": 0 }, | ||
| 20 | { "label": "F9", "x": 9.75, "y": 0 }, | ||
| 21 | { "label": "F10", "x": 10.75, "y": 0 }, | ||
| 22 | { "label": "F11", "x": 11.75, "y": 0 }, | ||
| 23 | { "label": "F12", "x": 12.75, "y": 0 }, | ||
| 24 | { "label": "Insert", "x": 15.5, "y": 0 }, | ||
| 25 | { "label": "Home", "x": 16.5, "y": 0 }, | ||
| 26 | { "label": "Page Up", "x": 17.5, "y": 0 }, | ||
| 27 | { "label": "Print Screen", "x": 18.5, "y": 0 }, | ||
| 28 | { "label": "Delete", "x": 15.5, "y": 1 }, | ||
| 29 | { "label": "End", "x": 16.5, "y": 1 }, | ||
| 30 | { "label": "Page Down", "x": 17.5, "y": 1 }, | ||
| 31 | { "label": "Scroll Lock", "x": 18.5, "y": 1 }, | ||
| 32 | { "label": "`", "x": 0, "y": 2 }, | ||
| 33 | { "label": "1", "x": 1, "y": 2 }, | ||
| 34 | { "label": "2", "x": 2, "y": 2 }, | ||
| 35 | { "label": "3", "x": 3, "y": 2 }, | ||
| 36 | { "label": "4", "x": 4, "y": 2 }, | ||
| 37 | { "label": "5", "x": 5, "y": 2 }, | ||
| 38 | { "label": "6", "x": 6, "y": 2 }, | ||
| 39 | { "label": "7", "x": 7, "y": 2 }, | ||
| 40 | { "label": "8", "x": 8, "y": 2 }, | ||
| 41 | { "label": "9", "x": 9, "y": 2 }, | ||
| 42 | { "label": "0", "x": 10, "y": 2 }, | ||
| 43 | { "label": "-", "x": 11, "y": 2 }, | ||
| 44 | { "label": "=", "x": 12, "y": 2 }, | ||
| 45 | { "label": "Backspace", "x": 13, "y": 2 }, | ||
| 46 | { "label": "Backspace_Right", "x": 14, "y": 2 }, | ||
| 47 | { "label": "Num Lock", "x": 15.5, "y": 2 }, | ||
| 48 | { "label": "/", "x": 16.5, "y": 2 }, | ||
| 49 | { "label": "*", "x": 17.5, "y": 2 }, | ||
| 50 | { "label": "Pause", "x": 18.5, "y": 2 }, | ||
| 51 | { "label": "Tab", "x": 0, "y": 3, "w": 1.5 }, | ||
| 52 | { "label": "Q", "x": 1.5, "y": 3 }, | ||
| 53 | { "label": "W", "x": 2.5, "y": 3 }, | ||
| 54 | { "label": "E", "x": 3.5, "y": 3 }, | ||
| 55 | { "label": "R", "x": 4.5, "y": 3 }, | ||
| 56 | { "label": "T", "x": 5.5, "y": 3 }, | ||
| 57 | { "label": "Y", "x": 6.5, "y": 3 }, | ||
| 58 | { "label": "U", "x": 7.5, "y": 3 }, | ||
| 59 | { "label": "I", "x": 8.5, "y": 3 }, | ||
| 60 | { "label": "O", "x": 9.5, "y": 3 }, | ||
| 61 | { "label": "P", "x": 10.5, "y": 3 }, | ||
| 62 | { "label": "[", "x": 11.5, "y": 3 }, | ||
| 63 | { "label": "]", "x": 12.5, "y": 3 }, | ||
| 64 | { "label": "\\", "x": 13.5, "y": 3, "w": 1.5 }, | ||
| 65 | { "label": "7", "x": 15.5, "y": 3 }, | ||
| 66 | { "label": "8", "x": 16.5, "y": 3 }, | ||
| 67 | { "label": "9", "x": 17.5, "y": 3 }, | ||
| 68 | { "label": "-", "x": 18.5, "y": 3 }, | ||
| 69 | { "label": "Caps Lock", "x": 0, "y": 4, "w": 1.75 }, | ||
| 70 | { "label": "A", "x": 1.75, "y": 4 }, | ||
| 71 | { "label": "S", "x": 2.75, "y": 4 }, | ||
| 72 | { "label": "D", "x": 3.75, "y": 4 }, | ||
| 73 | { "label": "F", "x": 4.75, "y": 4 }, | ||
| 74 | { "label": "G", "x": 5.75, "y": 4 }, | ||
| 75 | { "label": "H", "x": 6.75, "y": 4 }, | ||
| 76 | { "label": "J", "x": 7.75, "y": 4 }, | ||
| 77 | { "label": "K", "x": 8.75, "y": 4 }, | ||
| 78 | { "label": "L", "x": 9.75, "y": 4 }, | ||
| 79 | { "label": ";", "x": 10.75, "y": 4 }, | ||
| 80 | { "label": "'", "x": 11.75, "y": 4 }, | ||
| 81 | { "label": "ISO Hash", "x": 12.75, "y": 4 }, | ||
| 82 | { "label": "Enter", "x": 13.75, "y": 4, "w": 1.25 }, | ||
| 83 | { "label": "4", "x": 15.5, "y": 4 }, | ||
| 84 | { "label": "5", "x": 16.5, "y": 4 }, | ||
| 85 | { "label": "6", "x": 17.5, "y": 4 }, | ||
| 86 | { "label": "+", "x": 18.5, "y": 4 }, | ||
| 87 | { "label": "Shift", "x": 0, "y": 5, "w": 1.25 }, | ||
| 88 | { "label": "ISO Backslash", "x": 1.25, "y": 5 }, | ||
| 89 | { "label": "Z", "x": 2.25, "y": 5 }, | ||
| 90 | { "label": "X", "x": 3.25, "y": 5 }, | ||
| 91 | { "label": "C", "x": 4.25, "y": 5 }, | ||
| 92 | { "label": "V", "x": 5.25, "y": 5 }, | ||
| 93 | { "label": "B", "x": 6.25, "y": 5 }, | ||
| 94 | { "label": "N", "x": 7.25, "y": 5 }, | ||
| 95 | { "label": "M", "x": 8.25, "y": 5 }, | ||
| 96 | { "label": ",", "x": 9.25, "y": 5 }, | ||
| 97 | { "label": ".", "x": 10.25, "y": 5 }, | ||
| 98 | { "label": "/", "x": 11.25, "y": 5 }, | ||
| 99 | { "label": "Shift", "x": 12.25, "y": 5, "w": 1.75 }, | ||
| 100 | { "label": "Up", "x": 14.25, "y": 5.25 }, | ||
| 101 | { "label": "1", "x": 15.5, "y": 5 }, | ||
| 102 | { "label": "2", "x": 16.5, "y": 5 }, | ||
| 103 | { "label": "3", "x": 17.5, "y": 5 }, | ||
| 104 | { "label": "Enter_Top", "x": 18.5, "y": 5 }, | ||
| 105 | { "label": "Ctrl", "x": 0, "y": 6, "w": 1.25 }, | ||
| 106 | { "label": "GUI", "x": 1.25, "y": 6, "w": 1.25 }, | ||
| 107 | { "label": "Alt", "x": 2.5, "y": 6, "w": 1.25 }, | ||
| 108 | { "label": "Space", "x": 3.75, "y": 6, "w": 6.25 }, | ||
| 109 | { "label": "Alt", "x": 10, "y": 6 }, | ||
| 110 | { "label": "Fn", "x": 11, "y": 6 }, | ||
| 111 | { "label": "Ctrl", "x": 12, "y": 6 }, | ||
| 112 | { "label": "Left", "x": 13.25, "y": 6.25 }, | ||
| 113 | { "label": "Down", "x": 14.25, "y": 6.25 }, | ||
| 114 | { "label": "Right", "x": 15.25, "y": 6.25 }, | ||
| 115 | { "label": "0", "x": 16.5, "y": 6 }, | ||
| 116 | { "label": ".", "x": 17.5, "y": 6 }, | ||
| 117 | { "label": "Enter", "x": 18.5, "y": 6 } | ||
| 118 | ] | ||
| 119 | } | ||
| 120 | } | ||
| 121 | } | ||
diff --git a/keyboards/tkc/tkc1800/keymaps/default/keymap.c b/keyboards/tkc/tkc1800/keymaps/default/keymap.c new file mode 100644 index 000000000..4f4c7f8e9 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/default/keymap.c | |||
| @@ -0,0 +1,106 @@ | |||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | //Layers | ||
| 20 | |||
| 21 | enum { | ||
| 22 | BASE = 0, | ||
| 23 | FUNCTION, | ||
| 24 | }; | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | /* Keymap BASE: (Base Layer) Default Layer | ||
| 28 | * ,-------------------------------------------------------. ,-------------------. | ||
| 29 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 30 | * `-------------------------------------------------------' |-------------------| | ||
| 31 | * |Del |End |PgDn|ScrL| | ||
| 32 | * ,-----------------------------------------------------------. |-------------------| | ||
| 33 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 34 | * |-----------------------------------------------------------| |-------------------| | ||
| 35 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 36 | * |-----------------------------------------------------------| |-------------------| | ||
| 37 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + | | ||
| 38 | * |-----------------------------------------------------------' |-------------------| | ||
| 39 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 40 | * |--------------------------------------------------------'----`--------------| | | ||
| 41 | * |Ctrl|Gui |Alt | Space |Alt |Fn |Ctr|Left |Down|Rght| 0 | . | | | ||
| 42 | * `---------------------------------------------------------------------------------' | ||
| 43 | */ | ||
| 44 | [BASE] = LAYOUT( | ||
| 45 | 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, \ | ||
| 46 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 47 | KC_GRV, 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, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | ||
| 48 | 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, \ | ||
| 49 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 50 | KC_LSFT, XXXXXXX, 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, XXXXXXX, \ | ||
| 51 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ | ||
| 52 | ), | ||
| 53 | /* Keymap FUNCTION: (Function Layer) | ||
| 54 | * ,-------------------------------------------------------. ,-------------------. | ||
| 55 | * | | | | | | | | | | | | | | | | | | | | | | ||
| 56 | * `-------------------------------------------------------' |-------------------| | ||
| 57 | * | | | | | | ||
| 58 | * ,-----------------------------------------------------------. |-------------------| | ||
| 59 | * | | | | | | | | | | | | | | RESET | | | | | | | ||
| 60 | * |-----------------------------------------------------------| |-------------------| | ||
| 61 | * | | | | | | | | | | | | | | | | | | | | | ||
| 62 | * |-----------------------------------------------------------| |-------------------| | ||
| 63 | * | | | | | | | | | | | | | | | | | | | | ||
| 64 | * |-----------------------------------------------------------' |-------------------| | ||
| 65 | * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | | ||
| 66 | * |--------------------------------------------------------'----`--------------| | | ||
| 67 | * | | | | | | | | | | | | . | | | ||
| 68 | * `---------------------------------------------------------------------------------' | ||
| 69 | */ | ||
| 70 | [FUNCTION] = LAYOUT( | ||
| 71 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 72 | _______, _______, _______, _______, \ | ||
| 73 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 74 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 75 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 76 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 77 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 78 | ), | ||
| 79 | }; | ||
| 80 | |||
| 81 | |||
| 82 | #ifdef OLED_DRIVER_ENABLE | ||
| 83 | void oled_task_user(void) { | ||
| 84 | oled_write_P(PSTR("TKC1800\n"),false); | ||
| 85 | // Host Keyboard Layer Status | ||
| 86 | oled_write_P(PSTR("Layer: "), false); | ||
| 87 | |||
| 88 | switch (get_highest_layer(layer_state)) { | ||
| 89 | case BASE: | ||
| 90 | oled_write_P(PSTR("Base\n"), false); | ||
| 91 | break; | ||
| 92 | case FUNCTION: | ||
| 93 | oled_write_P(PSTR("Function\n"), false); | ||
| 94 | break; | ||
| 95 | default: | ||
| 96 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 97 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 98 | } | ||
| 99 | |||
| 100 | // Host Keyboard LED Status | ||
| 101 | led_t led_state = host_keyboard_led_state(); | ||
| 102 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 103 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 104 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 105 | } | ||
| 106 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/keymaps/smt/keymap.c b/keyboards/tkc/tkc1800/keymaps/smt/keymap.c new file mode 100644 index 000000000..9b6ad80d3 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/smt/keymap.c | |||
| @@ -0,0 +1,177 @@ | |||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | // Custom macros | ||
| 20 | #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl | ||
| 21 | #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) | ||
| 22 | #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift | ||
| 23 | |||
| 24 | //Layers | ||
| 25 | |||
| 26 | enum { | ||
| 27 | QWERTY = 0, | ||
| 28 | COLEMAK, | ||
| 29 | DVORAK, | ||
| 30 | FUNCTION, | ||
| 31 | }; | ||
| 32 | |||
| 33 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 34 | /* Keymap QWERTY: (Qwerty Layer) Default Layer | ||
| 35 | * ,-------------------------------------------------------. ,-------------------. | ||
| 36 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 37 | * `-------------------------------------------------------' |-------------------| | ||
| 38 | * |Del |End |PgDn|ScrL| | ||
| 39 | * ,-----------------------------------------------------------. |-------------------| | ||
| 40 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 41 | * |-----------------------------------------------------------| |-------------------| | ||
| 42 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 43 | * |-----------------------------------------------------------| |-------------------| | ||
| 44 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + | | ||
| 45 | * |-----------------------------------------------------------' |-------------------| | ||
| 46 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 47 | * |--------------------------------------------------------'----`--------------| | | ||
| 48 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | ||
| 49 | * `---------------------------------------------------------------------------------' | ||
| 50 | */ | ||
| 51 | [QWERTY] = LAYOUT( | ||
| 52 | 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, \ | ||
| 53 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 54 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | ||
| 55 | HPR_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_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ | ||
| 56 | CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 57 | KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ | ||
| 58 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ | ||
| 59 | ), | ||
| 60 | /* Keymap COLEMAK: (Colemak Layer) Default Layer | ||
| 61 | * ,-------------------------------------------------------. ,-------------------. | ||
| 62 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 63 | * `-------------------------------------------------------' |-------------------| | ||
| 64 | * |Del |End |PgDn|ScrL| | ||
| 65 | * ,-----------------------------------------------------------. |-------------------| | ||
| 66 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 67 | * |-----------------------------------------------------------| |-------------------| | ||
| 68 | * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 69 | * |-----------------------------------------------------------| |-------------------| | ||
| 70 | * |CAPS | A| R| S| T| D| H| N| E| I| O| '|Return | | 4 | 5 | 6 | + | | ||
| 71 | * |-----------------------------------------------------------' |-------------------| | ||
| 72 | * |Shift | Z| X| C| V| B| K| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 73 | * |--------------------------------------------------------'----`--------------| | | ||
| 74 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | ||
| 75 | * `---------------------------------------------------------------------------------' | ||
| 76 | */ | ||
| 77 | [COLEMAK] = LAYOUT( | ||
| 78 | 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, \ | ||
| 79 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 80 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | ||
| 81 | HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ | ||
| 82 | CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 83 | KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ | ||
| 84 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ | ||
| 85 | ), | ||
| 86 | /* Keymap DVORAK: (Dvorak Layer) Default Layer | ||
| 87 | * ,-------------------------------------------------------. ,-------------------. | ||
| 88 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 89 | * `-------------------------------------------------------' |-------------------| | ||
| 90 | * |Del |End |PgDn|ScrL| | ||
| 91 | * ,-----------------------------------------------------------. |-------------------| | ||
| 92 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| ~ | |NumL| / | * |Paus| | ||
| 93 | * |-----------------------------------------------------------| |-------------------| | ||
| 94 | * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| BS | | 7 | 8 | 9 | - | | ||
| 95 | * |-----------------------------------------------------------| |-------------------| | ||
| 96 | * |CAPS | A| O| E| U| I| D| H| T| N| S| -|Return | | 4 | 5 | 6 | + | | ||
| 97 | * |-----------------------------------------------------------' |-------------------| | ||
| 98 | * |Shift | ;| Q| J| K| X| B| M| W| V| Z|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 99 | * |--------------------------------------------------------'----`--------------| | | ||
| 100 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | ||
| 101 | * `---------------------------------------------------------------------------------' | ||
| 102 | */ | ||
| 103 | [DVORAK] = LAYOUT( | ||
| 104 | 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, \ | ||
| 105 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 106 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | ||
| 107 | HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ | ||
| 108 | CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 109 | KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ | ||
| 110 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ | ||
| 111 | ), | ||
| 112 | [FUNCTION] = LAYOUT( | ||
| 113 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ | ||
| 114 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 115 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | ||
| 116 | _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, \ | ||
| 117 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 118 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ | ||
| 119 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, _______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ | ||
| 120 | ), | ||
| 121 | }; | ||
| 122 | |||
| 123 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 124 | switch (keycode) { | ||
| 125 | case QWERTY: | ||
| 126 | if (record->event.pressed) { | ||
| 127 | set_single_persistent_default_layer(QWERTY); | ||
| 128 | } | ||
| 129 | return false; | ||
| 130 | break; | ||
| 131 | case COLEMAK: | ||
| 132 | if (record->event.pressed) { | ||
| 133 | set_single_persistent_default_layer(COLEMAK); | ||
| 134 | } | ||
| 135 | return false; | ||
| 136 | break; | ||
| 137 | case DVORAK: | ||
| 138 | if (record->event.pressed) { | ||
| 139 | set_single_persistent_default_layer(DVORAK); | ||
| 140 | } | ||
| 141 | return false; | ||
| 142 | break; | ||
| 143 | } | ||
| 144 | return true; | ||
| 145 | } | ||
| 146 | |||
| 147 | #ifdef OLED_DRIVER_ENABLE | ||
| 148 | void oled_task_user(void) { | ||
| 149 | oled_write_P(PSTR("TKC1800\n"),false); | ||
| 150 | // Host Keyboard Layer Status | ||
| 151 | oled_write_P(PSTR("Layer: "), false); | ||
| 152 | |||
| 153 | switch (get_highest_layer(layer_state)) { | ||
| 154 | case QWERTY: | ||
| 155 | oled_write_P(PSTR("Base\n"), false); | ||
| 156 | break; | ||
| 157 | case COLEMAK: | ||
| 158 | oled_write_P(PSTR("Colemak\n"), false); | ||
| 159 | break; | ||
| 160 | case DVORAK: | ||
| 161 | oled_write_P(PSTR("Dvorak\n"), false); | ||
| 162 | break; | ||
| 163 | case FUNCTION: | ||
| 164 | oled_write_P(PSTR("Function\n"), false); | ||
| 165 | break; | ||
| 166 | default: | ||
| 167 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 168 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 169 | } | ||
| 170 | |||
| 171 | // Host Keyboard LED Status | ||
| 172 | led_t led_state = host_keyboard_led_state(); | ||
| 173 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 174 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 175 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 176 | } | ||
| 177 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/keymaps/via/keymap.c b/keyboards/tkc/tkc1800/keymaps/via/keymap.c new file mode 100644 index 000000000..55c2874c6 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/via/keymap.c | |||
| @@ -0,0 +1,130 @@ | |||
| 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 QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | //Layers | ||
| 19 | |||
| 20 | enum { | ||
| 21 | BASE = 0, | ||
| 22 | FUNCTION, | ||
| 23 | ALTERNATE, | ||
| 24 | LAST, | ||
| 25 | }; | ||
| 26 | |||
| 27 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 28 | /* Keymap BASE: (Base Layer) Default Layer | ||
| 29 | * ,-------------------------------------------------------. ,-------------------. | ||
| 30 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 31 | * `-------------------------------------------------------' |-------------------| | ||
| 32 | * |Del |End |PgDn|ScrL| | ||
| 33 | * ,-----------------------------------------------------------. |-------------------| | ||
| 34 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 35 | * |-----------------------------------------------------------| |-------------------| | ||
| 36 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 37 | * |-----------------------------------------------------------| |-------------------| | ||
| 38 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + | | ||
| 39 | * |-----------------------------------------------------------' |-------------------| | ||
| 40 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 41 | * |--------------------------------------------------------'----`--------------| | | ||
| 42 | * |Ctrl|Gui |Alt | Space |Alt |Fn |Ctr|Left |Down|Rght| 0 | . | | | ||
| 43 | * `---------------------------------------------------------------------------------' | ||
| 44 | */ | ||
| 45 | [BASE] = LAYOUT( | ||
| 46 | 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, \ | ||
| 47 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 48 | KC_GRV, 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, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | ||
| 49 | 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, \ | ||
| 50 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 51 | KC_LSFT, XXXXXXX, 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, XXXXXXX, \ | ||
| 52 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ | ||
| 53 | ), | ||
| 54 | /* Keymap FUNCTION: (Function Layer) | ||
| 55 | * ,-------------------------------------------------------. ,-------------------. | ||
| 56 | * | | | | | | | | | | | | | | | | | | | | | | ||
| 57 | * `-------------------------------------------------------' |-------------------| | ||
| 58 | * | | | | | | ||
| 59 | * ,-----------------------------------------------------------. |-------------------| | ||
| 60 | * | | | | | | | | | | | | | | RESET | | | | | | | ||
| 61 | * |-----------------------------------------------------------| |-------------------| | ||
| 62 | * | | | | | | | | | | | | | | | | | | | | | ||
| 63 | * |-----------------------------------------------------------| |-------------------| | ||
| 64 | * | | | | | | | | | | | | | | | | | | | | ||
| 65 | * |-----------------------------------------------------------' |-------------------| | ||
| 66 | * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | | ||
| 67 | * |--------------------------------------------------------'----`--------------| | | ||
| 68 | * | | | | | | | | | | | | . | | | ||
| 69 | * `---------------------------------------------------------------------------------' | ||
| 70 | */ | ||
| 71 | [FUNCTION] = LAYOUT( | ||
| 72 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 73 | _______, _______, _______, _______, \ | ||
| 74 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 75 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 76 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 77 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 78 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 79 | ), | ||
| 80 | [ALTERNATE] = LAYOUT( | ||
| 81 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 82 | _______, _______, _______, _______, \ | ||
| 83 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 84 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 85 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 86 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 87 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 88 | ), | ||
| 89 | [LAST] = LAYOUT( | ||
| 90 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 91 | _______, _______, _______, _______, \ | ||
| 92 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 93 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 94 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 95 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 96 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 97 | ), | ||
| 98 | }; | ||
| 99 | |||
| 100 | #ifdef OLED_DRIVER_ENABLE | ||
| 101 | void oled_task_user(void) { | ||
| 102 | oled_write_P(PSTR("TKC1800\n"),false); | ||
| 103 | // Host Keyboard Layer Status | ||
| 104 | oled_write_P(PSTR("Layer: "), false); | ||
| 105 | |||
| 106 | switch (get_highest_layer(layer_state)) { | ||
| 107 | case BASE: | ||
| 108 | oled_write_P(PSTR("Base\n"), false); | ||
| 109 | break; | ||
| 110 | case FUNCTION: | ||
| 111 | oled_write_P(PSTR("Function\n"), false); | ||
| 112 | break; | ||
| 113 | case ALTERNATE: | ||
| 114 | oled_write_P(PSTR("Alternate\n"), false); | ||
| 115 | break; | ||
| 116 | case LAST: | ||
| 117 | oled_write_P(PSTR("Last\n"), false); | ||
| 118 | break; | ||
| 119 | default: | ||
| 120 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 121 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 122 | } | ||
| 123 | |||
| 124 | // Host Keyboard LED Status | ||
| 125 | led_t led_state = host_keyboard_led_state(); | ||
| 126 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 127 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 128 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 129 | } | ||
| 130 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/keymaps/via/rules.mk b/keyboards/tkc/tkc1800/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes | |||
diff --git a/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c new file mode 100644 index 000000000..3c65b61d1 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c | |||
| @@ -0,0 +1,88 @@ | |||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | //Layers | ||
| 20 | |||
| 21 | enum { | ||
| 22 | BASE = 0, | ||
| 23 | FUNCTION, | ||
| 24 | }; | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | /* Keymap BASE: (Base Layer) Default Layer | ||
| 28 | * ,-------------------------------------------------------. ,-------------------. | ||
| 29 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 30 | * `-------------------------------------------------------' |-------------------| | ||
| 31 | * |Del |End |PgDn|ScrL| | ||
| 32 | * ,-----------------------------------------------------------. |-------------------| | ||
| 33 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 34 | * |-----------------------------------------------------------| |-------------------| | ||
| 35 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 36 | * |-----------------------------------------------------------| |-------------------| | ||
| 37 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + | | ||
| 38 | * |-----------------------------------------------------------' |-------------------| | ||
| 39 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 40 | * |--------------------------------------------------------'----`--------------| | | ||
| 41 | * |Ctrl | Alt | Space | Fn |Ctrl |Left |Down|Rght| 0 | . | | | ||
| 42 | * `---------------------------------------------------------------------------------' | ||
| 43 | */ | ||
| 44 | [BASE] = LAYOUT( | ||
| 45 | 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, \ | ||
| 46 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 47 | KC_GRV, 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, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | ||
| 48 | 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, \ | ||
| 49 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 50 | KC_LSFT, XXXXXXX, 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, XXXXXXX, \ | ||
| 51 | KC_LCTL, KC_LALT, XXXXXXX, KC_SPC, XXXXXXX, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ | ||
| 52 | ), | ||
| 53 | [FUNCTION] = LAYOUT( | ||
| 54 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 55 | _______, _______, _______, _______, \ | ||
| 56 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 57 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 58 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 59 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 60 | _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 61 | ), | ||
| 62 | }; | ||
| 63 | |||
| 64 | #ifdef OLED_DRIVER_ENABLE | ||
| 65 | void oled_task_user(void) { | ||
| 66 | oled_write_P(PSTR("TKC1800\n"),false); | ||
| 67 | // Host Keyboard Layer Status | ||
| 68 | oled_write_P(PSTR("Layer: "), false); | ||
| 69 | |||
| 70 | switch (get_highest_layer(layer_state)) { | ||
| 71 | case BASE: | ||
| 72 | oled_write_P(PSTR("Base\n"), false); | ||
| 73 | break; | ||
| 74 | case FUNCTION: | ||
| 75 | oled_write_P(PSTR("Function\n"), false); | ||
| 76 | break; | ||
| 77 | default: | ||
| 78 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 79 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 80 | } | ||
| 81 | |||
| 82 | // Host Keyboard LED Status | ||
| 83 | led_t led_state = host_keyboard_led_state(); | ||
| 84 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 85 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 86 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 87 | } | ||
| 88 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c new file mode 100644 index 000000000..bbffc2d20 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c | |||
| @@ -0,0 +1,88 @@ | |||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | //Layers | ||
| 20 | |||
| 21 | enum { | ||
| 22 | BASE = 0, | ||
| 23 | FUNCTION, | ||
| 24 | }; | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | /* Keymap BASE: (Base Layer) Default Layer | ||
| 28 | * ,-------------------------------------------------------. ,-------------------. | ||
| 29 | * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| | ||
| 30 | * `-------------------------------------------------------' |-------------------| | ||
| 31 | * |Del |End |PgDn|ScrL| | ||
| 32 | * ,-----------------------------------------------------------. |-------------------| | ||
| 33 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| | ||
| 34 | * |-----------------------------------------------------------| |-------------------| | ||
| 35 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | - | | ||
| 36 | * |-----------------------------------------------------------| |-------------------| | ||
| 37 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | + | | ||
| 38 | * |-----------------------------------------------------------' |-------------------| | ||
| 39 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| | ||
| 40 | * |--------------------------------------------------------'----`--------------| | | ||
| 41 | * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | | ||
| 42 | * `---------------------------------------------------------------------------------' | ||
| 43 | */ | ||
| 44 | [BASE] = LAYOUT( | ||
| 45 | 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, \ | ||
| 46 | KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ | ||
| 47 | KC_GRV, 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, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ | ||
| 48 | 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, \ | ||
| 49 | LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 50 | KC_LSFT, XXXXXXX, 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, XXXXXXX, \ | ||
| 51 | KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ | ||
| 52 | ), | ||
| 53 | [FUNCTION] = LAYOUT( | ||
| 54 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 55 | _______, _______, _______, _______, \ | ||
| 56 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 57 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 58 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 59 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 60 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ | ||
| 61 | ), | ||
| 62 | }; | ||
| 63 | |||
| 64 | #ifdef OLED_DRIVER_ENABLE | ||
| 65 | void oled_task_user(void) { | ||
| 66 | oled_write_P(PSTR("TKC1800\n"),false); | ||
| 67 | // Host Keyboard Layer Status | ||
| 68 | oled_write_P(PSTR("Layer: "), false); | ||
| 69 | |||
| 70 | switch (get_highest_layer(layer_state)) { | ||
| 71 | case BASE: | ||
| 72 | oled_write_P(PSTR("Base\n"), false); | ||
| 73 | break; | ||
| 74 | case FUNCTION: | ||
| 75 | oled_write_P(PSTR("Function\n"), false); | ||
| 76 | break; | ||
| 77 | default: | ||
| 78 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 79 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 80 | } | ||
| 81 | |||
| 82 | // Host Keyboard LED Status | ||
| 83 | led_t led_state = host_keyboard_led_state(); | ||
| 84 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 85 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 86 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 87 | } | ||
| 88 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk b/keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk new file mode 100644 index 000000000..b595964f7 --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| OLED_DRIVER_ENABLE = no | |||
diff --git a/keyboards/tkc/tkc1800/rules.mk b/keyboards/tkc/tkc1800/rules.mk new file mode 100644 index 000000000..fa90e9980 --- /dev/null +++ b/keyboards/tkc/tkc1800/rules.mk | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = at90usb1286 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | # Teensy halfkay | ||
| 6 | # Pro Micro caterina | ||
| 7 | # Atmel DFU atmel-dfu | ||
| 8 | # LUFA DFU lufa-dfu | ||
| 9 | # QMK DFU qmk-dfu | ||
| 10 | # ATmega32A bootloadHID | ||
| 11 | # ATmega328P USBasp | ||
| 12 | BOOTLOADER = qmk-dfu | ||
| 13 | |||
| 14 | # Build Options | ||
| 15 | # change yes to no to disable | ||
| 16 | # | ||
| 17 | |||
| 18 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 19 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 20 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 21 | CONSOLE_ENABLE = no # Console for debug | ||
| 22 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 23 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 24 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 25 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 26 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 27 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default | ||
| 28 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 29 | MIDI_ENABLE = no # MIDI controls | ||
| 30 | UNICODE_ENABLE = no # Unicode | ||
| 31 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 32 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 33 | OLED_DRIVER_ENABLE = yes \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/tkc1800.c b/keyboards/tkc/tkc1800/tkc1800.c new file mode 100644 index 000000000..4232c97d5 --- /dev/null +++ b/keyboards/tkc/tkc1800/tkc1800.c | |||
| @@ -0,0 +1,76 @@ | |||
| 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 keyboard_pre_init_kb(void) { | ||
| 20 | setPinInputHigh(D0); | ||
| 21 | setPinInputHigh(D1); | ||
| 22 | |||
| 23 | keyboard_pre_init_user(); | ||
| 24 | } | ||
| 25 | |||
| 26 | void matrix_init_kb(void) { | ||
| 27 | // put your keyboard start-up code here | ||
| 28 | // runs once when the firmware starts up | ||
| 29 | led_init_ports(); | ||
| 30 | matrix_init_user(); | ||
| 31 | } | ||
| 32 | |||
| 33 | void matrix_scan_kb(void) { | ||
| 34 | // put your looping keyboard code here | ||
| 35 | // runs every cycle (a lot) | ||
| 36 | |||
| 37 | matrix_scan_user(); | ||
| 38 | } | ||
| 39 | |||
| 40 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 41 | // put your per-action keyboard code here | ||
| 42 | // runs for every action, just before processing by the firmware | ||
| 43 | |||
| 44 | return process_record_user(keycode, record); | ||
| 45 | } | ||
| 46 | |||
| 47 | void led_init_ports(void) { | ||
| 48 | DDRD |= (1<<2) | (1<<3) | (1<<4); // OUT | ||
| 49 | DDRB |= (1<<7); // OUT | ||
| 50 | PORTB |= (1<<7); | ||
| 51 | } | ||
| 52 | |||
| 53 | void led_set_kb(uint8_t usb_led) { | ||
| 54 | // led_set_user(usb_led); | ||
| 55 | if (usb_led & (1<<USB_LED_NUM_LOCK)) { | ||
| 56 | // Turn numlock on | ||
| 57 | PORTD |= (1<<2); | ||
| 58 | } else { | ||
| 59 | // Turn numlock off | ||
| 60 | PORTD &= ~(1<<2); | ||
| 61 | } | ||
| 62 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
| 63 | // Turn capslock on | ||
| 64 | PORTD |= (1<<3); | ||
| 65 | } else { | ||
| 66 | // Turn capslock off | ||
| 67 | PORTD &= ~(1<<3); | ||
| 68 | } | ||
| 69 | if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { | ||
| 70 | // Turn scrolllock on | ||
| 71 | PORTD |= (1<<4); | ||
| 72 | } else { | ||
| 73 | // Turn scrolllock off | ||
| 74 | PORTD &= ~(1<<4); | ||
| 75 | } | ||
| 76 | } \ No newline at end of file | ||
diff --git a/keyboards/tkc/tkc1800/tkc1800.h b/keyboards/tkc/tkc1800/tkc1800.h new file mode 100644 index 000000000..4d1686cf1 --- /dev/null +++ b/keyboards/tkc/tkc1800/tkc1800.h | |||
| @@ -0,0 +1,36 @@ | |||
| 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 | #pragma once | ||
| 17 | |||
| 18 | #include "quantum.h" | ||
| 19 | |||
| 20 | #define LAYOUT( \ | ||
| 21 | K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, K0G, K0H, K0I, \ | ||
| 22 | K1F, K1G, K1H, K1I, \ | ||
| 23 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, \ | ||
| 24 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, K3H, K3I, \ | ||
| 25 | K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, K4G, K4H, K4I, \ | ||
| 26 | K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5F, K5G, K5H, K5I, \ | ||
| 27 | K60, K61, K62, K65, K69, K6A, K6B, K6C, K6D, K6E, K6G, K6H, K6I \ | ||
| 28 | ) { \ | ||
| 29 | { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F, K0G, K0H, K0I }, \ | ||
| 30 | { 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 }, \ | ||
| 31 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I }, \ | ||
| 32 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \ | ||
| 33 | { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I }, \ | ||
| 34 | { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, KC_NO, K5F, K5G, K5H, K5I }, \ | ||
| 35 | { 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 } \ | ||
| 36 | } | ||
