diff options
author | Pascal Pfeil <pfeilpascal@outlook.de> | 2021-01-08 23:16:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 22:16:21 +0000 |
commit | 1be7485fa4d757ffef19611fc7ec04176280571c (patch) | |
tree | b46be0ce7cf0cdc486b0ea3570a17afdbabd31af | |
parent | 19e2bb272ebb0035165d77f0bb3a9828bc6526c1 (diff) | |
download | qmk_firmware-1be7485fa4d757ffef19611fc7ec04176280571c.tar.gz qmk_firmware-1be7485fa4d757ffef19611fc7ec04176280571c.zip |
VIA Support: LFKPad (#11461)
* VIA Support: LFKPad
* Condense two mostly redundant rules.mk files
* Set BOOTMAGIC_ENABLE to lite as advised by VIA tutorial
-rw-r--r-- | keyboards/lfkeyboards/lfkpad/config.h | 4 | ||||
-rw-r--r-- | keyboards/lfkeyboards/lfkpad/keymaps/default/rules.mk | 42 | ||||
-rw-r--r-- | keyboards/lfkeyboards/lfkpad/keymaps/via/keymap.c | 56 | ||||
-rw-r--r-- | keyboards/lfkeyboards/lfkpad/keymaps/via/readme.md | 1 | ||||
-rw-r--r-- | keyboards/lfkeyboards/lfkpad/keymaps/via/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/lfkeyboards/lfkpad/rules.mk | 4 |
6 files changed, 64 insertions, 45 deletions
diff --git a/keyboards/lfkeyboards/lfkpad/config.h b/keyboards/lfkeyboards/lfkpad/config.h index 05de35c0a..a705e1c65 100644 --- a/keyboards/lfkeyboards/lfkpad/config.h +++ b/keyboards/lfkeyboards/lfkpad/config.h | |||
@@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
20 | #include "config_common.h" | 20 | #include "config_common.h" |
21 | 21 | ||
22 | /* USB Device descriptor parameter */ | 22 | /* USB Device descriptor parameter */ |
23 | #define VENDOR_ID 0xFEED | 23 | #define VENDOR_ID 0x4C46 // LF |
24 | #define PRODUCT_ID 0x6060 | 24 | #define PRODUCT_ID 0x3231 // 21 |
25 | #define DEVICE_VER 0x0001 | 25 | #define DEVICE_VER 0x0001 |
26 | #define MANUFACTURER LFKeyboards | 26 | #define MANUFACTURER LFKeyboards |
27 | #define PRODUCT LFKPad 21 | 27 | #define PRODUCT LFKPad 21 |
diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/default/rules.mk b/keyboards/lfkeyboards/lfkpad/keymaps/default/rules.mk deleted file mode 100644 index db54d61e5..000000000 --- a/keyboards/lfkeyboards/lfkpad/keymaps/default/rules.mk +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | # Build Options | ||
2 | # change to "no" to disable the options, or define them in the Makefile in | ||
3 | # the appropriate keymap folder that will get included automatically | ||
4 | # | ||
5 | |||
6 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
7 | MOUSEKEY_ENABLE = no # Mouse keys | ||
8 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
9 | CONSOLE_ENABLE = no # Console for debug | ||
10 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
11 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
12 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
13 | MIDI_ENABLE = no # MIDI controls | ||
14 | AUDIO_ENABLE = no # Audio output on port C6 | ||
15 | UNICODE_ENABLE = no # Unicode | ||
16 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
17 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. | ||
18 | RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not qmk base | ||
19 | SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | ||
20 | TAP_DANCE_ENABLE = no | ||
21 | |||
22 | ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled | ||
23 | WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms | ||
24 | |||
25 | |||
26 | |||
27 | |||
28 | # # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired | ||
29 | # # | ||
30 | # # RevB - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight | ||
31 | # # RevC/D - at90usb1286, no audio, ISSI device 0 is backlight, 4 is RGB | ||
32 | # # | ||
33 | # # Set to B, C or D | ||
34 | # LFK_REV = D | ||
35 | |||
36 | # ifeq ($(LFK_REV), B) | ||
37 | # MCU = atmega32u4 | ||
38 | # else | ||
39 | # MCU = at90usb1286 | ||
40 | # endif | ||
41 | # OPT_DEFS += -DLFK_REV_$(LFK_REV) | ||
42 | # OPT_DEFS += -DUSB_PRODUCT=\"LFK_Rev$(LFK_REV)\" | ||
diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/via/keymap.c b/keyboards/lfkeyboards/lfkpad/keymaps/via/keymap.c new file mode 100644 index 000000000..374f00fb1 --- /dev/null +++ b/keyboards/lfkeyboards/lfkpad/keymaps/via/keymap.c | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | Copyright 2020 Pascal Pfeil | ||
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 | This program is distributed in the hope that it will be useful, | ||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | GNU General Public License for more details. | ||
11 | You should have received a copy of the GNU General Public License | ||
12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
13 | */ | ||
14 | |||
15 | #include QMK_KEYBOARD_H | ||
16 | |||
17 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
18 | [0] = LAYOUT_numpad_6x4( | ||
19 | KC_ESC, KC_TAB, KC_PEQL, MO(1), | ||
20 | KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS, | ||
21 | KC_P7, KC_P8, KC_P9, | ||
22 | KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
23 | KC_P1, KC_P2, KC_P3, | ||
24 | KC_P0, KC_PDOT, KC_PENT | ||
25 | ), | ||
26 | |||
27 | /* RGB */ | ||
28 | [1] = LAYOUT_numpad_6x4( | ||
29 | RGB_SAI, RGB_VAI, RGB_HUI, _______, | ||
30 | RGB_SAD, RGB_VAD, RGB_HUD, _______, | ||
31 | RGB_M_X, RGB_M_G, RGB_MOD, | ||
32 | RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_RMOD, | ||
33 | RGB_M_P, RGB_M_B, RGB_M_R, | ||
34 | XXXXXXX, XXXXXXX, RGB_TOG | ||
35 | ), | ||
36 | |||
37 | /* VIA wants four keymaps */ | ||
38 | [2] = LAYOUT_numpad_6x4( | ||
39 | _______, _______, _______, _______, | ||
40 | _______, _______, _______, _______, | ||
41 | _______, _______, _______, | ||
42 | _______, _______, _______, _______, | ||
43 | _______, _______, _______, | ||
44 | _______, _______, _______ | ||
45 | ), | ||
46 | |||
47 | /* VIA wants four keymaps */ | ||
48 | [3] = LAYOUT_numpad_6x4( | ||
49 | _______, _______, _______, _______, | ||
50 | _______, _______, _______, _______, | ||
51 | _______, _______, _______, | ||
52 | _______, _______, _______, _______, | ||
53 | _______, _______, _______, | ||
54 | _______, _______, _______ | ||
55 | ), | ||
56 | }; | ||
diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/via/readme.md b/keyboards/lfkeyboards/lfkpad/keymaps/via/readme.md new file mode 100644 index 000000000..bafbae872 --- /dev/null +++ b/keyboards/lfkeyboards/lfkpad/keymaps/via/readme.md | |||
@@ -0,0 +1 @@ | |||
# The VIA compatible keymap for the LFKPad 21 | |||
diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/via/rules.mk b/keyboards/lfkeyboards/lfkpad/keymaps/via/rules.mk new file mode 100644 index 000000000..36b7ba9cb --- /dev/null +++ b/keyboards/lfkeyboards/lfkpad/keymaps/via/rules.mk | |||
@@ -0,0 +1,2 @@ | |||
1 | VIA_ENABLE = yes | ||
2 | LTO_ENABLE = yes | ||
diff --git a/keyboards/lfkeyboards/lfkpad/rules.mk b/keyboards/lfkeyboards/lfkpad/rules.mk index 0e723f2f4..996d822f3 100644 --- a/keyboards/lfkeyboards/lfkpad/rules.mk +++ b/keyboards/lfkeyboards/lfkpad/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration |
18 | MOUSEKEY_ENABLE = no # Mouse keys | 18 | MOUSEKEY_ENABLE = no # Mouse keys |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control |
20 | CONSOLE_ENABLE = no # Console for debug | 20 | CONSOLE_ENABLE = no # Console for debug |
@@ -30,6 +30,8 @@ MIDI_ENABLE = no # MIDI support | |||
30 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 30 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
31 | AUDIO_ENABLE = no # Audio output on port C6 | 31 | AUDIO_ENABLE = no # Audio output on port C6 |
32 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | 32 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches |
33 | UNICODE_ENABLE = no # Unicode | ||
34 | TAP_DANCE_ENABLE = no | ||
33 | 35 | ||
34 | ISSI_ENABLE = yes # If the I2C pullup resistors aren't installed this must be disabled | 36 | ISSI_ENABLE = yes # If the I2C pullup resistors aren't installed this must be disabled |
35 | WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan() isn't run every 250ms | 37 | WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan() isn't run every 250ms |