diff --git a/keyboards/katana60/config.h b/keyboards/katana60/config.h index 3385ddb9cb7b..75532f1ba15a 100644 --- a/keyboards/katana60/config.h +++ b/keyboards/katana60/config.h @@ -14,41 +14,16 @@ 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 . */ - -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER RominRonin CandyKeys -#define PRODUCT Katana60 -#define DESCRIPTION QMK keyboard firmware for Katana60 - /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 15 -/* - * 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 { F5, F6, F4, F1, D0 } -#define MATRIX_COL_PINS { B7, B3, B2, B1, B0, C7, D1, D2, C6, B6, B5, B4, D4, D6, D7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION ROW2COL - // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 @@ -182,5 +157,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#endif diff --git a/keyboards/katana60/readme.md b/keyboards/katana60/readme.md index 5e1c7d39060c..001cb7d2aee1 100644 --- a/keyboards/katana60/readme.md +++ b/keyboards/katana60/readme.md @@ -5,7 +5,7 @@ A 60% keyboard with a symmetrical staggered layout, sold by CandyKeys.com. Keyboard Maintainer: [Baris Tosun](https://github.com/rominronin) -Hardware Supported: Katana60 PCB v1, Teensy 2.0 +Hardware Supported: Katana60 PCB v1, Katana60 PCB v2, Teensy 2.0 Hardware Availability: [CandyKeys.com](https://CandyKeys.com) Make example for this keyboard (after setting up your build environment): @@ -14,4 +14,4 @@ Make example for this keyboard (after setting up your build environment): See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. -There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/) \ No newline at end of file +There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/) diff --git a/keyboards/katana60/rev1/config.h b/keyboards/katana60/rev1/config.h new file mode 100644 index 000000000000..579e9e4b527d --- /dev/null +++ b/keyboards/katana60/rev1/config.h @@ -0,0 +1,47 @@ +/* +Copyright 2017 Baris Tosun + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER RominRonin CandyKeys +#define PRODUCT Katana60 +#define DESCRIPTION QMK keyboard firmware for Katana60 + +/* + * 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) + * +*/ + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL +#define MATRIX_ROW_PINS { F5, F6, F4, F1, D0 } +#define MATRIX_COL_PINS { B7, B3, B2, B1, B0, C7, D1, D2, C6, B6, B5, B4, D4, D6, D7 } + +#endif diff --git a/keyboards/katana60/katana60.c b/keyboards/katana60/rev1/rev1.c similarity index 98% rename from keyboards/katana60/katana60.c rename to keyboards/katana60/rev1/rev1.c index e8d4fef1936d..ad4ee6c2f841 100644 --- a/keyboards/katana60/katana60.c +++ b/keyboards/katana60/rev1/rev1.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "katana60.h" +#include "rev1.h" void matrix_init_kb(void) { // put your keyboard start-up code here diff --git a/keyboards/katana60/katana60.h b/keyboards/katana60/rev1/rev1.h similarity index 100% rename from keyboards/katana60/katana60.h rename to keyboards/katana60/rev1/rev1.h diff --git a/keyboards/katana60/rev1/rules.mk b/keyboards/katana60/rev1/rules.mk new file mode 100644 index 000000000000..2481f572db03 --- /dev/null +++ b/keyboards/katana60/rev1/rules.mk @@ -0,0 +1 @@ +#empty makefile to mark subfolder as buildable target, uses top folder makefile to build diff --git a/keyboards/katana60/rev2/config.h b/keyboards/katana60/rev2/config.h new file mode 100644 index 000000000000..381371bb0302 --- /dev/null +++ b/keyboards/katana60/rev2/config.h @@ -0,0 +1,42 @@ +/* Copyright 2020 Manuel Indlekofer + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0002 +#define MANUFACTURER RominRonin CandyKeys +#define PRODUCT Katana60 rev2 +#define DESCRIPTION QMK keyboard firmware for Katana60 rev2 +/* + * 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 { B0, E6, D5, B4 ,B5 } +#define MATRIX_COL_PINS {F0 ,F1 ,F4 ,F5 ,F6 ,F7 ,C7 ,C6 ,B6 ,D6 ,D4 ,D3 ,D2 ,D1 ,D0 } +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + diff --git a/keyboards/katana60/rev2/rev2.c b/keyboards/katana60/rev2/rev2.c new file mode 100644 index 000000000000..301012455d87 --- /dev/null +++ b/keyboards/katana60/rev2/rev2.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Manuel Indlekofer + * + * 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 . + */ + +#include "rev2.h" diff --git a/keyboards/katana60/rev2/rev2.h b/keyboards/katana60/rev2/rev2.h new file mode 100644 index 000000000000..a3042534fde2 --- /dev/null +++ b/keyboards/katana60/rev2/rev2.h @@ -0,0 +1,41 @@ +/* Copyright 2020 Manuel Indlekofer + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is 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( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 ,k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k43, k44, k47, k49, k4a, k4b, k4c, k4d, k4e) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19,k1a, k1b, k1c, k1d, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + { k40, k41, k42, k43, k44, KC_NO, KC_NO, k47, KC_NO, k49, k4a, k4b, k4c, k4d, k4e} \ +} diff --git a/keyboards/katana60/rev2/rules.mk b/keyboards/katana60/rev2/rules.mk new file mode 100644 index 000000000000..2481f572db03 --- /dev/null +++ b/keyboards/katana60/rev2/rules.mk @@ -0,0 +1 @@ +#empty makefile to mark subfolder as buildable target, uses top folder makefile to build diff --git a/keyboards/katana60/rules.mk b/keyboards/katana60/rules.mk index e41c168c4fc3..6d77350cf17a 100644 --- a/keyboards/katana60/rules.mk +++ b/keyboards/katana60/rules.mk @@ -1,6 +1,8 @@ # MCU name MCU = atmega32u4 +DEFAULT_FOLDER = katana60/rev2 + # Bootloader selection # Teensy halfkay # Pro Micro caterina