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

Add tsubasa keyboard #19352

Merged
merged 29 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c9355d6
add documents for PR
kuriatsu Sep 18, 2022
01c14a1
solve lint error
kuriatsu Sep 18, 2022
f3cac7c
solve lint error
kuriatsu Sep 19, 2022
e147b0f
reviews reflected
kuriatsu Sep 25, 2022
2cc00a3
update image url
kuriatsu Sep 25, 2022
f6292f3
Update keyboards/handwired/tsubasa/readme.md
kuriatsu Sep 26, 2022
a3fe566
remove encoder_map_enable from keyboard level
kuriatsu Sep 26, 2022
9f8f1dc
Update keyboards/handwired/tsubasa/config.h
kuriatsu Sep 26, 2022
97ba07f
Update keyboards/handwired/tsubasa/readme.md
kuriatsu Sep 26, 2022
02331cf
Merge branch 'qmk:master' into develop_tsubasa
kuriatsu Dec 16, 2022
44a9d8e
Update keyboards/handwired/tsubasa/info.json
kuriatsu Dec 18, 2022
fb01f33
Update keyboards/handwired/tsubasa/keymaps/default/readme.md
kuriatsu Dec 18, 2022
8f8bf9d
Update keyboards/handwired/tsubasa/tsubasa.c
kuriatsu Dec 18, 2022
25531d2
Update keyboards/handwired/tsubasa/rules.mk
kuriatsu Dec 24, 2022
df4a1a4
Apply suggestions from code review
kuriatsu Feb 12, 2023
c3cab71
Apply suggestions from code review
kuriatsu Feb 12, 2023
73df094
Apply suggestions from code review
kuriatsu Feb 12, 2023
aa7eb6e
Apply suggestions from code review
kuriatsu Feb 12, 2023
1bb9f49
Apply suggestions from code review
kuriatsu Feb 12, 2023
78b6616
Apply suggestions from code review
kuriatsu Feb 12, 2023
e0290b2
Update keyboards/handwired/tsubasa/config.h
kuriatsu Mar 5, 2023
8d98bab
Update keyboards/handwired/tsubasa/info.json
kuriatsu Mar 5, 2023
28ebdf6
Update keyboards/handwired/tsubasa/rules.mk
kuriatsu Mar 5, 2023
c287ca9
move oled_task_kb to keymap level
kuriatsu Mar 6, 2023
31207a3
oled_task_user to oled_task_kb
kuriatsu Mar 6, 2023
bfd93c5
Update keyboards/handwired/tsubasa/info.json
kuriatsu Mar 6, 2023
e93ba6b
Update keyboards/handwired/tsubasa/config.h
kuriatsu Mar 6, 2023
cf1c4e2
Update keyboards/handwired/tsubasa/info.json
kuriatsu Mar 6, 2023
7228d21
Update keyboards/handwired/tsubasa/config.h
kuriatsu Mar 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions keyboards/handwired/tsubasa/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
Copyright 2021 @kuriatsu

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
#define MASTER_RIGHT

#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }

kuriatsu marked this conversation as resolved.
Show resolved Hide resolved
#define RGB_DI_PIN D2
#ifdef RGB_DI_PIN
# define RGBLED_NUM 12
# define RGBLIGHT_SPLIT
# define RGBLED_SPLIT {6, 6}
# define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 1
# define RGBLIGHT_VAL_STEP 1
# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
# define RGBLIGHT_EFFECT_BREATHING
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#endif

#define ENCODERS_PAD_A { }
#define ENCODERS_PAD_B { }
#define ENCODER_RESOLUTIONS { }
#define ENCODERS_PAD_A_RIGHT { F4 }
#define ENCODERS_PAD_B_RIGHT { F5 }
#define ENCODER_RESOLUTIONS_RIGHT { 4 }

kuriatsu marked this conversation as resolved.
Show resolved Hide resolved
#define SPLIT_WPM_ENABLE
#define SPLIT_LAYER_STATE_ENABLE
83 changes: 83 additions & 0 deletions keyboards/handwired/tsubasa/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"keyboard_name": "tsubasa",
"url": "https://github.com/kuriatsu/TSUBASA",
"maintainer": "kuriatsu",
kuriatsu marked this conversation as resolved.
Show resolved Hide resolved
"manufacturer": "kuriatsu",
"usb": {
"vid": "0xFEED",
"pid": "0x0000",
"device_version": "1.0.0"
},
kuriatsu marked this conversation as resolved.
Show resolved Hide resolved
kuriatsu marked this conversation as resolved.
Show resolved Hide resolved
"processor": "atmega32u4",
"bootloader": "caterina",
kuriatsu marked this conversation as resolved.
Show resolved Hide resolved
"diode_direction": "COL2ROW",
"split": {
"enabled": true,
"soft_serial_pin": "D3"
kuriatsu marked this conversation as resolved.
Show resolved Hide resolved
},
"layouts": {
"LAYOUT": {
"layout": [
{"label":"!", "x":0.5, "y":0},
{"label":"@", "x":1.5, "y":0},
{"label":"#", "x":2.5, "y":0},
{"label":"$", "x":3.5, "y":0},
{"label":"%", "x":4.5, "y":0},
{"label":"^", "x":5.5, "y":0},
{"label":"&", "x":9.5, "y":0},
{"label":"*", "x":10.5, "y":0},
{"label":"(", "x":11.5, "y":0},
{"label":")", "x":12.5, "y":0},
{"label":"_", "x":13.5, "y":0},
{"label":"+", "x":14.5, "y":0},
{"label":"TAB", "x":0, "y":1},
{"label":"Q", "x":1, "y":1},
{"label":"W", "x":2, "y":1},
{"label":"E", "x":3, "y":1},
{"label":"R", "x":4, "y":1},
{"label":"T", "x":5, "y":1},
{"label":"Y", "x":9, "y":1},
{"label":"U", "x":10, "y":1},
{"label":"I", "x":11, "y":1},
{"label":"O", "x":12, "y":1},
{"label":"P", "x":13, "y":1},
{"label":"{", "x":14, "y":1},
{"label":"Caps Lock", "x":0.25, "y":2},
{"label":"A", "x":1.25, "y":2},
{"label":"S", "x":2.25, "y":2},
{"label":"D", "x":3.25, "y":2},
{"label":"F", "x":4.25, "y":2},
{"label":"G", "x":5.25, "y":2},
{"label":"H", "x":9.25, "y":2},
{"label":"J", "x":10.25, "y":2},
{"label":"K", "x":11.25, "y":2},
{"label":"L", "x":12.25, "y":2},
{"label":":", "x":13.25, "y":2},
{"label":"\"", "x":14.25, "y":2},
{"label":"}", "x":15, "y":1},
{"label":"SHIFT", "x":0.75, "y":3},
{"label":"Z", "x":1.75, "y":3},
{"label":"X", "x":2.75, "y":3},
{"label":"C", "x":3.75, "y":3},
{"label":"V", "x":4.75, "y":3},
{"label":"B", "x":5.75, "y":3},
{"label":"Encoder Mode", "x":8.75, "y":3},
{"label":"N", "x":9.75, "y":3},
{"label":"M", "x":10.75, "y":3},
{"label":"<", "x":11.75, "y":3},
{"label":">", "x":12.75, "y":3},
{"label":"?", "x":13.75, "y":3},
{"label":"Esc", "x":2.25, "y":4},
{"label":"Super", "x":3.25, "y":4},
{"label":"Alt", "x":4.25, "y":4.25},
{"label":"Space", "x":5.25, "y":4.5},
{"label":"Shift", "x":6.25, "y":4.75},
{"label":"BS", "x":8.25, "y":4.75},
{"label":"Enter", "x":9.25, "y":4.5},
{"label":"Fn", "x":10.25, "y":4.25},
{"label":"|", "x":11.25, "y":4},
{"label":"~", "x":12.25, "y":4}
]
}
}
}
50 changes: 50 additions & 0 deletions keyboards/handwired/tsubasa/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/* Copyright 2021 kuriatsu
*
* 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

// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_FN
};


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
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_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_ESC, KC_RGUI, KC_LALT, KC_SPC, KC_LSFT, KC_BSPC, KC_ENT, MO(_FN), KC_BSLS, KC_GRV
),
[_FN] = LAYOUT(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
_______, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, RGB_TOG, KC_PGUP, XXXXXXX, KC_UP, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX,
_______, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, RGB_MOD, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX,
_______, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAI, RGB_HUI, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
_______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______
)
};


#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[_BASE] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
[_FN] = { ENCODER_CCW_CW( KC_VOLU, KC_VOLD)}
};
#endif


2 changes: 2 additions & 0 deletions keyboards/handwired/tsubasa/keymaps/default/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The default keymap for tsubasa
![keymap](https://i.imgur.com/wIRs6Ebh.png)
1 change: 1 addition & 0 deletions keyboards/handwired/tsubasa/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes
23 changes: 23 additions & 0 deletions keyboards/handwired/tsubasa/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# TSUBASA

![tsubasa](https://i.imgur.com/q5JlhvMh.jpeg)

Hotswap split row-staggerd keyboard with an OLED and a rotary encoder

* Keyboard Maintainer: [kuriatsu](https://github.com/kuriatsu)
* Hardware Supported: ProMicro
* Hardware Availability and Build Guide: [Repository](https://github.com/kuriatsu/TSUBASA)

Make example for this keyboard (after setting up your build environment):

make handwired/tsubasa:default

Flashing example for this keyboard:

make handwired/tsubasa: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).

## Bootloader

**Physical reset**: Ground Reset of ProMicro
19 changes: 19 additions & 0 deletions keyboards/handwired/tsubasa/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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 = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
LTO_ENABLE = yes

ENCODER_ENABLE = yes

OLED_ENABLE = yes
OLED_DRIVER = SSD1306
WPM_ENABLE = yes
waffle87 marked this conversation as resolved.
Show resolved Hide resolved
57 changes: 57 additions & 0 deletions keyboards/handwired/tsubasa/tsubasa.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/* Copyright 2021 @kuriatsu
*
* 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 "tsubasa.h"
kuriatsu marked this conversation as resolved.
Show resolved Hide resolved

#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { return false; }
if (index == 0) {
if (clockwise) {
tap_code_delay(KC_VOLU, 10);
} else {
tap_code_delay(KC_VOLD, 10);
}
}
return true;
}
#endif

#ifdef OLED_ENABLE
static void render_scrl(void) {
static const char PROGMEM raw_scrl[] = {
128,192,192,224, 96, 48, 48, 48, 48, 48, 48, 48,240,240,240,240,240,112,112, 56, 56, 56, 56, 24, 28, 28, 28,124,248,248,240, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192,192,224,112, 56, 56, 56, 56, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
7, 15, 28, 24, 24, 24, 12, 12, 0, 0,192,254,255,255,255, 15, 32, 32, 48, 48, 16, 24, 24, 8, 12,140,156,254,255, 51,129,192,192,224,224,224,224,224,192,192,192,224,224,224, 0, 0, 0, 0,192,192,224, 96, 0, 0, 0,240,254,255,255,135,192,224,224,224,224,224,128, 0, 0,128,128,192,224, 96, 96,224,224,224,224,224, 96, 0, 0, 0,128,192,192,224,224,224,224,224, 64, 0,128,128,192,224, 96,224,224,224,224,224,224, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,128,192,252,255,255,127, 15, 1, 16, 24, 8, 12, 12, 12,132,134,198,238,127, 59,131, 0, 30, 63, 63,124,248,240,240, 3, 1,193,253,255,127, 7, 0, 0,128,240,254,255, 63, 7, 0,128,224,254,255,127, 7, 1, 0, 0,192,252,255,127, 63,251,252,255,127, 7, 1, 0,128,192,252,255,255, 31, 1,128,192,192, 30, 63, 63,124,248,240,240,193,224,252,255,255, 7, 1, 0,128,192,252,255,255, 31, 1,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
96,112,112, 48, 56, 28, 14, 15, 3, 3, 5, 4, 4, 6, 6, 2, 2, 2, 3, 3, 1, 1, 1, 1, 7, 7, 15, 31, 31, 12, 12, 12, 6, 7, 3, 1, 0, 0, 31, 31, 15, 14, 6, 7, 3, 15, 31, 15, 15, 7, 7, 3, 63, 31, 31, 31, 30, 14, 14, 6, 7, 3, 3, 1, 0, 0, 15, 31, 31, 15, 6, 6, 3, 11, 31, 15, 15, 7, 7, 7, 15, 31, 31, 12, 12, 12, 6, 7, 3, 1, 0, 15, 31, 31, 15, 6, 6, 3, 11, 31, 15, 15, 7, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
oled_write_raw_P(raw_scrl, sizeof(raw_scrl));
}


oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return rotation;
}


bool oled_task_user(void) {
kuriatsu marked this conversation as resolved.
Show resolved Hide resolved
render_scrl();
oled_set_cursor(14, 0);
oled_write_P(PSTR("WPM:"), false);
oled_write(get_u8_str(get_current_wpm(), ' '), false);
return false;
}
#endif
47 changes: 47 additions & 0 deletions keyboards/handwired/tsubasa/tsubasa.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* Copyright 2021 @kuriatsu
*
* 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( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R35, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, R40, R30, R31, R32, R33, R34, \
L40, L41, L42, L43, L44, R41, R42, R43, R44, R45 \
) { \
{ L00, L01, L02, L03, L04, L05 }, \
{ L10, L11, L12, L13, L14, L15 }, \
{ L20, L21, L22, L23, L24, L25 }, \
{ L30, L31, L32, L33, L34, L35 }, \
{ L40, L41, L42, L43, L44, KC_NO }, \
{ R00, R01, R02, R03, R04, R05 }, \
{ R10, R11, R12, R13, R14, R15 }, \
{ R20, R21, R22, R23, R24, R25 }, \
{ R30, R31, R32, R33, R34, R35 }, \
{ R40, R41, R42, R43, R44, R45 } \
}