aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorholtenc <holtenc@gmail.com>2020-02-29 19:42:50 -0600
committerGitHub <noreply@github.com>2020-02-29 17:42:50 -0800
commitbb472364909aa8ad0ff8efb76a428df2960e1a7c (patch)
treea20da4f3d8cd3b372ef13454fbfb16a2c2baed50
parentf5d1409c26582a2751e36f5fd93c4c19c67b9201 (diff)
downloadqmk_firmware-bb472364909aa8ad0ff8efb76a428df2960e1a7c.tar.gz
qmk_firmware-bb472364909aa8ad0ff8efb76a428df2960e1a7c.zip
Add VIA support to Prime_M. Clean up all files (#8247)
* Add VIA support for Prime_L * Update keyboards/primekb/prime_l/v1/config.h * Add prime_exl_plus keyboard * Temporary removal of prime_exl_plus * Add Prime_EXL Plus, including VIA support * Update keyboards/handwired/prime_exl_plus/readme.md * Update keyboards/handwired/prime_exl_plus/readme.md * Update keyboards/handwired/prime_exl_plus/readme.md * Update keyboards/handwired/prime_exl_plus/rules.mk * Update keyboards/handwired/prime_exl_plus/info.json * Update keyboards/handwired/prime_exl_plus/info.json * Update keyboards/handwired/prime_exl_plus/info.json * Update keymap.c * correct spacing of keymaps and layout macro. move indicator logic from user space to keyboard space * further corrections to keymaps and layout macro. * Update keyboards/handwired/prime_exl_plus/prime_exl_plus.c * Update keyboards/handwired/prime_exl_plus/prime_exl_plus.c * Update keyboards/handwired/prime_exl_plus/prime_exl_plus.c * Update keyboards/handwired/prime_exl_plus/prime_exl_plus.c * Update prime_exl_plus.c * small edit to prime_exl_plus.c * Add via support to Prime_M and clean things up * Update rules.mk * Update keyboards/primekb/prime_m/readme.md * Update keyboards/primekb/prime_m/readme.md * Update keyboards/primekb/prime_m/config.h
-rw-r--r--keyboards/primekb/prime_m/config.h5
-rw-r--r--keyboards/primekb/prime_m/keymaps/default/config.h19
-rw-r--r--keyboards/primekb/prime_m/keymaps/default/keymap.c40
-rw-r--r--keyboards/primekb/prime_m/keymaps/default/readme.md2
-rw-r--r--keyboards/primekb/prime_m/keymaps/numpad/config.h19
-rw-r--r--keyboards/primekb/prime_m/keymaps/numpad/readme.md2
-rw-r--r--keyboards/primekb/prime_m/keymaps/via/keymap.c51
-rw-r--r--keyboards/primekb/prime_m/keymaps/via/readme.md1
-rw-r--r--keyboards/primekb/prime_m/keymaps/via/rules.mk1
-rw-r--r--keyboards/primekb/prime_m/prime_m.c28
-rw-r--r--keyboards/primekb/prime_m/readme.md7
-rw-r--r--keyboards/primekb/prime_m/rules.mk24
12 files changed, 75 insertions, 124 deletions
diff --git a/keyboards/primekb/prime_m/config.h b/keyboards/primekb/prime_m/config.h
index 75731abf7..55c470b80 100644
--- a/keyboards/primekb/prime_m/config.h
+++ b/keyboards/primekb/prime_m/config.h
@@ -1,5 +1,6 @@
1/* 1/*
2Copyright 2018 Jumail Mundekkat 2Copyright 2018 Jumail Mundekkat
3Copyright 2020 Holten Campbell
3 4
4This program is free software: you can redistribute it and/or modify 5This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by 6it under the terms of the GNU General Public License as published by
@@ -20,8 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20#include "config_common.h" 21#include "config_common.h"
21 22
22/* USB Device descriptor parameter */ 23/* USB Device descriptor parameter */
23#define VENDOR_ID 0xFEED 24#define VENDOR_ID 0x5052 // "PR"
24#define PRODUCT_ID 0x4024 25#define PRODUCT_ID 0x504D // "PM"
25#define DEVICE_VER 0x0001 26#define DEVICE_VER 0x0001
26#define MANUFACTURER PrimeKB 27#define MANUFACTURER PrimeKB
27#define PRODUCT Prime_M 28#define PRODUCT Prime_M
diff --git a/keyboards/primekb/prime_m/keymaps/default/config.h b/keyboards/primekb/prime_m/keymaps/default/config.h
deleted file mode 100644
index 95917a65c..000000000
--- a/keyboards/primekb/prime_m/keymaps/default/config.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/* Copyright 2018 Jumail Mundekkat
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19// place overrides here
diff --git a/keyboards/primekb/prime_m/keymaps/default/keymap.c b/keyboards/primekb/prime_m/keymaps/default/keymap.c
index 6834624d8..101e82f82 100644
--- a/keyboards/primekb/prime_m/keymaps/default/keymap.c
+++ b/keyboards/primekb/prime_m/keymaps/default/keymap.c
@@ -15,12 +15,6 @@
15 */ 15 */
16#include QMK_KEYBOARD_H 16#include QMK_KEYBOARD_H
17 17
18// Defines the keycodes used by our macros in process_record_user
19enum custom_keycodes {
20 QMKBEST = SAFE_RANGE,
21 QMKURL
22};
23
24const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 [0] = LAYOUT_ortho_5x6( 19 [0] = LAYOUT_ortho_5x6(
26 KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, LT(2, KC_BSPC), 20 KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, LT(2, KC_BSPC),
@@ -46,37 +40,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
46 _______, _______, _______, _______, KC_MUTE, KC_VOLD 40 _______, _______, _______, _______, KC_MUTE, KC_VOLD
47 ) 41 )
48}; 42};
49
50bool process_record_user(uint16_t keycode, keyrecord_t *record) {
51 switch (keycode) {
52 case QMKBEST:
53 if (record->event.pressed) {
54 // when keycode QMKBEST is pressed
55 SEND_STRING("QMK is the best thing ever!");
56 } else {
57 // when keycode QMKBEST is released
58 }
59 break;
60 case QMKURL:
61 if (record->event.pressed) {
62 // when keycode QMKURL is pressed
63 SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
64 } else {
65 // when keycode QMKURL is released
66 }
67 break;
68 }
69 return true;
70}
71
72void matrix_init_user(void) {
73
74}
75
76void matrix_scan_user(void) {
77
78}
79
80void led_set_user(uint8_t usb_led) {
81
82}
diff --git a/keyboards/primekb/prime_m/keymaps/default/readme.md b/keyboards/primekb/prime_m/keymaps/default/readme.md
index 5654918ab..35a3edc8f 100644
--- a/keyboards/primekb/prime_m/keymaps/default/readme.md
+++ b/keyboards/primekb/prime_m/keymaps/default/readme.md
@@ -1 +1 @@
# The default keymap for prime_m \ No newline at end of file # The default keymap for Prime_M \ No newline at end of file
diff --git a/keyboards/primekb/prime_m/keymaps/numpad/config.h b/keyboards/primekb/prime_m/keymaps/numpad/config.h
deleted file mode 100644
index 95917a65c..000000000
--- a/keyboards/primekb/prime_m/keymaps/numpad/config.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/* Copyright 2018 Jumail Mundekkat
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19// place overrides here
diff --git a/keyboards/primekb/prime_m/keymaps/numpad/readme.md b/keyboards/primekb/prime_m/keymaps/numpad/readme.md
index 5654918ab..cd9755831 100644
--- a/keyboards/primekb/prime_m/keymaps/numpad/readme.md
+++ b/keyboards/primekb/prime_m/keymaps/numpad/readme.md
@@ -1 +1 @@
# The default keymap for prime_m \ No newline at end of file # The numpad keymap for Prime_M \ No newline at end of file
diff --git a/keyboards/primekb/prime_m/keymaps/via/keymap.c b/keyboards/primekb/prime_m/keymaps/via/keymap.c
new file mode 100644
index 000000000..e8c360f8a
--- /dev/null
+++ b/keyboards/primekb/prime_m/keymaps/via/keymap.c
@@ -0,0 +1,51 @@
1/* Copyright 2020 Holten Campbell
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT_ortho_5x6(
20 KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, LT(2, KC_BSPC),
21 KC_F1, KC_F2, KC_P7, KC_P8, KC_P9, KC_DEL,
22 KC_F3, KC_F4, KC_P4, KC_P5, KC_P6, KC_PMNS,
23 KC_F5, KC_F6, KC_P1, KC_P2, KC_P3, KC_PPLS,
24 KC_LCTL, KC_LALT, TO(1), KC_P0, KC_PDOT, KC_PENT
25 ),
26
27 [1] = LAYOUT_ortho_5x6(
28 KC_ESC, KC_1, KC_2, KC_3, KC_4, LT(2, KC_F9),
29 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
30 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G,
31 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
32 KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC
33 ),
34
35 [2] = LAYOUT_ortho_5x6(
36 BL_TOGG, BL_STEP, _______, _______, _______, _______,
37 _______, _______, _______, _______, _______, _______,
38 _______, _______, _______, _______, _______, _______,
39 _______, _______, _______, _______, _______, KC_VOLU,
40 _______, _______, _______, _______, KC_MUTE, KC_VOLD
41 ),
42
43 [3] = LAYOUT_ortho_5x6(
44 _______, _______, _______, _______, _______, _______,
45 _______, _______, _______, _______, _______, _______,
46 _______, _______, _______, _______, _______, _______,
47 _______, _______, _______, _______, _______, _______,
48 _______, _______, _______, _______, _______, _______
49 )
50
51};
diff --git a/keyboards/primekb/prime_m/keymaps/via/readme.md b/keyboards/primekb/prime_m/keymaps/via/readme.md
new file mode 100644
index 000000000..3283f6356
--- /dev/null
+++ b/keyboards/primekb/prime_m/keymaps/via/readme.md
@@ -0,0 +1 @@
# The VIA keymap for Prime_M \ No newline at end of file
diff --git a/keyboards/primekb/prime_m/keymaps/via/rules.mk b/keyboards/primekb/prime_m/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/primekb/prime_m/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes
diff --git a/keyboards/primekb/prime_m/prime_m.c b/keyboards/primekb/prime_m/prime_m.c
index a33db95d8..168fec4ed 100644
--- a/keyboards/primekb/prime_m/prime_m.c
+++ b/keyboards/primekb/prime_m/prime_m.c
@@ -1,4 +1,5 @@
1/* Copyright 2018 Jumail Mundekkat 1/* Copyright 2018 Jumail Mundekkat
2 * Copyright 2020 Holten Campbell
2 * 3 *
3 * This program is free software: you can redistribute it and/or modify 4 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
@@ -14,30 +15,3 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 16 */
16#include "prime_m.h" 17#include "prime_m.h"
17
18void matrix_init_kb(void) {
19 // put your keyboard start-up code here
20 // runs once when the firmware starts up
21
22 matrix_init_user();
23}
24
25void matrix_scan_kb(void) {
26 // put your looping keyboard code here
27 // runs every cycle (a lot)
28
29 matrix_scan_user();
30}
31
32bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
33 // put your per-action keyboard code here
34 // runs for every action, just before processing by the firmware
35
36 return process_record_user(keycode, record);
37}
38
39void led_set_kb(uint8_t usb_led) {
40 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
41
42 led_set_user(usb_led);
43}
diff --git a/keyboards/primekb/prime_m/readme.md b/keyboards/primekb/prime_m/readme.md
index 668b29e4a..704b3286c 100644
--- a/keyboards/primekb/prime_m/readme.md
+++ b/keyboards/primekb/prime_m/readme.md
@@ -4,12 +4,13 @@
4 4
5The Prime_M is a premium input device that is designed to be flexible so that it can cover many needs. The case is milled from a solid block of aluminum and features an integrated switch plate, which is 4.75mm thick yet designed to allow MX style switches to properly snap in. The bottom cover is machine from solid brass and is pre-drilled/countersunk for use with optional feet to give the device a slight tilt. 5The Prime_M is a premium input device that is designed to be flexible so that it can cover many needs. The case is milled from a solid block of aluminum and features an integrated switch plate, which is 4.75mm thick yet designed to allow MX style switches to properly snap in. The bottom cover is machine from solid brass and is pre-drilled/countersunk for use with optional feet to give the device a slight tilt.
6 6
7Keyboard Maintainer: [MxBlue](https://github.com/MxBlu) 7* Keyboard Maintainer: [holtenc](https://github.com/holtenc), [MxBlue](https://github.com/MxBlu)
8Hardware Supported: Prime_M PCB, ATMega32u2 8* Hardware Supported: Prime_M PCB, ATMega32u2
9Hardware Availability: [GB Post](https://geekhack.org/index.php?topic=91821.0), [B-Stock Listing](https://www.primekb.com/products/prime_m) 9* Hardware Availability: [GB Post](https://geekhack.org/index.php?topic=91821.0), [B-Stock Listing](https://www.primekb.com/products/prime_m)
10 10
11Make example for this keyboard (after setting up your build environment): 11Make example for this keyboard (after setting up your build environment):
12 12
13 make primekb/prime_m:default 13 make primekb/prime_m:default
14 make primekb/prime_m:via
14 15
15See 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). 16See 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/primekb/prime_m/rules.mk b/keyboards/primekb/prime_m/rules.mk
index 160ed2088..1a1eabc8c 100644
--- a/keyboards/primekb/prime_m/rules.mk
+++ b/keyboards/primekb/prime_m/rules.mk
@@ -15,21 +15,21 @@ BOOTLOADER = atmel-dfu
15# change yes to no to disable 15# change yes to no to disable
16# 16#
17BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration 17BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
18MOUSEKEY_ENABLE = yes # Mouse keys 18MOUSEKEY_ENABLE = yes # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control 19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = no # Console for debug 20CONSOLE_ENABLE = no # Console for debug
21COMMAND_ENABLE = no # Commands for debug and configuration 21COMMAND_ENABLE = no # Commands for debug and configuration
22# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 22# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
23SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 23SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
24# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 24# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
25NKRO_ENABLE = yes # USB Nkey Rollover 25NKRO_ENABLE = yes # USB Nkey Rollover
26BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default 26BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
27RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow 27RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
28MIDI_ENABLE = no # MIDI support 28MIDI_ENABLE = no # MIDI support
29UNICODE_ENABLE = no # Unicode 29UNICODE_ENABLE = no # Unicode
30BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 30BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
31AUDIO_ENABLE = no # Audio output on port C6 31AUDIO_ENABLE = no # Audio output on port C6
32FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches 32FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
33HD44780_ENABLE = no # Enable support for HD44780 based LCDs 33HD44780_ENABLE = no # Enable support for HD44780 based LCDs
34 34
35LAYOUTS = ortho_5x6 numpad_5x6 35LAYOUTS = ortho_5x6 numpad_5x6