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 YDKB Grape PCB #16661

Merged
merged 7 commits into from
Mar 26, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
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
57 changes: 57 additions & 0 deletions keyboards/ydkb/grape/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/* Copyright 2022 somepin
*
* 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 0x5945 // "YE"
#define PRODUCT_ID 0x6772 // "GR"
#define DEVICE_VER 0x0001
#define MANUFACTURER YDKB
#define PRODUCT Grape

/* key matrix size */
#define MATRIX_ROWS 7
#define MATRIX_COLS 18

#define MATRIX_COL_PINS { F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, B3, B2, B1, B0 }

#define SN74X138_ADDRESS_PINS { D2, D1, D0 }

#define LED_NUM_LOCK_PIN F1
#define LED_CAPS_LOCK_PIN F0
#define LED_SCROLL_LOCK_PIN E6
#define LED_PIN_ON_STATE 0

#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3

#ifdef RGBLIGHT_ENABLE
#define RGB_DI_PIN E6
#define RGBLED_NUM 4
#endif

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

#define DYNAMIC_KEYMAP_LAYER_COUNT 3
16 changes: 16 additions & 0 deletions keyboards/ydkb/grape/grape.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* Copyright 2022 somepin
*
* 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 "grape.h"
47 changes: 47 additions & 0 deletions keyboards/ydkb/grape/grape.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* Copyright 2022 somepin
*
* 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"

#define XXX KC_NO

/* 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_all( \
K0A, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J, K0K, K0L, K0N, K0P, K0Q, K0R, K0S, \
K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1P, K1Q, K1R, K1S, \
K2P, K2Q, K2R, K2S, \
K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K1N, K3P, K3Q, K3R, K3S, \
K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K4P, K4Q, K4R, K4S, \
K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4N, K5Q, K5R, K5S, \
K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K4M, K5N, K6Q, K6R, K6S, \
K6A, K6B, K6C, K6E, K6F, K6H, K6I, K6J, K6K, K6L, K6M, K6N, K5P, K6P \
) { \
{ K0A, XXX, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J, K0K, K0L, XXX, K0N, K0P, K0Q, K0R, K0S }, \
{ XXX, XXX, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, XXX, K1N, K1P, K1Q, K1R, K1S }, \
{ K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2P, K2Q, K2R, K2S }, \
{ K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3P, K3Q, K3R, K3S }, \
{ K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4P, K4Q, K4R, K4S }, \
{ K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5P, K5Q, K5R, K5S }, \
{ K6A, K6B, K6C, XXX, K6E, K6F, XXX, K6H, K6I, K6J, K6K, K6L, K6M, K6N, K6P, K6Q, K6R, K6S } \
}
130 changes: 130 additions & 0 deletions keyboards/ydkb/grape/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"keyboard_name": "Grape",
"url": "https://item.taobao.com/item.htm?id=642205244150",
"maintainer": "Gacathon",
"layouts": {
"LAYOUT_all": {
"layout": [
{ "label": "Esc", "x": 0, "y": 0 },
{ "label": "F1", "x": 2, "y": 0 },
{ "label": "F2", "x": 3, "y": 0 },
{ "label": "F3", "x": 4, "y": 0 },
{ "label": "F4", "x": 5, "y": 0 },
{ "label": "F5", "x": 6, "y": 0 },
{ "label": "F6", "x": 7, "y": 0 },
{ "label": "Insert", "x": 8.5, "y": 0 },
{ "label": "Home", "x": 9.5, "y": 0 },
{ "label": "PgUp", "x": 10.5, "y": 0 },
{ "label": "PrtSc", "x": 11.5, "y": 0 },
{ "label": "Pause", "x": 13, "y": 0 },
{ "label": "Num Lock", "x": 16, "y": 0 },
{ "label": "/", "x": 17, "y": 0 },
{ "label": "*", "x": 18, "y": 0 },
{ "label": "-", "x": 19, "y": 0 },
{ "label": "F7", "x": 2, "y": 1 },
{ "label": "F8", "x": 3, "y": 1 },
{ "label": "F9", "x": 4, "y": 1 },
{ "label": "F10", "x": 5, "y": 1 },
{ "label": "F11", "x": 6, "y": 1 },
{ "label": "F12", "x": 7, "y": 1 },
{ "label": "Delete", "x": 8.5, "y": 1 },
{ "label": "End", "x": 9.5, "y": 1 },
{ "label": "PgDn", "x": 10.5, "y": 1 },
{ "label": "Scroll Lock", "x": 11.5, "y": 1 },
{ "label": "7", "x": 16, "y": 1 },
{ "label": "8", "x": 17, "y": 1 },
{ "label": "9", "x": 18, "y": 1 },
{ "label": "+", "x": 19, "y": 1 },
{ "label": "4", "x": 16, "y": 2 },
{ "label": "5", "x": 17, "y": 2 },
{ "label": "6", "x": 18, "y": 2 },
{ "label": "+", "x": 19, "y": 2 },
{ "label": "~", "x": 0, "y": 3 },
{ "label": "!", "x": 1, "y": 3 },
{ "label": "@", "x": 2, "y": 3 },
{ "label": "#", "x": 3, "y": 3 },
{ "label": "$", "x": 4, "y": 3 },
{ "label": "%", "x": 5, "y": 3 },
{ "label": "^", "x": 6, "y": 3 },
{ "label": "&", "x": 7, "y": 3 },
{ "label": "*", "x": 8, "y": 3 },
{ "label": "(", "x": 9, "y": 3 },
{ "label": ")", "x": 10, "y": 3 },
{ "label": "_", "x": 11, "y": 3 },
{ "label": "+", "x": 12, "y": 3 },
{ "label": "Bksp", "x": 13, "y": 3 },
{ "label": "Bksp", "x": 14, "y": 3 },
{ "label": "1", "x": 16, "y": 3 },
{ "label": "2", "x": 17, "y": 3 },
{ "label": "3", "x": 18, "y": 3 },
{ "label": "Enter", "x": 19, "y": 3 },
{ "label": "Tab", "x": 0, "y": 4, "w": 1.5 },
{ "label": "Q", "x": 1.5, "y": 4 },
{ "label": "W", "x": 2.5, "y": 4 },
{ "label": "E", "x": 3.5, "y": 4 },
{ "label": "R", "x": 4.5, "y": 4 },
{ "label": "T", "x": 5.5, "y": 4 },
{ "label": "Y", "x": 6.5, "y": 4 },
{ "label": "U", "x": 7.5, "y": 4 },
{ "label": "I", "x": 8.5, "y": 4 },
{ "label": "O", "x": 9.5, "y": 4 },
{ "label": "P", "x": 10.5, "y": 4 },
{ "label": "{", "x": 11.5, "y": 4 },
{ "label": "}", "x": 12.5, "y": 4 },
{ "label": "|", "x": 13.5, "y": 4, "w": 1.5 },
{ "label": "0", "x": 16, "y": 4 },
{ "label": "0", "x": 17, "y": 4 },
{ "label": ".", "x": 18, "y": 4 },
{ "label": "Enter", "x": 19, "y": 4 },
{ "label": "Caps Lock", "x": 0, "y": 5, "w": 1.75 },
{ "label": "A", "x": 1.75, "y": 5 },
{ "label": "S", "x": 2.75, "y": 5 },
{ "label": "D", "x": 3.75, "y": 5 },
{ "label": "F", "x": 4.75, "y": 5 },
{ "label": "G", "x": 5.75, "y": 5 },
{ "label": "H", "x": 6.75, "y": 5 },
{ "label": "J", "x": 7.75, "y": 5 },
{ "label": "K", "x": 8.75, "y": 5 },
{ "label": "L", "x": 9.75, "y": 5 },
{ "label": ":", "x": 10.75, "y": 5 },
{ "label": "\"", "x": 11.75, "y": 5 },
{ "label": "Enter", "x": 12.75, "y": 5, "w": 2.25 },
{ "label": "F13", "x": 16.5, "y": 5.25 },
{ "label": "F14", "x": 17.5, "y": 5.25 },
{ "label": "F15", "x": 18.5, "y": 5.25 },
{ "label": "Shift", "x": 0, "y": 6, "w": 1.25 },
{ "label": "Shift", "x": 1.25, "y": 6 },
{ "label": "Z", "x": 2.25, "y": 6 },
{ "label": "X", "x": 3.25, "y": 6 },
{ "label": "C", "x": 4.25, "y": 6 },
{ "label": "V", "x": 5.25, "y": 6 },
{ "label": "B", "x": 6.25, "y": 6 },
{ "label": "N", "x": 7.25, "y": 6 },
{ "label": "M", "x": 8.25, "y": 6 },
{ "label": "<", "x": 9.25, "y": 6 },
{ "label": ">", "x": 10.25, "y": 6 },
{ "label": "?", "x": 11.25, "y": 6 },
{ "label": "Shift", "x": 12.25, "y": 6 },
{ "label": "Shift", "x": 13.25, "y": 6 },
{ "label": "\u2191", "x": 14.5, "y": 6.25 },
{ "label": "F16", "x": 16.5, "y": 6.25 },
{ "label": "F17", "x": 17.5, "y": 6.25 },
{ "label": "F18", "x": 18.5, "y": 6.25 },
{ "label": "Ctrl", "x": 0, "y": 7 },
{ "label": "Win", "x": 1, "y": 7 },
{ "label": "Alt", "x": 2, "y": 7 },
{ "x": 3, "y": 7, "w": 3 },
{ "x": 6, "y": 7, "w": 3 },
{ "label": "Alt", "x": 9, "y": 7 },
{ "label": "Win", "x": 10, "y": 7 },
{ "label": "Menu", "x": 11, "y": 7 },
{ "label": "Ctrl", "x": 12, "y": 7 },
{ "label": "\u2190", "x": 13.5, "y": 7.25 },
{ "label": "\u2193", "x": 14.5, "y": 7.25 },
{ "label": "\u2192", "x": 15.5, "y": 7.25 },
{ "label": "BTN1", "x": 17, "y": 7.25 },
{ "label": "BTN2", "x": 18, "y": 7.25 }
]
}
}
}
29 changes: 29 additions & 0 deletions keyboards/ydkb/grape/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* Copyright 2022 somepin
*
* 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

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( \
somepin marked this conversation as resolved.
Show resolved Hide resolved
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, KC_PAUS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_END, KC_PGDN, KC_SLCK, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_GRV, 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_BSPC, KC_BSPC, KC_P1, KC_P2, KC_P3, KC_PENT,
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_BSLS, KC_P0, KC_P0, KC_PDOT, KC_PENT,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_F13, KC_F14, KC_F15,
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_F16, KC_F17, KC_F18,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_BTN1, KC_BTN2
)
};
51 changes: 51 additions & 0 deletions keyboards/ydkb/grape/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* Copyright 2022 somepin
*
* 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

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( \
somepin marked this conversation as resolved.
Show resolved Hide resolved
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, KC_PAUS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_END, KC_PGDN, KC_SLCK, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_GRV, 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_BSPC, KC_BSPC, KC_P1, KC_P2, KC_P3, KC_PENT,
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_BSLS, KC_P0, KC_P0, KC_PDOT, KC_PENT,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_F13, KC_F14, KC_F15,
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_F16, KC_F17, KC_F18,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_BTN1, KC_BTN2
),

[1] = LAYOUT_all( \
somepin marked this conversation as resolved.
Show resolved Hide resolved
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),

[2] = LAYOUT_all( \
somepin marked this conversation as resolved.
Show resolved Hide resolved
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
2 changes: 2 additions & 0 deletions keyboards/ydkb/grape/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
Loading