Prechádzať zdrojové kódy

[Keyboard] TKC California (#15124)

* CALIFORNIA: Initial support for TKC California

* update readme.md, info.json

* Update keyboards/tkc/california/rules.mk

* Update keyboards/tkc/california/rules.mk

* Update keyboards/tkc/california/readme.md

* Update keyboards/tkc/california/rules.mk

* Update keyboards/tkc/california/info.json
TerryMathews 3 rokov pred
rodič
commit
0e11f8ec20

+ 18 - 0
keyboards/tkc/california/california.c

@@ -0,0 +1,18 @@
+/*
+Copyright 2021 Terry Mathews
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "california.h"

+ 50 - 0
keyboards/tkc/california/california.h

@@ -0,0 +1,50 @@
+/*
+Copyright 2021 Terry Mathews
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "quantum.h"  
+
+/* This a shortcut to help you visually see your layout.
+ *
+ * The first section contains all of the arguments representing the physical
+ * layout of the board and position of the keys.
+ *
+ * The second converts the arguments into a two-dimensional array which
+ * represents the switch matrix.
+ */
+#define LAYOUT_all( \
+    K00,      K02, K03, K04, K05, K06, K07, K08, K09,      K61, K62, K63, K64, K65, K66, K67, K68, K69, \
+    K10, k11, K12, K13, K14, K15, K16, K17, K18, K19, K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, \
+    K20,      K22, K23, K24, K25, K26, K27, K28, K29, K80, K81, K82, K83, K84, K85, K86, K87, K88, K89, \
+    K30,      K32, K33, K34, K35, K36, K37, K38, K39, K90, K91, K92, K93,           K96, K97, K98, K99, \
+    K40,      K42, K43, K44, K45, K46, K47, K48, K49, KA0, KA1, KA2,      KA4, KA5, KA6, KA7, KA8, KA9, \
+    K50, K51, K52,           K55,           K58,      KB0,      KB2,      KB4, KB5, KB6, KB7, KB8, KB9  \
+) { \
+    { K00,   KC_NO, K02,   K03,   K04,   K05,   K06,   K07,   K08,   K09   }, \
+    { K10,   k11,   K12,   K13,   K14,   K15,   K16,   K17,   K18,   K19   }, \
+    { K20,   KC_NO, K22,   K23,   K24,   K25,   K26,   K27,   K28,   K29   }, \
+    { K30,   KC_NO, K32,   K33,   K34,   K35,   K36,   K37,   K38,   K39   }, \
+    { K40,   KC_NO, K42,   K43,   K44,   K45,   K46,   K47,   K48,   K49   }, \
+    { K50,   K51,   K52,   KC_NO, KC_NO, K55,   KC_NO, KC_NO, K58,   KC_NO }, \
+    { KC_NO, K61,   K62,   K63,   K64,   K65,   K66,   K67,   K68,   K69   }, \
+    { K70,   K71,   K72,   K73,   K74,   K75,   K76,   K77,   K78,   K79   }, \
+    { K80,   K81,   K82,   K83,   K84,   K85,   K86,   K87,   K88,   K89   }, \
+    { K90,   K91,   K92,   K93,   KC_NO, KC_NO, K96,   K97,   K98,   K99   }, \
+    { KA0,   KA1,   KA2,   KC_NO, KA4,   KA5,   KA6,   KA7,   KA8,   KA9   }, \
+    { KB0,   KC_NO, KB2,   KC_NO, KB4,   KB5,   KB6,   KB7,   KB8,   KB9   }  \
+}

+ 123 - 0
keyboards/tkc/california/config.h

@@ -0,0 +1,123 @@
+/*
+Copyright 2021 Terry Mathews
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0x544B //TK
+#define PRODUCT_ID      0x0009
+#define DEVICE_VER      0x0001
+#define MANUFACTURER    TKC
+#define PRODUCT         California
+
+/* key matrix size */
+#define MATRIX_ROWS 12
+#define MATRIX_COLS 10
+
+#define DYNAMIC_KEYMAP_LAYER_COUNT 2 //Reduced layer count due to memory space considerations
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ *                  ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+*/
+#define MATRIX_ROW_PINS { C7, C6, B6, D4, D3, D0, E6, B0, B1, B2, D2, B3 }
+#define MATRIX_COL_PINS { B5, B4, D7, D6, F7, F6, F5, D5, D1, F4 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION ROW2COL
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define BACKLIGHT_PIN B7
+#ifdef BACKLIGHT_PIN
+#define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 3
+#endif
+#define LED_NUM_LOCK_PIN F1
+#define LED_CAPS_LOCK_PIN F0
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
+ * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Feature disable options
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 6 - 0
keyboards/tkc/california/info.json


+ 29 - 0
keyboards/tkc/california/keymaps/default/keymap.c

@@ -0,0 +1,29 @@
+/*
+Copyright 2021 Terry Mathews
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  [0] = LAYOUT_all( /* Base */
+    
+	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_PSCR,KC_HOME,KC_END,KC_SLCK,KC_PAUS,
+    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_DEL,KC_BSPC,KC_PGUP,KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS,
+    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_PGDN,KC_P7,KC_P8,KC_P9,KC_PMNS,
+    KC_CAPS,KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,    KC_SCLN, KC_QUOT, KC_ENT,KC_P4,   KC_P5,   KC_P6,KC_PPLS,
+    KC_LSFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,KC_NO,KC_UP,   KC_P1,   KC_P2,   KC_P3,   KC_PENT,
+    KC_LCTL, KC_LGUI, KC_LALT,                   KC_SPC,                    KC_RALT,KC_MENU, KC_RCTL,          KC_LEFT, KC_DOWN, KC_RGHT, KC_P0,   KC_PDOT, KC_PENT),
+};

+ 38 - 0
keyboards/tkc/california/keymaps/via/keymap.c

@@ -0,0 +1,38 @@
+/*
+Copyright 2021 Terry Mathews
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+  [0] = LAYOUT_all( /* Base */
+    
+	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_PSCR,KC_HOME,KC_END,KC_SLCK,KC_PAUS,
+    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_DEL,KC_BSPC,KC_PGUP,KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS,
+    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_PGDN,KC_P7,KC_P8,KC_P9,KC_PMNS,
+    KC_CAPS,KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,    KC_SCLN, KC_QUOT, KC_ENT,KC_P4,   KC_P5,   KC_P6,KC_PPLS,
+    KC_LSFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,MO(1),KC_UP,   KC_P1,   KC_P2,   KC_P3,   KC_PENT,
+    KC_LCTL, KC_LGUI, KC_LALT,                   KC_SPC,                    KC_RALT,KC_MENU, KC_RCTL,          KC_LEFT, KC_DOWN, KC_RGHT, KC_P0,   KC_PDOT, KC_PENT),
+	
+	[1] = LAYOUT_all( /* Function */
+    
+	_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
+    _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
+    _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
+    _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
+    _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,MO(1),_______,_______,_______,_______,_______,
+    _______,_______,_______,                   _______,                    _______,_______, _______,_______,_______,_______,_______,_______,_______),
+};

+ 2 - 0
keyboards/tkc/california/keymaps/via/rules.mk

@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+LTO_ENABLE = yes

+ 21 - 0
keyboards/tkc/california/readme.md

@@ -0,0 +1,21 @@
+# TKC California
+
+![TKC California](https://i.imgur.com/IaG5Gvph.jpg)
+
+A compact 1800 keyboard.
+
+* Keyboard Maintainer: [TerryMathews](https://github.com/TerryMathews)
+* Hardware Supported: TKC California (ATmega32U4)
+* Hardware Availability: TBA
+
+Reset board into bootloader by holding down Esc key while plugging in USB-C cable.
+
+Make example for this keyboard (after setting up your build environment):
+
+    make tkc/california:default
+
+Flashing example for this keyboard:
+
+    make tkc/california:default:flash
+
+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).

+ 18 - 0
keyboards/tkc/california/rules.mk

@@ -0,0 +1,18 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
+# Build Options
+#   change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes      # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes       # Mouse keys
+EXTRAKEY_ENABLE = yes       # Audio control and System control
+CONSOLE_ENABLE = no         # Console for debug
+COMMAND_ENABLE = no         # Commands for debug and configuration
+NKRO_ENABLE = yes           # Enable N-Key Rollover
+BACKLIGHT_ENABLE = yes      # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no        # Enable keyboard RGB underglow
+AUDIO_ENABLE = no           # Audio output

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov