diff options
| -rw-r--r-- | keyboards/pistachio_mp/config.h | 78 | ||||
| -rw-r--r-- | keyboards/pistachio_mp/info.json | 30 | ||||
| -rw-r--r-- | keyboards/pistachio_mp/keymaps/default/keymap.c | 55 | ||||
| -rw-r--r-- | keyboards/pistachio_mp/keymaps/default/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/pistachio_mp/pistachio_mp.c | 17 | ||||
| -rw-r--r-- | keyboards/pistachio_mp/pistachio_mp.h | 48 | ||||
| -rw-r--r-- | keyboards/pistachio_mp/readme.md | 21 | ||||
| -rw-r--r-- | keyboards/pistachio_mp/rules.mk | 23 |
8 files changed, 273 insertions, 0 deletions
diff --git a/keyboards/pistachio_mp/config.h b/keyboards/pistachio_mp/config.h new file mode 100644 index 000000000..f23530a12 --- /dev/null +++ b/keyboards/pistachio_mp/config.h | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 rate | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details.222 | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0xFEED | ||
| 24 | #define PRODUCT_ID 0xD0C3 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER rate | ||
| 27 | #define PRODUCT pistachio_mp | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 5 | ||
| 31 | #define MATRIX_COLS 4 | ||
| 32 | |||
| 33 | #ifdef ENCODER_ENABLE | ||
| 34 | #define ENCODERS_PAD_A {F4} | ||
| 35 | #define ENCODERS_PAD_B {F5} | ||
| 36 | #endif | ||
| 37 | |||
| 38 | /* | ||
| 39 | * Keyboard Matrix Assignments | ||
| 40 | * | ||
| 41 | * Change this to how you wired your keyboard | ||
| 42 | * COLS: AVR pins used for columns, left to right | ||
| 43 | * ROWS: AVR pins used for rows, top to bottom | ||
| 44 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 45 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 46 | * | ||
| 47 | */ | ||
| 48 | #define MATRIX_ROW_PINS { B4, E6, D7, C6, D4 } | ||
| 49 | #define MATRIX_COL_PINS { B3, B1, F7, F6 } | ||
| 50 | #define UNUSED_PINS | ||
| 51 | |||
| 52 | /* COL2ROW, ROW2COL */ | ||
| 53 | #define DIODE_DIRECTION ROW2COL | ||
| 54 | |||
| 55 | #define RGB_DI_PIN D2 | ||
| 56 | #define RGBLED_NUM 3 | ||
| 57 | #define RGBLIGHT_HUE_STEP 10 | ||
| 58 | #define RGBLIGHT_SAT_STEP 17 | ||
| 59 | #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) | ||
| 60 | #define USB_MAX_POWER_CONSUMPTION 400 | ||
| 61 | #else | ||
| 62 | #define USB_MAX_POWER_CONSUMPTION 100 | ||
| 63 | #endif | ||
| 64 | |||
| 65 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 66 | #define DEBOUNCE 5 | ||
| 67 | |||
| 68 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 69 | #define LOCKING_SUPPORT_ENABLE | ||
| 70 | /* Locking resynchronize hack */ | ||
| 71 | #define LOCKING_RESYNC_ENABLE | ||
| 72 | |||
| 73 | /* nKey Rollover */ | ||
| 74 | #define FORCE_NKRO | ||
| 75 | |||
| 76 | /* disable these deprecated features by default */ | ||
| 77 | #define NO_ACTION_MACRO | ||
| 78 | #define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/pistachio_mp/info.json b/keyboards/pistachio_mp/info.json new file mode 100644 index 000000000..cbbbd67bc --- /dev/null +++ b/keyboards/pistachio_mp/info.json | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "pistachio_mp", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "rate", | ||
| 5 | "width": 4, | ||
| 6 | "height": 6.5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"label":"Encoder", "x":3, "y":0}, | ||
| 11 | {"label":"Num Lock", "x":0, "y":1.5}, | ||
| 12 | {"label":"/", "x":1, "y":1.5}, | ||
| 13 | {"label":"*", "x":2, "y":1.5}, | ||
| 14 | {"label":"-", "x":3, "y":1.5}, | ||
| 15 | {"label":"7", "x":0, "y":2.5}, | ||
| 16 | {"label":"8", "x":1, "y":2.5}, | ||
| 17 | {"label":"9", "x":2, "y":2.5}, | ||
| 18 | {"label":"+", "x":3, "y":2.5, "h":2}, | ||
| 19 | {"label":"4", "x":0, "y":3.5}, | ||
| 20 | {"label":"5", "x":1, "y":3.5}, | ||
| 21 | {"label":"6", "x":2, "y":3.5}, | ||
| 22 | {"label":"1", "x":0, "y":4.5}, | ||
| 23 | {"label":"2", "x":1, "y":4.5}, | ||
| 24 | {"label":"3", "x":2, "y":4.5}, | ||
| 25 | {"label":"Enter", "x":3, "y":4.5, "h":2}, | ||
| 26 | {"label":"0", "x":0, "y":5.5, "w":2}, | ||
| 27 | {"label":".", "x":2, "y":5.5}] | ||
| 28 | } | ||
| 29 | } | ||
| 30 | } \ No newline at end of file | ||
diff --git a/keyboards/pistachio_mp/keymaps/default/keymap.c b/keyboards/pistachio_mp/keymaps/default/keymap.c new file mode 100644 index 000000000..a8e8cc73c --- /dev/null +++ b/keyboards/pistachio_mp/keymaps/default/keymap.c | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | /* Copyright 2020 rate | ||
| 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 | |||
| 18 | // Defines names for use in layer keycodes and the keymap | ||
| 19 | enum layer_names { | ||
| 20 | _BASE = 0, | ||
| 21 | _FN | ||
| 22 | }; | ||
| 23 | |||
| 24 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 25 | /* Base */ | ||
| 26 | [_BASE] = LAYOUT( | ||
| 27 | KC_MPLY, | ||
| 28 | LT(_FN, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, | ||
| 29 | KC_P7, KC_P8, KC_P9, | ||
| 30 | KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 31 | KC_P1, KC_P2, KC_P3, | ||
| 32 | KC_P0, KC_PDOT, KC_PENT | ||
| 33 | ), | ||
| 34 | /* Fn */ | ||
| 35 | [_FN] = LAYOUT( | ||
| 36 | KC_NO, | ||
| 37 | KC_NO, KC_NO, KC_NO, KC_NO, | ||
| 38 | RGB_HUI, RGB_SAI, RGB_VAI, | ||
| 39 | RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, | ||
| 40 | KC_NO, KC_NO, KC_NO, | ||
| 41 | KC_NO, KC_NO, KC_NO | ||
| 42 | ) | ||
| 43 | }; | ||
| 44 | #ifdef ENCODER_ENABLE | ||
| 45 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 46 | if (index == 0) { | ||
| 47 | // Volume control | ||
| 48 | if (clockwise) { | ||
| 49 | tap_code(KC_VOLU); | ||
| 50 | } else { | ||
| 51 | tap_code(KC_VOLD); | ||
| 52 | } | ||
| 53 | } | ||
| 54 | } | ||
| 55 | #endif | ||
diff --git a/keyboards/pistachio_mp/keymaps/default/readme.md b/keyboards/pistachio_mp/keymaps/default/readme.md new file mode 100644 index 000000000..2bc50be9d --- /dev/null +++ b/keyboards/pistachio_mp/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for pistachio_mp | |||
diff --git a/keyboards/pistachio_mp/pistachio_mp.c b/keyboards/pistachio_mp/pistachio_mp.c new file mode 100644 index 000000000..40e75fe1b --- /dev/null +++ b/keyboards/pistachio_mp/pistachio_mp.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* Copyright 2020 rate | ||
| 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 | #include "pistachio_mp.h" | ||
diff --git a/keyboards/pistachio_mp/pistachio_mp.h b/keyboards/pistachio_mp/pistachio_mp.h new file mode 100644 index 000000000..d7c5c9bad --- /dev/null +++ b/keyboards/pistachio_mp/pistachio_mp.h | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* Copyright 2020 rate | ||
| 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 | #include "quantum.h" | ||
| 20 | |||
| 21 | /* | ||
| 22 | * ,------------------------ | ||
| 23 | * | K07 | | ||
| 24 | * |------------------------ | ||
| 25 | * | K00 | K01 | K02 | K03 | | ||
| 26 | * |------------------------ | ||
| 27 | * | K04 | K05 | K06 | | | ||
| 28 | * |------------------ K11 - | ||
| 29 | * | K08 | K09 | K10 | | | ||
| 30 | * |------------------------ | ||
| 31 | * | K12 | K13 | K14 | | | ||
| 32 | * |------------------ K17 - | ||
| 33 | * | K15 | K16 | | | ||
| 34 | * |------------------------ | ||
| 35 | */ | ||
| 36 | #define LAYOUT( \ | ||
| 37 | K07, \ | ||
| 38 | K00, K01, K02, K03, \ | ||
| 39 | K04, K05, K06, \ | ||
| 40 | K08, K09, K10, K11, \ | ||
| 41 | K12, K13, K14, \ | ||
| 42 | K15, K16, K17 ) { \ | ||
| 43 | { K00, K01, K02, K03 }, \ | ||
| 44 | { K04, K05, K06, K07 }, \ | ||
| 45 | { K08, K09, K10, K11 }, \ | ||
| 46 | { K12, K13, K14, KC_NO }, \ | ||
| 47 | { K15, KC_NO, K16, K17 }, \ | ||
| 48 | } | ||
diff --git a/keyboards/pistachio_mp/readme.md b/keyboards/pistachio_mp/readme.md new file mode 100644 index 000000000..0e5b030a6 --- /dev/null +++ b/keyboards/pistachio_mp/readme.md | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | # PistachioMacroPad | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | This is a numeric keypad with a rotary encoder that uses a stainless steel plate. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [rate](https://github.com/7-rate) | ||
| 8 | * Hardware Supported: PistachioMacroPad PCB, Pro Micro, BMP MicroPro | ||
| 9 | * Hardware Availability: [PCB & CaseData](https://github.com/7-rate/Pistachio_MacroPad.git), [Booth Shop](https://rates.booth.pm/items/2531312) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make pistachio_mp:default | ||
| 14 | |||
| 15 | Flashing example for this keyboard: | ||
| 16 | |||
| 17 | make pistachio_mp:default:flash | ||
| 18 | |||
| 19 | 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). | ||
| 20 | |||
| 21 | [Build guide](https://ratelog.net/pistachiomacropad-build-guide/) \ No newline at end of file | ||
diff --git a/keyboards/pistachio_mp/rules.mk b/keyboards/pistachio_mp/rules.mk new file mode 100644 index 000000000..5c24e15fb --- /dev/null +++ b/keyboards/pistachio_mp/rules.mk | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = caterina | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | ENCODER_ENABLE = yes | ||
