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

Move kbdpad_mk2 to kbdpad/mk2 and remove clutter #9221

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
70 changes: 70 additions & 0 deletions keyboards/kbdfans/kbdpad/mk2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
Copyright 2019 Ryota Goto

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 0xA103
#define PRODUCT_ID 0x0006
#define DEVICE_VER 0x0001
#define MANUFACTURER KBDfans
#define PRODUCT KBDPAD-MKII
#define DESCRIPTION Numpad

/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 4

/* Keyboard Matrix Assignments */
#define MATRIX_ROW_PINS { D3, D1, D2, C6, C7, B6 }
#define MATRIX_COL_PINS { C4, C5, B3, B2 }
#define UNUSED_PINS

/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW

/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
#define SOFT_SERIAL_PIN D0

Erovia marked this conversation as resolved.
Show resolved Hide resolved
#define BACKLIGHT_PIN B7
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 5
#endif
#define RGB_DI_PIN B5
#ifdef RGB_DI_PIN
#define RGBLED_NUM 16
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
/*== all animations enable ==*/
#define RGBLIGHT_ANIMATIONS
#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
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,10 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_6x4( /* Base */
KC_ESC, KC_LCTL, KC_LALT, KC_BSPC, \
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
KC_P7, KC_P8, KC_P9, KC_PPLS, \
KC_P4, KC_P5, KC_P6, KC_PPLS, \
KC_P1, KC_P2, KC_P3, KC_PENT, \
KC_P0, KC_P0, KC_PDOT, KC_PENT \
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
KC_P7, KC_P8, KC_P9, KC_PPLS, \
KC_P4, KC_P5, KC_P6, KC_PPLS, \
KC_P1, KC_P2, KC_P3, KC_PENT, \
KC_P0, KC_P0, KC_PDOT, KC_PENT \
),
};

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}

void matrix_init_user(void) {

}

void matrix_scan_user(void) {

}

void led_set_user(uint8_t usb_led) {

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

void matrix_init_kb(void) {

// Num Lock LED = B4
// Sinking setup (5V -> LED/Res -> Pin)

Expand All @@ -26,7 +26,7 @@ void matrix_init_kb(void) {
}

void led_set_kb(uint8_t usb_led) {
Erovia marked this conversation as resolved.
Show resolved Hide resolved

// Sinking setup. Write HIGH to turn OFF, LOW to turn ON.

if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
*/
#define LAYOUT_ortho_6x4( \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also supports numpad_6x4

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ai03-2725 could you help with this one?
Which 3 pads are not used with the numpad_6x4 layout on this pcb?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

K00, K01, K02, K03, \
K10, K11, K12, K13, \
K20, K21, K22, K23, \
K30, K31, K32, K33, \
K40, K41, K42, K43, \
K50, K51, K52, K53 \
K10, K11, K12, K13, \
K20, K21, K22, K23, \
K30, K31, K32, K33, \
K40, K41, K42, K43, \
K50, K51, K52, K53 \
) \
{ \
{ K00, K01, K02, K03 }, \
{ K10, K11, K12, K13 }, \
{ K20, K21, K22, K23 }, \
{ K30, K31, K32, K33 }, \
{ K40, K41, K42, K43 }, \
{ K50, K51, K52, K53 } \
{ K10, K11, K12, K13 }, \
{ K20, K21, K22, K23 }, \
{ K30, K31, K32, K33 }, \
{ K40, K41, K42, K43 }, \
{ K50, K51, K52, K53 } \
}
Loading