summaryrefslogtreecommitdiff
path: root/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb
diff options
context:
space:
mode:
authorPurdea Andrei <andrei@purdea.ro>2023-04-03 08:45:46 +0300
committerGitHub <noreply@github.com>2023-04-03 15:45:46 +1000
commitc58610bea35d3dcf362b11064830f51c97df91a4 (patch)
treeaaaa03814c7945065ba9a6f09cfeda5ac60e8af0 /keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb
parent12de0297edc601be867ea4e32b741967e88a2847 (diff)
Data-driven updates to overnumpad controller keyboards (#20259)
Diffstat (limited to 'keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb')
-rw-r--r--keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h34
-rw-r--r--keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/info.json18
-rw-r--r--keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c7
-rw-r--r--keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.h88
4 files changed, 25 insertions, 122 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
index 88eb8c2c51..71e60e9cfe 100644
--- a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h
+++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h
@@ -15,41 +15,17 @@
*/
#pragma once
+#define DEF_SERIAL_NUMBER "purdea.ro:overnumpad_controller"
-#define SERIAL_NUMBER "purdea.ro:overnumpad_controller"
-
-/*
- * 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 }
-
-/* COL2ROW, ROW2COL*/
-#define DIODE_DIRECTION ROW2COL
-
-/* define if matrix has ghost (lacks anti-ghosting diodes) */
-#define MATRIX_HAS_GHOST
+#ifndef SERIAL_NUMBER
+#define SERIAL_NUMBER DEF_SERIAL_NUMBER
+#endif
#define STM32_HSECLK 16000000
#define SOLENOID_PIN B5
#define HAPTIC_ENABLE_PIN C13
-#define SOLENOID_DEFAULT_DWELL 4
+#define SOLENOID_DEFAULT_DWELL 20
#define SOLENOID_MIN_DWELL 4
#define HAPTIC_OFF_IN_LOW_POWER 1
#define NO_HAPTIC_MOD
diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/info.json b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/info.json
new file mode 100644
index 0000000000..cf25addc9e
--- /dev/null
+++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/info.json
@@ -0,0 +1,18 @@
+{
+ "keyboard_name": "Unicomp Spacesaver M (post-2013)",
+ "manufacturer": "Unicomp/Purdea Andrei",
+ "url": "https://github.com/purdeaandrei/overnumpad_controller_1xb",
+ "maintainer": "purdeaandrei",
+ "indicators": {
+ "caps_lock": "C12"
+ },
+ "processor": "STM32F446", // RET6
+ "bootloader": "stm32-dfu",
+ "diode_direction": "ROW2COL",
+ "matrix_pins": {
+ // The controller to membrane interface has pads left-to-right, as seen on the keyboard, matching
+ // the order listed below: all columns followed by all rows, (also followed by unused gpio "A10"):
+ "cols": ["C3", "C2", "C1", "C0", "A3", "A4", "A5", "A6", "A7", "C4", "C5", "B0", "B1", "B10", "B12", "B13"],
+ "rows": ["B14", "B15", "C6", "C7", "C8", "C9", "A8", "A9"]
+ }
+}
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
index eda367804d..f0c1161cfe 100644
--- a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c
+++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c
@@ -14,18 +14,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "overnumpad_1xb.h"
+#include "quantum.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
+ // C12 is the left-most led, normally Num Lock, but on Spacesaver M it's Caps Lock. Configured in info.json
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
-
- //debug_enable=true;
- //debug_matrix=true;
}
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
deleted file mode 100644
index faffbcd4ec..0000000000
--- a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* 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 } \
-}