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 support for ymd75 rev3 #10483

Merged
merged 5 commits into from
Oct 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
5 changes: 4 additions & 1 deletion keyboards/ymd75/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
75% keyboard from YMDK. YMDK sell the board and name it "YMD75", however revision 1 of the PCB has "MT84" printed on both sides.

* Keyboard Maintainer: [Wayne K Jones](github.com/WarmCatUK)
* Hardware Supported: YMD75/MT84 (rev1 and rev2) with the ATmega32a chip.
* Hardware Supported:
- rev1 (ATmega32a)
- rev2 (ATmega32a)
- rev3 (ATmega32u4)
* Hardware Availability: <https://www.aliexpress.com/item/32812690592.html>

Make example for this keyboard (after setting up your build environment):
Expand Down
2 changes: 1 addition & 1 deletion keyboards/ymd75/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422D
#define DEVICE_VER 0x0200

#define MANUFACTURER YMDK
#define PRODUCT YMD75 / MT84
Expand All @@ -32,6 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 12
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 4
SoMuchForSubtlety marked this conversation as resolved.
Show resolved Hide resolved

#define RGB_DI_PIN E2
#define RGBLED_NUM 16
Expand Down
87 changes: 86 additions & 1 deletion keyboards/ymd75/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,92 @@
"height": 6,
"layouts": {
"LAYOUT": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Fn", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"End", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Up", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"Page Down", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"GUI", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}]
"layout": [
{"label":"Esc", "x":0, "y":0},
{"label":"F1", "x":1, "y":0},
{"label":"F2", "x":2, "y":0},
{"label":"F3", "x":3, "y":0},
{"label":"F4", "x":4, "y":0},
{"label":"F5", "x":5, "y":0},
{"label":"F6", "x":6, "y":0},
{"label":"F7", "x":7, "y":0},
{"label":"F8", "x":8, "y":0},
{"label":"F9", "x":9, "y":0},
{"label":"F10", "x":10, "y":0},
{"label":"F11", "x":11, "y":0},
{"label":"F12", "x":12, "y":0},
{"label":"PrtSc", "x":13, "y":0},
{"label":"Del", "x":14, "y":0},
{"label":"Fn", "x":15, "y":0},
{"label":"~", "x":0, "y":1},
{"label":"!", "x":1, "y":1},
{"label":"@", "x":2, "y":1},
{"label":"#", "x":3, "y":1},
{"label":"$", "x":4, "y":1},
{"label":"%", "x":5, "y":1},
{"label":"^", "x":6, "y":1},
{"label":"&", "x":7, "y":1},
{"label":"*", "x":8, "y":1},
{"label":"(", "x":9, "y":1},
{"label":")", "x":10, "y":1},
{"label":"_", "x":11, "y":1},
{"label":"+", "x":12, "y":1},
{"label":"Backspace", "x":13, "y":1, "w":2},
{"label":"Home", "x":15, "y":1},
{"label":"Tab", "x":0, "y":2, "w":1.5},
{"label":"Q", "x":1.5, "y":2},
{"label":"W", "x":2.5, "y":2},
{"label":"E", "x":3.5, "y":2},
{"label":"R", "x":4.5, "y":2},
{"label":"T", "x":5.5, "y":2},
{"label":"Y", "x":6.5, "y":2},
{"label":"U", "x":7.5, "y":2},
{"label":"I", "x":8.5, "y":2},
{"label":"O", "x":9.5, "y":2},
{"label":"P", "x":10.5, "y":2},
{"label":"{", "x":11.5, "y":2},
{"label":"}", "x":12.5, "y":2},
{"label":"|", "x":13.5, "y":2, "w":1.5},
{"label":"End", "x":15, "y":2},
{"label":"Caps Lock", "x":0, "y":3, "w":1.75},
{"label":"A", "x":1.75, "y":3},
{"label":"S", "x":2.75, "y":3},
{"label":"D", "x":3.75, "y":3},
{"label":"F", "x":4.75, "y":3},
{"label":"G", "x":5.75, "y":3},
{"label":"H", "x":6.75, "y":3},
{"label":"J", "x":7.75, "y":3},
{"label":"K", "x":8.75, "y":3},
{"label":"L", "x":9.75, "y":3},
{"label":":", "x":10.75, "y":3},
{"label":"\"", "x":11.75, "y":3},
{"label":"Enter", "x":12.75, "y":3, "w":2.25},
{"label":"Page Up", "x":15, "y":3},
{"label":"Shift", "x":0, "y":4, "w":2.25},
{"label":"Z", "x":2.25, "y":4},
{"label":"X", "x":3.25, "y":4},
{"label":"C", "x":4.25, "y":4},
{"label":"V", "x":5.25, "y":4},
{"label":"B", "x":6.25, "y":4},
{"label":"N", "x":7.25, "y":4},
{"label":"M", "x":8.25, "y":4},
{"label":"<", "x":9.25, "y":4},
{"label":">", "x":10.25, "y":4},
{"label":"?", "x":11.25, "y":4},
{"label":"Shift", "x":12.25, "y":4, "w":1.75},
{"label":"\u2191", "x":14, "y":4},
{"label":"Page Down", "x":15, "y":4},
{"label":"Ctrl", "x":0, "y":5, "w":1.25},
{"label":"GUI", "x":1.25, "y":5, "w":1.25},
{"label":"Alt", "x":2.5, "y":5, "w":1.25},
{"x":3.75, "y":5, "w":6.25},
{"label":"Alt", "x":10, "y":5},
{"label":"Fn", "x":11, "y":5},
{"label":"Ctrl", "x":12, "y":5},
{"label":"\u2190", "x":13, "y":5},
{"label":"\u2193", "x":14, "y":5},
{"label":"\u2192", "x":15, "y":5}
]
},
"LAYOUT_75_iso": {
"layout": [
Expand Down
6 changes: 3 additions & 3 deletions keyboards/ymd75/keymaps/default_iso/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[1] = LAYOUT_75_iso(
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT,
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT,
/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU,
/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD,
RGB_MOD, RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_VOLD,
/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, _______, _______, _______, _______, _______, _______, _______,
/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
Expand Down
1 change: 1 addition & 0 deletions keyboards/ymd75/rev1/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
#define DIODE_DIRECTION COL2ROW
#define DEVICE_VER 0x0100
1 change: 1 addition & 0 deletions keyboards/ymd75/rev2/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
#define MATRIX_ROW_PINS { B7, B6, B5, B4, B3, B0 }
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
#define DIODE_DIRECTION COL2ROW
#define DEVICE_VER 0x0200
2 changes: 1 addition & 1 deletion keyboards/ymd75/rev2/rev2.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \
{ K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \
{ K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \
}

#define LAYOUT_75_iso_rwkl( \
Expand Down
8 changes: 8 additions & 0 deletions keyboards/ymd75/rev3/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#pragma once

#define MATRIX_ROWS 12
#define MATRIX_COLS 9
#define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 }
#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 }
#define DIODE_DIRECTION ROW2COL
#define DEVICE_VER 0x0300
32 changes: 32 additions & 0 deletions keyboards/ymd75/rev3/rev3.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
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 "ymd75.h"

void keyboard_pre_init_kb(void) {
led_init_ports();
keyboard_pre_init_user();
}

void led_init_ports(void) { setPinOutput(D1); }

bool led_update_kb(led_t led_state) {
if (led_update_user(led_state)) {
writePin(D1, led_state.caps_lock);
}
return true;
}
Loading