Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for the Katana60revision2 PCB #10229

Closed
wants to merge 11 commits into from
29 changes: 1 addition & 28 deletions keyboards/katana60/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.gnu.org/licenses/>.
*/

#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
Expand Down Expand Up @@ -182,5 +157,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1

#endif
4 changes: 2 additions & 2 deletions keyboards/katana60/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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/)
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/)
47 changes: 47 additions & 0 deletions keyboards/katana60/rev1/config.h
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/

#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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* 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 "katana60.h"
#include "rev1.h"

void matrix_init_kb(void) {
// put your keyboard start-up code here
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions keyboards/katana60/rev1/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#empty makefile to mark subfolder as buildable target, uses top folder makefile to build
42 changes: 42 additions & 0 deletions keyboards/katana60/rev2/config.h
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/
#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


17 changes: 17 additions & 0 deletions keyboards/katana60/rev2/rev2.c
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/

#include "rev2.h"
41 changes: 41 additions & 0 deletions keyboards/katana60/rev2/rev2.h
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/

#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} \
}
1 change: 1 addition & 0 deletions keyboards/katana60/rev2/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#empty makefile to mark subfolder as buildable target, uses top folder makefile to build
2 changes: 2 additions & 0 deletions keyboards/katana60/rules.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# MCU name
MCU = atmega32u4

DEFAULT_FOLDER = katana60/rev2

# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
Expand Down