summaryrefslogtreecommitdiff
path: root/keyboards/kapl/rev1
diff options
context:
space:
mode:
authorAlexander <7888825+keyzog@users.noreply.github.com>2022-02-09 08:19:54 +0300
committerGitHub <noreply@github.com>2022-02-08 21:19:54 -0800
commit71a48a01023449f9559f41d751fbedbdadfb1c46 (patch)
tree57dc40753045528a0ceab3cac3089eee5f2292d9 /keyboards/kapl/rev1
parent04020da48cef186cd58f7782a090116f90ca2008 (diff)
[Keyboard] Add Kapl (#16255)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/kapl/rev1')
-rw-r--r--keyboards/kapl/rev1/config.h55
-rw-r--r--keyboards/kapl/rev1/rev1.c55
-rw-r--r--keyboards/kapl/rev1/rev1.h34
-rw-r--r--keyboards/kapl/rev1/rules.mk5
4 files changed, 149 insertions, 0 deletions
diff --git a/keyboards/kapl/rev1/config.h b/keyboards/kapl/rev1/config.h
new file mode 100644
index 0000000000..12007a3a13
--- /dev/null
+++ b/keyboards/kapl/rev1/config.h
@@ -0,0 +1,55 @@
+// Copyright 2022 Alexander Lozyuk (@keyzog)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x4C41 // "LA" Lozyuk Alexander
+#define PRODUCT_ID 0x0001
+#define DEVICE_VER 0x0001
+#define MANUFACTURER keyzog
+#define PRODUCT Kapl Keyboard
+
+/* key matrix size */
+/* Rows are doubled up */
+#define MATRIX_ROWS 10
+#define MATRIX_COLS 7
+
+// wiring of each half
+#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
+#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 }
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+
+/* Serial settings */
+#define USE_SERIAL
+
+/* serial.c configuration for split keyboard */
+#define SOFT_SERIAL_PIN D2
+
+/* Select hand configuration */
+#define MASTER_LEFT
+
+#define RGB_DI_PIN D4
+#define RGBLED_NUM 88
+#define RGBLED_SPLIT { 44, 44 }
+#define RGBLIGHT_SPLIT
+#define RGBLIGHT_LIMIT_VAL 120 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
+
+#define DRIVER_LED_TOTAL 88
+#define RGB_MATRIX_SPLIT { 44, 44 }
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
+#define SPLIT_TRANSPORT_MIRROR
+
+/* 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 SPLIT_LAYER_STATE_ENABLE
+#define SPLIT_LED_STATE_ENABLE
diff --git a/keyboards/kapl/rev1/rev1.c b/keyboards/kapl/rev1/rev1.c
new file mode 100644
index 0000000000..b51021307e
--- /dev/null
+++ b/keyboards/kapl/rev1/rev1.c
@@ -0,0 +1,55 @@
+// Copyright 2022 Alexander Lozyuk (@keyzog)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#include "kapl.h"
+
+#ifdef RGB_MATRIX_ENABLE
+led_config_t g_led_config = { {
+ // Left Hand
+ // { 8, 7, 6, 5, 4, 3, 2, 1, 0 }, // underglow
+ { 9, 10, 11, 12, 13, 14, 15 },
+ { 22, 21, 20, 19, 18, 17, 16 },
+ { 23, 24, 25, 26, 27, 28, 29 },
+ { 36, 35, 34, 33, 32, 31, 30 },
+ { 37, 38, 39, 40, 41, 42, 43 },
+
+ // Right Hand
+ // { 44, 45, 46, 47, 48, 49, 50, 51, 52 }, // underglow
+ { 53, 54, 55, 56, 57, 58, 59 },
+ { 66, 65, 64, 63, 62, 61, 60 },
+ { 67, 68, 69, 70, 71, 72, 73 },
+ { 80, 79, 78, 77, 76, 75, 74 },
+ { 81, 82, 83, 84, 85, 86, 87 }
+}, {
+ // Left Hand
+ {96, 57}, {112, 44}, {112, 19}, {80, 19}, {48, 19}, {16, 19}, {16, 57}, {48, 57}, {80, 57}, // underglow
+ {0, 0}, {17, 0}, {34, 0}, {52, 0}, {69, 0}, {86, 0}, {103, 0},
+ {103, 16}, {86, 16}, {69, 16}, {52, 16}, {34, 16}, {17, 16}, {0, 16},
+ {0, 32}, {17, 32}, {34, 32}, {52, 32}, {69, 32}, {86, 32}, {103, 32},
+ {103, 48}, {86, 48}, {69, 48}, {52, 48}, {34, 48}, {17, 48}, {0, 48},
+ {0, 64}, {17, 64}, {34, 64}, {52, 64}, {69, 64}, {86, 64}, {103, 64},
+
+ // Right Hand
+ {144, 57}, {128, 44}, {128, 19}, {160, 19}, {192, 19}, {224, 19}, {224, 57}, {192, 57}, {160, 57}, // underglow
+ {224, 0}, {207, 0}, {190, 0}, {172, 0}, {155, 0}, {138, 0}, {121, 0},
+ {121, 16}, {138, 16}, {155, 16}, {172, 16}, {190, 16}, {207, 16}, {224, 16},
+ {224, 32}, {207, 32}, {190, 32}, {172, 32}, {155, 32}, {138, 32}, {121, 32},
+ {121, 48}, {138, 48}, {155, 48}, {172, 48}, {190, 48}, {207, 48}, {224, 48},
+ {224, 64}, {207, 64}, {190, 64}, {172, 64}, {155, 64}, {138, 64}, {121, 64}
+}, {
+ // Left Hand
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, // underglow
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 1, 1, 1, 1, 1, 1,
+
+ // Right Hand
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, // underglow
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 4, 4, 4, 4, 4, 1,
+ 1, 1, 1, 1, 1, 1, 1
+} };
+#endif
diff --git a/keyboards/kapl/rev1/rev1.h b/keyboards/kapl/rev1/rev1.h
new file mode 100644
index 0000000000..68649a7991
--- /dev/null
+++ b/keyboards/kapl/rev1/rev1.h
@@ -0,0 +1,34 @@
+// Copyright 2022 Alexander Lozyuk (@keyzog)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#include "kapl.h"
+
+/* This 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, L06, R00, R01, R02, R03, R04, R05, R06, \
+ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
+ L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
+ L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
+ L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \
+) \
+{ \
+ { L00, L01, L02, L03, L04, L05, L06 }, \
+ { L10, L11, L12, L13, L14, L15, L16 }, \
+ { L20, L21, L22, L23, L24, L25, L26 }, \
+ { L30, L31, L32, L33, L34, L35, L36 }, \
+ { L40, L41, L42, L43, L44, L45, L46 }, \
+ { R06, R05, R04, R03, R02, R01, R00 }, \
+ { R16, R15, R14, R13, R12, R11, R10 }, \
+ { R26, R25, R24, R23, R22, R21, R20 }, \
+ { R36, R35, R34, R33, R32, R31, R30 }, \
+ { R46, R45, R44, R43, R42, R41, R40 } \
+}
diff --git a/keyboards/kapl/rev1/rules.mk b/keyboards/kapl/rev1/rules.mk
new file mode 100644
index 0000000000..e3a4137694
--- /dev/null
+++ b/keyboards/kapl/rev1/rules.mk
@@ -0,0 +1,5 @@
+# Do not enable RGB_MATRIX_ENABLE together with RGBLIGHT_ENABLE
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = WS2812
+
+LTO_ENABLE = yes