diff options
| -rw-r--r-- | keyboards/ymd75/README.md | 10 | ||||
| -rw-r--r-- | keyboards/ymd75/config.h | 7 | ||||
| -rw-r--r-- | keyboards/ymd75/keymaps/default/keymap.c | 12 | ||||
| -rw-r--r-- | keyboards/ymd75/rev1/config.h | 27 | ||||
| -rw-r--r-- | keyboards/ymd75/rev1/rev1.c | 34 | ||||
| -rw-r--r-- | keyboards/ymd75/rev1/rev1.h | 39 | ||||
| -rw-r--r-- | keyboards/ymd75/rev1/rules.mk | 15 | ||||
| -rw-r--r-- | keyboards/ymd75/rev2/config.h | 8 | ||||
| -rw-r--r-- | keyboards/ymd75/rev2/rev2.c | 34 | ||||
| -rw-r--r-- | keyboards/ymd75/rev2/rev2.h | 18 | ||||
| -rw-r--r-- | keyboards/ymd75/rev2/rules.mk | 15 | ||||
| -rw-r--r-- | keyboards/ymd75/rules.mk | 18 | ||||
| -rw-r--r-- | keyboards/ymd75/ymd75.c | 33 | ||||
| -rw-r--r-- | keyboards/ymd75/ymd75.h | 56 |
14 files changed, 208 insertions, 118 deletions
diff --git a/keyboards/ymd75/README.md b/keyboards/ymd75/README.md index 9a618c594..7c4779c9f 100644 --- a/keyboards/ymd75/README.md +++ b/keyboards/ymd75/README.md | |||
| @@ -1,19 +1,19 @@ | |||
| 1 | # YMD75 / MT84 | 1 | # YMD75 / MT84 |
| 2 | 2 | ||
| 3 | 75% keyboard from YMDK. YMDK sell the board and name it "YMD75", however the PCB has "MT84" printed on both sides. | 3 | 75% keyboard from YMDK. YMDK sell the board and name it "YMD75", however revision 1 of the PCB has "MT84" printed on both sides. |
| 4 | 4 | ||
| 5 | * Keyboard Maintainer: [Wayne K Jones](github.com/WarmCatUK) | 5 | * Keyboard Maintainer: [Wayne K Jones](github.com/WarmCatUK) |
| 6 | * Hardware Supported: YMD75/MT84 with the ATmega32a chip. | 6 | * Hardware Supported: YMD75/MT84 (rev1 and rev2) with the ATmega32a chip. |
| 7 | * Hardware Availability: <https://www.aliexpress.com/item/32812690592.html> | 7 | * Hardware Availability: <https://www.aliexpress.com/item/32812690592.html> |
| 8 | 8 | ||
| 9 | Make example for this keyboard (after setting up your build environment): | 9 | Make example for this keyboard (after setting up your build environment): |
| 10 | 10 | ||
| 11 | make ymd75:default | 11 | make ymd75/rev1:default |
| 12 | 12 | ||
| 13 | Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) | 13 | Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) |
| 14 | 14 | ||
| 15 | make ymd75:default:flash | 15 | make ymd75/rev1:default:flash |
| 16 | 16 | ||
| 17 | **Reset Key**: Hold down the key located at *Key below the top right key*, commonly programmed as *Backspace* while plugging in the keyboard. | 17 | **Reset Key**: Hold down the key located at *Key below the top right key*, commonly programmed as *Backspace* while plugging in the keyboard. On PCB revision 2, enter the bootloader by holding `L_CTRL` while plugging in the keyboard. |
| 18 | 18 | ||
| 19 | 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). | 19 | 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). |
diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h index 8aa2bba41..0ea23bc46 100644 --- a/keyboards/ymd75/config.h +++ b/keyboards/ymd75/config.h | |||
| @@ -24,16 +24,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 24 | #define VENDOR_ID 0x20A0 | 24 | #define VENDOR_ID 0x20A0 |
| 25 | #define PRODUCT_ID 0x422D | 25 | #define PRODUCT_ID 0x422D |
| 26 | #define DEVICE_VER 0x0200 | 26 | #define DEVICE_VER 0x0200 |
| 27 | |||
| 27 | #define MANUFACTURER YMDK | 28 | #define MANUFACTURER YMDK |
| 28 | #define PRODUCT YMD75 / MT84 | 29 | #define PRODUCT YMD75 / MT84 |
| 29 | #define DESCRIPTION 75% Keyboard | 30 | #define DESCRIPTION 75% Keyboard |
| 30 | 31 | ||
| 31 | /* matrix size */ | ||
| 32 | #define MATRIX_ROWS 8 | ||
| 33 | #define MATRIX_COLS 15 | ||
| 34 | #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } | ||
| 35 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } | ||
| 36 | #define DIODE_DIRECTION COL2ROW | ||
| 37 | 32 | ||
| 38 | #define BACKLIGHT_PIN D4 | 33 | #define BACKLIGHT_PIN D4 |
| 39 | #define BACKLIGHT_LEVELS 12 | 34 | #define BACKLIGHT_LEVELS 12 |
diff --git a/keyboards/ymd75/keymaps/default/keymap.c b/keyboards/ymd75/keymaps/default/keymap.c index 17c5244bd..2b6412468 100644 --- a/keyboards/ymd75/keymaps/default/keymap.c +++ b/keyboards/ymd75/keymaps/default/keymap.c | |||
| @@ -82,12 +82,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 82 | if (record->event.pressed) { | 82 | if (record->event.pressed) { |
| 83 | switch(keycode) { | 83 | switch(keycode) { |
| 84 | case P_MACRO: | 84 | case P_MACRO: |
| 85 | SEND_STRING(SS_DOWN(X_LALT)); | 85 | register_code(KC_LALT); |
| 86 | SEND_STRING(SS_TAP(X_KP_1)); | 86 | tap_code(KC_KP_1); |
| 87 | SEND_STRING(SS_TAP(X_KP_5)); | 87 | tap_code(KC_KP_5); |
| 88 | SEND_STRING(SS_TAP(X_KP_6)); | 88 | tap_code(KC_KP_6); |
| 89 | SEND_STRING(SS_UP(X_LALT)); | 89 | unregister_code(KC_LALT); |
| 90 | return false; break; | 90 | return false; |
| 91 | } | 91 | } |
| 92 | } | 92 | } |
| 93 | return true; | 93 | return true; |
diff --git a/keyboards/ymd75/rev1/config.h b/keyboards/ymd75/rev1/config.h new file mode 100644 index 000000000..e9009ee0e --- /dev/null +++ b/keyboards/ymd75/rev1/config.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* | ||
| 2 | Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com> | ||
| 3 | Modified 2017 Andrew Novak <ndrw.nvk@gmail.com> | ||
| 4 | Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@gmail.com> | ||
| 5 | |||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 2 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #pragma once | ||
| 21 | |||
| 22 | /* matrix size */ | ||
| 23 | #define MATRIX_ROWS 8 | ||
| 24 | #define MATRIX_COLS 15 | ||
| 25 | #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } | ||
| 26 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } | ||
| 27 | #define DIODE_DIRECTION COL2ROW | ||
diff --git a/keyboards/ymd75/rev1/rev1.c b/keyboards/ymd75/rev1/rev1.c new file mode 100644 index 000000000..0870a6cc0 --- /dev/null +++ b/keyboards/ymd75/rev1/rev1.c | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include "ymd75.h" | ||
| 19 | |||
| 20 | void keyboard_pre_init_kb(void) { | ||
| 21 | led_init_ports(); | ||
| 22 | keyboard_pre_init_user(); | ||
| 23 | } | ||
| 24 | |||
| 25 | void led_init_ports(void) { | ||
| 26 | setPinOutput(D1); | ||
| 27 | } | ||
| 28 | |||
| 29 | bool led_update_kb(led_t led_state) { | ||
| 30 | if (led_update_user(led_state)) { | ||
| 31 | writePin(D1, led_state.caps_lock); | ||
| 32 | } | ||
| 33 | return true; | ||
| 34 | } | ||
diff --git a/keyboards/ymd75/rev1/rev1.h b/keyboards/ymd75/rev1/rev1.h new file mode 100644 index 000000000..0a426ffa5 --- /dev/null +++ b/keyboards/ymd75/rev1/rev1.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | /* | ||
| 2 | Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com> | ||
| 3 | Modified 2017 Andrew Novak <ndrw.nvk@gmail.com> | ||
| 4 | Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@gmail.com> | ||
| 5 | |||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 2 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #pragma once | ||
| 21 | #include "quantum.h" | ||
| 22 | |||
| 23 | #define LAYOUT( \ | ||
| 24 | K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ | ||
| 25 | K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ | ||
| 26 | K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ | ||
| 27 | K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ | ||
| 28 | K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ | ||
| 29 | K00, K10, K20, K56, K57, KB0, KC0, K96, K76, K66 \ | ||
| 30 | ){ \ | ||
| 31 | { K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KC_NO }, \ | ||
| 32 | { K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \ | ||
| 33 | { K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \ | ||
| 34 | { K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \ | ||
| 35 | { K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \ | ||
| 36 | { K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ | ||
| 37 | { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ | ||
| 38 | { K07, K17, K27, K37, K47, K57, K67, K77, KE0, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ | ||
| 39 | } | ||
diff --git a/keyboards/ymd75/rev1/rules.mk b/keyboards/ymd75/rev1/rules.mk new file mode 100644 index 000000000..66ffbb499 --- /dev/null +++ b/keyboards/ymd75/rev1/rules.mk | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # build options | ||
| 2 | BOOTMAGIC_ENABLE = yes | ||
| 3 | MOUSEKEY_ENABLE = no | ||
| 4 | EXTRAKEY_ENABLE = yes | ||
| 5 | CONSOLE_ENABLE = no | ||
| 6 | COMMAND_ENABLE = yes | ||
| 7 | BACKLIGHT_ENABLE = yes | ||
| 8 | RGBLIGHT_ENABLE = yes | ||
| 9 | WS2812_DRIVER = i2c | ||
| 10 | NKRO_ENABLE = no | ||
| 11 | # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 12 | |||
| 13 | KEY_LOCK_ENABLE = yes | ||
| 14 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 15 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
diff --git a/keyboards/ymd75/rev2/config.h b/keyboards/ymd75/rev2/config.h new file mode 100644 index 000000000..9718b19dd --- /dev/null +++ b/keyboards/ymd75/rev2/config.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | /* matrix size */ | ||
| 4 | #define MATRIX_ROWS 6 | ||
| 5 | #define MATRIX_COLS 15 | ||
| 6 | #define MATRIX_ROW_PINS { B7, B6, B5, B4, B3, B0 } | ||
| 7 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } | ||
| 8 | #define DIODE_DIRECTION COL2ROW | ||
diff --git a/keyboards/ymd75/rev2/rev2.c b/keyboards/ymd75/rev2/rev2.c new file mode 100644 index 000000000..0870a6cc0 --- /dev/null +++ b/keyboards/ymd75/rev2/rev2.c | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include "ymd75.h" | ||
| 19 | |||
| 20 | void keyboard_pre_init_kb(void) { | ||
| 21 | led_init_ports(); | ||
| 22 | keyboard_pre_init_user(); | ||
| 23 | } | ||
| 24 | |||
| 25 | void led_init_ports(void) { | ||
| 26 | setPinOutput(D1); | ||
| 27 | } | ||
| 28 | |||
| 29 | bool led_update_kb(led_t led_state) { | ||
| 30 | if (led_update_user(led_state)) { | ||
| 31 | writePin(D1, led_state.caps_lock); | ||
| 32 | } | ||
| 33 | return true; | ||
| 34 | } | ||
diff --git a/keyboards/ymd75/rev2/rev2.h b/keyboards/ymd75/rev2/rev2.h new file mode 100644 index 000000000..b2dd7b8e1 --- /dev/null +++ b/keyboards/ymd75/rev2/rev2.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | #pragma once | ||
| 2 | #include "quantum.h" | ||
| 3 | |||
| 4 | #define LAYOUT( \ | ||
| 5 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K514, \ | ||
| 6 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K513, \ | ||
| 7 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ | ||
| 8 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ | ||
| 9 | K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \ | ||
| 10 | K500, K501, K502, K505, K506, K507, K508, K509, K510, K511 \ | ||
| 11 | ) { \ | ||
| 12 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ | ||
| 13 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \ | ||
| 14 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ | ||
| 15 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ | ||
| 16 | { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ | ||
| 17 | { K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \ | ||
| 18 | } | ||
diff --git a/keyboards/ymd75/rev2/rules.mk b/keyboards/ymd75/rev2/rules.mk new file mode 100644 index 000000000..66ffbb499 --- /dev/null +++ b/keyboards/ymd75/rev2/rules.mk | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # build options | ||
| 2 | BOOTMAGIC_ENABLE = yes | ||
| 3 | MOUSEKEY_ENABLE = no | ||
| 4 | EXTRAKEY_ENABLE = yes | ||
| 5 | CONSOLE_ENABLE = no | ||
| 6 | COMMAND_ENABLE = yes | ||
| 7 | BACKLIGHT_ENABLE = yes | ||
| 8 | RGBLIGHT_ENABLE = yes | ||
| 9 | WS2812_DRIVER = i2c | ||
| 10 | NKRO_ENABLE = no | ||
| 11 | # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 12 | |||
| 13 | KEY_LOCK_ENABLE = yes | ||
| 14 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 15 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk index 9d584b2b4..437f9f4a5 100644 --- a/keyboards/ymd75/rules.mk +++ b/keyboards/ymd75/rules.mk | |||
| @@ -11,20 +11,4 @@ MCU = atmega32a | |||
| 11 | # ATmega328P USBasp | 11 | # ATmega328P USBasp |
| 12 | BOOTLOADER = bootloadHID | 12 | BOOTLOADER = bootloadHID |
| 13 | 13 | ||
| 14 | # build options | 14 | DEFAULT_FOLDER = ymd75/rev1 |
| 15 | BOOTMAGIC_ENABLE = yes | ||
| 16 | MOUSEKEY_ENABLE = no | ||
| 17 | EXTRAKEY_ENABLE = yes | ||
| 18 | CONSOLE_ENABLE = no | ||
| 19 | COMMAND_ENABLE = yes | ||
| 20 | BACKLIGHT_ENABLE = yes | ||
| 21 | RGBLIGHT_ENABLE = yes | ||
| 22 | WS2812_DRIVER = i2c | ||
| 23 | NKRO_ENABLE = no | ||
| 24 | # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 25 | |||
| 26 | DISABLE_WS2812 = no | ||
| 27 | |||
| 28 | KEY_LOCK_ENABLE = yes | ||
| 29 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 30 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
diff --git a/keyboards/ymd75/ymd75.c b/keyboards/ymd75/ymd75.c index 0870a6cc0..2fca021f7 100644 --- a/keyboards/ymd75/ymd75.c +++ b/keyboards/ymd75/ymd75.c | |||
| @@ -1,34 +1 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include "ymd75.h" | #include "ymd75.h" | |
| 19 | |||
| 20 | void keyboard_pre_init_kb(void) { | ||
| 21 | led_init_ports(); | ||
| 22 | keyboard_pre_init_user(); | ||
| 23 | } | ||
| 24 | |||
| 25 | void led_init_ports(void) { | ||
| 26 | setPinOutput(D1); | ||
| 27 | } | ||
| 28 | |||
| 29 | bool led_update_kb(led_t led_state) { | ||
| 30 | if (led_update_user(led_state)) { | ||
| 31 | writePin(D1, led_state.caps_lock); | ||
| 32 | } | ||
| 33 | return true; | ||
| 34 | } | ||
diff --git a/keyboards/ymd75/ymd75.h b/keyboards/ymd75/ymd75.h index 0c9fff58c..afeb09567 100644 --- a/keyboards/ymd75/ymd75.h +++ b/keyboards/ymd75/ymd75.h | |||
| @@ -1,55 +1,9 @@ | |||
| 1 | /* | 1 | #pragma once |
| 2 | Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com> | ||
| 3 | Modified 2017 Andrew Novak <ndrw.nvk@gmail.com> | ||
| 4 | Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@gmail.com> | ||
| 5 | |||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 2 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef KEYMAP_COMMON_H | ||
| 21 | #define KEYMAP_COMMON_H | ||
| 22 | 2 | ||
| 23 | #include "quantum.h" | 3 | #include "quantum.h" |
| 24 | #include "quantum_keycodes.h" | ||
| 25 | #include "keycode.h" | ||
| 26 | #include "action.h" | ||
| 27 | |||
| 28 | #define LAYOUT( \ | ||
| 29 | K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ | ||
| 30 | K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ | ||
| 31 | K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ | ||
| 32 | K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ | ||
| 33 | K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ | ||
| 34 | K00, K10, K20, K56, K57, KB0, KC0, K96, K76, K66 \ | ||
| 35 | ){ \ | ||
| 36 | { K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KC_NO }, \ | ||
| 37 | { K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \ | ||
| 38 | { K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \ | ||
| 39 | { K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \ | ||
| 40 | { K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \ | ||
| 41 | { K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ | ||
| 42 | { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ | ||
| 43 | { K07, K17, K27, K37, K47, K57, K67, K77, KE0, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ | ||
| 44 | } | ||
| 45 | 4 | ||
| 5 | #if defined(KEYBOARD_ymd75_rev1) | ||
| 6 | #include "rev1.h" | ||
| 7 | #elif defined(KEYBOARD_ymd75_rev2) | ||
| 8 | #include "rev2.h" | ||
| 46 | #endif | 9 | #endif |
| 47 | |||
| 48 | |||
| 49 | |||
| 50 | |||
| 51 | |||
| 52 | |||
| 53 | |||
| 54 | |||
| 55 | |||
