diff options
Diffstat (limited to 'keyboards/pabile/p20')
-rw-r--r-- | keyboards/pabile/p20/config.h | 26 | ||||
-rw-r--r-- | keyboards/pabile/p20/p20.c | 1 | ||||
-rw-r--r-- | keyboards/pabile/p20/p20.h | 18 | ||||
-rw-r--r-- | keyboards/pabile/p20/readme.md | 10 | ||||
-rw-r--r-- | keyboards/pabile/p20/ver1/config.h | 42 | ||||
-rw-r--r-- | keyboards/pabile/p20/ver1/keymaps/default/keymap.c (renamed from keyboards/pabile/p20/keymaps/default/keymap.c) | 0 | ||||
-rw-r--r-- | keyboards/pabile/p20/ver1/rules.mk (renamed from keyboards/pabile/p20/rules.mk) | 17 | ||||
-rw-r--r-- | keyboards/pabile/p20/ver1/ver1.c | 18 | ||||
-rw-r--r-- | keyboards/pabile/p20/ver1/ver1.h | 50 | ||||
-rw-r--r-- | keyboards/pabile/p20/ver2/config.h | 39 | ||||
-rw-r--r-- | keyboards/pabile/p20/ver2/keymaps/default/keymap.c | 43 | ||||
-rw-r--r-- | keyboards/pabile/p20/ver2/rules.mk | 28 | ||||
-rw-r--r-- | keyboards/pabile/p20/ver2/ver2.c | 18 | ||||
-rw-r--r-- | keyboards/pabile/p20/ver2/ver2.h | 50 |
14 files changed, 297 insertions, 63 deletions
diff --git a/keyboards/pabile/p20/config.h b/keyboards/pabile/p20/config.h deleted file mode 100644 index 8a52c1bf1c..0000000000 --- a/keyboards/pabile/p20/config.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x6666 -#define PRODUCT_ID 0x6667 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Pabile -#define PRODUCT P20 -#define DESCRIPTION 5x4 Macropad - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 4 - -/* pin-out */ -#define MATRIX_ROW_PINS { B3, B4, B5, D7, E6 } -#define MATRIX_COL_PINS { D0, B2, D4, B6 } -#define UNUSED_PINS - -#define ENCODERS_PAD_A { F5, F7 } -#define ENCODERS_PAD_B { F6, B1 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p20/p20.c b/keyboards/pabile/p20/p20.c deleted file mode 100644 index c17efac9b1..0000000000 --- a/keyboards/pabile/p20/p20.c +++ /dev/null @@ -1 +0,0 @@ -#include "p20.h" diff --git a/keyboards/pabile/p20/p20.h b/keyboards/pabile/p20/p20.h deleted file mode 100644 index b7467dc150..0000000000 --- a/keyboards/pabile/p20/p20.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define LAYOUT_ortho_5x4( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, k23, \ - k30, k31, k32, k33, \ - k40, k41, k42, k43 \ -) \ -{ \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, k33}, \ - {k40, k41, k42, k43} \ -} diff --git a/keyboards/pabile/p20/readme.md b/keyboards/pabile/p20/readme.md index 256a4772ec..e94005b0d4 100644 --- a/keyboards/pabile/p20/readme.md +++ b/keyboards/pabile/p20/readme.md @@ -1,16 +1,16 @@ # P20 ![Linear grid](https://github.com/pabile/Pabile20/blob/master/_bak/layout-grid.jpg) -![Numeric pad](https://github.com/pabile/Pabile20/blob/master/_bak/layout-numpad.jpg) -A 5x4 grid keyboard with 2 rotary encoders. +A 5x4 grid macro numeric pad with up to 3 optional rotary encoders. * Keyboard Maintainer: [pabile](https://github.com/pabile) -* Hardware Supported: Pabile P20 PCB, Pro Micro -* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile20) +* Hardware Supported: Pabile P20 PCB, Pro Micro, Rotary Encoders, Alps/MX Switches +* Hardware Availability: [pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/p20) Make example for this keyboard (after setting up your build environment): - make pabile/p20:default + make pabile/p20/ver1:default # for ver1 + make pabile/p20/ver2:default # for ver2 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/pabile/p20/ver1/config.h b/keyboards/pabile/p20/ver1/config.h new file mode 100644 index 0000000000..94c600106b --- /dev/null +++ b/keyboards/pabile/p20/ver1/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2020 Pabile + +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 0x6666 +#define PRODUCT_ID 0x6667 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pabile +#define PRODUCT P20 ver1 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* pin-out */ +#define MATRIX_ROW_PINS { B3, B4, B5, D7, E6 } +#define MATRIX_COL_PINS { D0, B2, D4, B6 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A { F5, F7 } +#define ENCODERS_PAD_B { F6, B1 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW
\ No newline at end of file diff --git a/keyboards/pabile/p20/keymaps/default/keymap.c b/keyboards/pabile/p20/ver1/keymaps/default/keymap.c index 6b815e72e8..6b815e72e8 100644 --- a/keyboards/pabile/p20/keymaps/default/keymap.c +++ b/keyboards/pabile/p20/ver1/keymaps/default/keymap.c diff --git a/keyboards/pabile/p20/rules.mk b/keyboards/pabile/p20/ver1/rules.mk index d4fa25323a..d8e01b847f 100644 --- a/keyboards/pabile/p20/rules.mk +++ b/keyboards/pabile/p20/ver1/rules.mk @@ -2,13 +2,6 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = caterina # Build Options @@ -25,13 +18,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + UNICODE_ENABLE = yes # Unicode IOS_DEVICE_ENABLE = no # connect to IOS Device ENCODER_ENABLE = yes -LAYOUTS = ortho_5x4 +LAYOUTS = ortho_5x4 numpad_5x4 diff --git a/keyboards/pabile/p20/ver1/ver1.c b/keyboards/pabile/p20/ver1/ver1.c new file mode 100644 index 0000000000..65e11630bc --- /dev/null +++ b/keyboards/pabile/p20/ver1/ver1.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Pabile + +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 "ver1.h" diff --git a/keyboards/pabile/p20/ver1/ver1.h b/keyboards/pabile/p20/ver1/ver1.h new file mode 100644 index 0000000000..36ec781fa1 --- /dev/null +++ b/keyboards/pabile/p20/ver1/ver1.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 Pabile + +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" + +#define LAYOUT_ortho_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43} \ +} + +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k23, \ + k30, k31, k32, \ + k40, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, KC_NO}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, KC_NO}, \ + {k40, KC_NO, k42, k43} \ +} diff --git a/keyboards/pabile/p20/ver2/config.h b/keyboards/pabile/p20/ver2/config.h new file mode 100644 index 0000000000..0997001836 --- /dev/null +++ b/keyboards/pabile/p20/ver2/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2020 Pabile + +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 0x6666 +#define PRODUCT_ID 0x6667 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Pabile +#define PRODUCT P20 ver2 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* pin-out */ +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { D1, D0, D4, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p20/ver2/keymaps/default/keymap.c b/keyboards/pabile/p20/ver2/keymaps/default/keymap.c new file mode 100644 index 0000000000..2c2af0da8a --- /dev/null +++ b/keyboards/pabile/p20/ver2/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2020 Pabile + +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 QMK_KEYBOARD_H + +enum custom_keycodes { + DBLZERO = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DBLZERO: + if (record->event.pressed) { + tap_code(KC_P0); + tap_code(KC_P0); + } + break; + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_TAB, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_DEL, + KC_P0, DBLZERO, KC_PDOT, KC_PENT) +}; diff --git a/keyboards/pabile/p20/ver2/rules.mk b/keyboards/pabile/p20/ver2/rules.mk new file mode 100644 index 0000000000..da59201fca --- /dev/null +++ b/keyboards/pabile/p20/ver2/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +UNICODE_ENABLE = yes # Unicode +IOS_DEVICE_ENABLE = no # connect to IOS Device +ENCODER_ENABLE = no + +LAYOUTS = ortho_5x4 numpad_5x4 diff --git a/keyboards/pabile/p20/ver2/ver2.c b/keyboards/pabile/p20/ver2/ver2.c new file mode 100644 index 0000000000..fa7e1f2e39 --- /dev/null +++ b/keyboards/pabile/p20/ver2/ver2.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Pabile + +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 "ver2.h" diff --git a/keyboards/pabile/p20/ver2/ver2.h b/keyboards/pabile/p20/ver2/ver2.h new file mode 100644 index 0000000000..36ec781fa1 --- /dev/null +++ b/keyboards/pabile/p20/ver2/ver2.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 Pabile + +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" + +#define LAYOUT_ortho_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43} \ +} + +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k23, \ + k30, k31, k32, \ + k40, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, KC_NO}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, KC_NO}, \ + {k40, KC_NO, k42, k43} \ +} |