summaryrefslogtreecommitdiff
path: root/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb
diff options
context:
space:
mode:
authorPurdea Andrei <andrei@purdea.ro>2021-09-22 00:09:01 +0300
committerGitHub <noreply@github.com>2021-09-21 14:09:01 -0700
commit376968ade4e102f7a526252599755af4c16dd525 (patch)
tree523ffe4d9a00ebb2b54a3caddc6163bb3766766d /keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb
parent8d32ddd8e948136a992ab3c10d13c7dbf9e1e119 (diff)
[Keyboard] Add 5 boards by the OverNumpad Controller (#14382)
* Add initial implementation of 5 keyboards supported by the OverNumpad Controller. * Apply suggestions from code review Co-authored-by: Drashna Jaelre <drashna@live.com> * Apply changes similar to other code review suggestions. * Apply suggestions from code review Co-authored-by: Drashna Jaelre <drashna@live.com> * Apply changes similar to other code review suggestions. * overnumpad controller info.jsons: update maintainer and url. * classic_ultracl_pre_2013: added support for the default 'fullsize_ansi' layout * classic_ultracl_pre_2013: moved the order of the iso enter key in the layout macro to be considered to be on the bottom row, like in the default fullsize_iso layout. Rename the iso layout to fullsize_iso, and enable it in rules.mk * Removed QMKBEST and QMKURL * Apply suggestions from code review Co-authored-by: Ryan <fauxpark@gmail.com> * Deleting empty files Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb')
-rw-r--r--keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h72
-rw-r--r--keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c45
-rw-r--r--keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.h88
-rw-r--r--keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/readme.md25
-rw-r--r--keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk25
5 files changed, 255 insertions, 0 deletions
diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h
new file mode 100644
index 0000000000..bfb1a9cf68
--- /dev/null
+++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h
@@ -0,0 +1,72 @@
+/* Copyright 2020 Purdea Andrei
+ *
+ * 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 0x16C0
+#define PRODUCT_ID 0x27DB
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Unicomp/Purdea Andrei
+#define PRODUCT Unicomp Spacesaver M
+#define SERIAL_NUMBER "purdea.ro:overnumpad_controller"
+
+/* key matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 16
+
+/*
+ * Keyboard Matrix Assignments
+ *
+ * Change this to how you wired your keyboard
+ * COLS: AVR pins used for columns, left to right
+ * ROWS: AVR pins used for rows, top to bottom
+ * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
+ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
+ *
+ */
+
+// All pins in order from left-to-right, as seen on the keyboard:
+// C3, C2, C1, C0, A3, A4, A5, A6, A7, C4, C5, B0, B1, B10, B12, B13, B14, B15, C6, C7, C8, C9, A8, A9, A10,
+// On this chip A10, B10 have stronger pull-ups, so it's better to avoid them if possible.
+
+// On this keyboard the right-most pin is not used, so that is A10.
+// On this keyboard the right-most 8 pins (excluding the unused pin) are routed on the bottom.
+
+#define MATRIX_COL_PINS { C3, C2, C1, C0, A3, A4, A5, A6, A7, C4, C5, B0, B1, B10, B12, B13 }
+#define MATRIX_ROW_PINS { B14, B15, C6, C7, C8, C9, A8, A9 }
+//#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION ROW2COL
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 5
+
+/* define if matrix has ghost (lacks anti-ghosting diodes) */
+#define MATRIX_HAS_GHOST
+
+#define STM32_HSECLK 16000000
+
+#define SOLENOID_PIN B5
+#define SOLENOID_DEFAULT_DWELL 4
+#define SOLENOID_MIN_DWELL 4
+#define NO_HAPTIC_MOD
+
+#define LED_CAPS_LOCK_PIN C12
+#define LED_ON_STATE 1
+// C11 and C10 are also leds, but C11 is not used in this keyboard, and C10 is configured in ${keyboard}.c
diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c
new file mode 100644
index 0000000000..41f51b7575
--- /dev/null
+++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c
@@ -0,0 +1,45 @@
+/* Copyright 2020 Purdea Andrei
+ *
+ * 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 "overnumpad_1xb.h"
+
+void keyboard_post_init_kb(void)
+{
+ // Led pins:
+ // C12 is the left-most led, normally Num Lock, but on Spacesaver M it's Caps Lock. Configured in config.h
+ setPinOutput(C11); // middle led, always off on Spacesaver M
+ writePin(C11, 0);
+ setPinOutput(C10); // right-most led, normally Scroll Lock, but on Spacesaver M indicates function layer
+ // Solenoid enable:
+ setPinOutput(C13);
+ writePin(C13, 1);
+
+ //debug_enable=true;
+ //debug_matrix=true;
+}
+
+
+layer_state_t layer_state_set_kb(layer_state_t state) {
+ switch (get_highest_layer(state)) {
+ case 0:
+ writePin(C10, 0);
+ break;
+ default:
+ writePin(C10, 1);
+ break;
+ }
+ return layer_state_set_user(state);
+}
diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.h b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.h
new file mode 100644
index 0000000000..faffbcd4ec
--- /dev/null
+++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.h
@@ -0,0 +1,88 @@
+/* Copyright 2020 Purdea Andrei
+ *
+ * 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"
+
+/* 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( \
+ k_esc, k_f1, k_f2, k_f3, k_f4, k_f5, k_f6, k_f7, k_f8, k_f9, k_f10, k_f11, k_f12, k_prscr, k_scrl, k_pause, \
+ k_tild, k_1, k_2, k_3, k_4, k_5, k_6, k_7, k_8, k_9, k_0, k_minus, k_equals, k_bsp_hidden, k_backspace, k_ins, k_home, k_pgup, kp_nl, kp_div, kp_mult, kp_minus, \
+ k_tab, k_q, k_w, k_e, k_r, k_t, k_y, k_u, k_i, k_o, k_p, k_squarebrop, k_squarebrcl, k_backsl, k_del, k_end, k_pgdn, kp_7, kp_8, kp_9, kp_plus, \
+ k_caps, k_a, k_s, k_d, k_f, k_g, k_h, k_j, k_k, k_l, k_semicolon, k_singlequote, k_nuhs,k_return, kp_4, kp_5, kp_6, kp_plus_hidden, \
+ k_lshift,k_nubs,k_z, k_x, k_c, k_v, k_b, k_n, k_m, k_cm,k_period, k_fwslash, k_rshift_hidden, k_rshift, k_up, kp_1, kp_2, kp_3, kp_enter, \
+ k_lctrl, k_lwin, k_lalt, k_code, k_space, k_1_d, k_6_4, k_rmenu, k_rctrl, k_left, k_down, k_right, kp_0_hidden, kp_0, kp_dot, kp_enter_hidden \
+) \
+{ \
+ /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ \
+ /* 0 */ { k_esc, k_pause, k_f3, k_f1, k_ins, k_3, k_4, k_6, k_f5, k_f7, k_f9, k_f11, k_prscr, k_right, k_scrl, KC_NO }, \
+ /* 1 */ { k_tab, KC_NO, k_del, k_pgdn, KC_NO, k_e, k_t, k_u, k_backspace, k_minus, k_down, k_end, k_home, k_1_d, KC_NO, k_caps }, \
+ /* 2 */ { k_1, k_bsp_hidden, kp_nl, k_pgup, k_code, k_i, k_r, k_y, k_equals, k_9, k_0, kp_mult, kp_div, k_up, k_lwin, KC_NO }, \
+ /* 3 */ { k_q, k_lshift, kp_9, k_2, KC_NO, k_k, k_f, k_h, k_squarebrcl, k_o, k_semicolon, kp_8, kp_7, KC_NO, KC_NO, k_lctrl }, \
+ /* 4 */ { k_a, KC_NO, kp_6, k_w, k_lalt, k_d, k_g, k_j, k_backsl, k_squarebrop, k_singlequote, kp_5, kp_4, k_rshift_hidden, kp_plus_hidden, KC_NO }, \
+ /* 5 */ { k_z, k_rshift, kp_dot, k_x, KC_NO, k_cm, k_b, k_m, k_return, k_period, k_p, kp_0, kp_1, KC_NO, kp_0_hidden, k_rctrl }, \
+ /* 6 */ { k_nubs, KC_NO, kp_3, k_s, k_6_4, k_c, k_v, k_n, k_left, k_l, k_fwslash, kp_2, kp_plus, k_nuhs, kp_enter_hidden, KC_NO }, \
+ /* 7 */ { k_tild, KC_NO, kp_minus, k_f2, k_f4, k_8, k_5, k_7, k_f6, k_f8, k_f10, k_f12, k_rmenu, k_space, kp_enter, KC_NO } \
+}
+
+#define LAYOUT_ansi( \
+ k_esc, k_f1, k_f2, k_f3, k_f4, k_f5, k_f6, k_f7, k_f8, k_f9, k_f10, k_f11, k_f12, k_prscr, k_scrl, k_pause, \
+ k_tild, k_1, k_2, k_3, k_4, k_5, k_6, k_7, k_8, k_9, k_0, k_minus, k_equals, k_backspace, k_ins, k_home, k_pgup, kp_nl, kp_div, kp_mult, kp_minus, \
+ k_tab, k_q, k_w, k_e, k_r, k_t, k_y, k_u, k_i, k_o, k_p, k_squarebrop, k_squarebrcl, k_backsl, k_del, k_end, k_pgdn, kp_7, kp_8, kp_9, kp_plus, \
+ k_caps, k_a, k_s, k_d, k_f, k_g, k_h, k_j, k_k, k_l, k_semicolon, k_singlequote, k_return, kp_4, kp_5, kp_6, kp_plus_hidden, \
+ k_lshift, k_z, k_x, k_c, k_v, k_b, k_n, k_m, k_cm,k_period, k_fwslash, k_rshift, k_up, kp_1, kp_2, kp_3, kp_enter, \
+ k_lctrl, k_lwin, k_lalt, k_space, k_1_d, k_6_4, k_rmenu, k_rctrl, k_left, k_down, k_right, kp_0, kp_dot \
+) \
+{ \
+ /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ \
+ /* 0 */ { k_esc, k_pause, k_f3, k_f1, k_ins, k_3, k_4, k_6, k_f5, k_f7, k_f9, k_f11, k_prscr, k_right, k_scrl, KC_NO }, \
+ /* 1 */ { k_tab, KC_NO, k_del, k_pgdn, KC_NO, k_e, k_t, k_u, k_backspace, k_minus, k_down, k_end, k_home, k_1_d, KC_NO, k_caps }, \
+ /* 2 */ { k_1, KC_NO, kp_nl, k_pgup, KC_NO, k_i, k_r, k_y, k_equals, k_9, k_0, kp_mult, kp_div, k_up, k_lwin, KC_NO }, \
+ /* 3 */ { k_q, k_lshift, kp_9, k_2, KC_NO, k_k, k_f, k_h, k_squarebrcl, k_o, k_semicolon, kp_8, kp_7, KC_NO, KC_NO, k_lctrl }, \
+ /* 4 */ { k_a, KC_NO, kp_6, k_w, k_lalt, k_d, k_g, k_j, k_backsl, k_squarebrop, k_singlequote, kp_5, kp_4, KC_NO, kp_plus_hidden, KC_NO }, \
+ /* 5 */ { k_z, k_rshift, kp_dot, k_x, KC_NO, k_cm, k_b, k_m, k_return, k_period, k_p, kp_0, kp_1, KC_NO, KC_NO, k_rctrl }, \
+ /* 6 */ { KC_NO, KC_NO, kp_3, k_s, k_6_4, k_c, k_v, k_n, k_left, k_l, k_fwslash, kp_2, kp_plus, KC_NO, KC_NO, KC_NO }, \
+ /* 7 */ { k_tild, KC_NO, kp_minus, k_f2, k_f4, k_8, k_5, k_7, k_f6, k_f8, k_f10, k_f12, k_rmenu, k_space, kp_enter, KC_NO } \
+}
+
+#define LAYOUT_iso( \
+ k_esc, k_f1, k_f2, k_f3, k_f4, k_f5, k_f6, k_f7, k_f8, k_f9, k_f10, k_f11, k_f12, k_prscr, k_scrl, k_pause, \
+ k_tild, k_1, k_2, k_3, k_4, k_5, k_6, k_7, k_8, k_9, k_0, k_minus, k_equals, k_backspace, k_ins, k_home, k_pgup, kp_nl, kp_div, kp_mult, kp_minus, \
+ k_tab, k_q, k_w, k_e, k_r, k_t, k_y, k_u, k_i, k_o, k_p, k_squarebrop, k_squarebrcl, k_return, k_del, k_end, k_pgdn, kp_7, kp_8, kp_9, kp_plus, \
+ k_caps, k_a, k_s, k_d, k_f, k_g, k_h, k_j, k_k, k_l, k_semicolon, k_singlequote, k_nuhs, kp_4, kp_5, kp_6, kp_plus_hidden, \
+ k_lshift,k_nubs,k_z, k_x, k_c, k_v, k_b, k_n, k_m, k_cm,k_period, k_fwslash, k_rshift, k_up, kp_1, kp_2, kp_3, kp_enter, \
+ k_lctrl, k_lwin, k_lalt, k_space, k_1_d, k_6_4, k_rmenu, k_rctrl, k_left, k_down, k_right, kp_0, kp_dot \
+) \
+{ \
+ /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ \
+ /* 0 */ { k_esc, k_pause, k_f3, k_f1, k_ins, k_3, k_4, k_6, k_f5, k_f7, k_f9, k_f11, k_prscr, k_right, k_scrl, KC_NO }, \
+ /* 1 */ { k_tab, KC_NO, k_del, k_pgdn, KC_NO, k_e, k_t, k_u, k_backspace, k_minus, k_down, k_end, k_home, k_1_d, KC_NO, k_caps }, \
+ /* 2 */ { k_1, KC_NO, kp_nl, k_pgup, KC_NO, k_i, k_r, k_y, k_equals, k_9, k_0, kp_mult, kp_div, k_up, k_lwin, KC_NO }, \
+ /* 3 */ { k_q, k_lshift, kp_9, k_2, KC_NO, k_k, k_f, k_h, k_squarebrcl, k_o, k_semicolon, kp_8, kp_7, KC_NO, KC_NO, k_lctrl }, \
+ /* 4 */ { k_a, KC_NO, kp_6, k_w, k_lalt, k_d, k_g, k_j, KC_NO, k_squarebrop, k_singlequote, kp_5, kp_4, KC_NO, kp_plus_hidden, KC_NO }, \
+ /* 5 */ { k_z, k_rshift, kp_dot, k_x, KC_NO, k_cm, k_b, k_m, k_return, k_period, k_p, kp_0, kp_1, KC_NO, KC_NO, k_rctrl }, \
+ /* 6 */ { k_nubs, KC_NO, kp_3, k_s, k_6_4, k_c, k_v, k_n, k_left, k_l, k_fwslash, kp_2, kp_plus, k_nuhs, KC_NO, KC_NO }, \
+ /* 7 */ { k_tild, KC_NO, kp_minus, k_f2, k_f4, k_8, k_5, k_7, k_f6, k_f8, k_f10, k_f12, k_rmenu, k_space, kp_enter, KC_NO } \
+}
diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/readme.md b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/readme.md
new file mode 100644
index 0000000000..0292269247
--- /dev/null
+++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/readme.md
@@ -0,0 +1,25 @@
+# unicomp/spacesaver_m_post_2013/overnumpad_1xb
+
+![unicomp/spacesaver_m_post_2013/overnumpad_1xb](https://www.pckeyboard.com/mm5/graphics/00000001/UB4ZPHA_800x343.jpg)
+
+Initially will support part number U242S6A, remains to be seen how compatible it is with other part numbers.
+
+* Keyboard Maintainer: [Purdea Andrei](https://github.com/purdeaandrei)
+* Hardware Supported: OverNumpad controller v1.Xb
+* Hardware Availability: TODO
+ * [controller](https://github.com/purdeaandrei/overnumpad_controller_1xb)
+ * [keyboard](https://www.pckeyboard.com/)
+
+To place the keyboard into bootloader mode in order to flash it, hold the ESC key while plugging the board in.
+It's possible to make this feature not work, by flashing the wrong firmware onto the keyboard.
+If that happens, open up the keyboard, and press the RST&PROG button to enter bootloader mode.
+
+Make example for this keyboard (after setting up your build environment):
+
+ make unicomp/spacesaver_m_post_2013/overnumpad_1xb:default
+
+Flashing example for this keyboard:
+
+ make unicomp/spacesaver_m_post_2013/overnumpad_1xb:default:flash
+
+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/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk
new file mode 100644
index 0000000000..507f4fcd37
--- /dev/null
+++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk
@@ -0,0 +1,25 @@
+# MCU name
+MCU = STM32F446 # STM32F446RET6
+
+# Bootloader selection
+BOOTLOADER = stm32-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # Enter bootloader mode when holding the ESC key.
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+ENCODER_ENABLE = no # Enable rotary encoder support
+AUDIO_ENABLE = no # Audio output
+KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra
+
+HAPTIC_ENABLE += SOLENOID