From a9250ad8a123f566de1a5a97de51f8ae13b33ce1 Mon Sep 17 00:00:00 2001 From: peepeetee <43021794+peepeetee@users.noreply.github.com> Date: Thu, 10 Feb 2022 05:14:33 +0800 Subject: move @7-rate 's keebs to /rate (#16099) --- keyboards/rate/pistachio/config.h | 31 +++ keyboards/rate/pistachio/info.json | 101 ++++++++ keyboards/rate/pistachio/keymaps/default/keymap.c | 67 ++++++ keyboards/rate/pistachio/keymaps/rate/keymap.c | 69 ++++++ keyboards/rate/pistachio/keymaps/via/keymap.c | 78 +++++++ keyboards/rate/pistachio/keymaps/via/rules.mk | 1 + keyboards/rate/pistachio/pistachio.c | 18 ++ keyboards/rate/pistachio/pistachio.h | 25 ++ keyboards/rate/pistachio/readme.md | 18 ++ keyboards/rate/pistachio/rev1/config.h | 67 ++++++ keyboards/rate/pistachio/rev1/readme.md | 17 ++ keyboards/rate/pistachio/rev1/rev1.c | 18 ++ keyboards/rate/pistachio/rev1/rev1.h | 58 +++++ keyboards/rate/pistachio/rev1/rules.mk | 19 ++ keyboards/rate/pistachio/rev2/config.h | 71 ++++++ keyboards/rate/pistachio/rev2/readme.md | 17 ++ keyboards/rate/pistachio/rev2/rev2.c | 19 ++ keyboards/rate/pistachio/rev2/rev2.h | 58 +++++ keyboards/rate/pistachio/rev2/rules.mk | 19 ++ keyboards/rate/pistachio/rules.mk | 1 + keyboards/rate/pistachio_mp/config.h | 78 +++++++ keyboards/rate/pistachio_mp/info.json | 34 +++ .../rate/pistachio_mp/keymaps/default/keymap.c | 56 +++++ .../rate/pistachio_mp/keymaps/default/readme.md | 1 + keyboards/rate/pistachio_mp/keymaps/via/keymap.c | 121 ++++++++++ keyboards/rate/pistachio_mp/keymaps/via/readme.md | 1 + keyboards/rate/pistachio_mp/keymaps/via/rules.mk | 1 + keyboards/rate/pistachio_mp/pistachio_mp.c | 17 ++ keyboards/rate/pistachio_mp/pistachio_mp.h | 48 ++++ keyboards/rate/pistachio_mp/readme.md | 21 ++ keyboards/rate/pistachio_mp/rules.mk | 19 ++ keyboards/rate/pistachio_pro/config.h | 108 +++++++++ keyboards/rate/pistachio_pro/info.json | 106 +++++++++ .../rate/pistachio_pro/keymaps/default/keymap.c | 123 ++++++++++ .../rate/pistachio_pro/keymaps/default/readme.md | 1 + keyboards/rate/pistachio_pro/keymaps/rate/keymap.c | 125 ++++++++++ .../rate/pistachio_pro/keymaps/rate/readme.md | 1 + keyboards/rate/pistachio_pro/keymaps/via/keymap.c | 179 +++++++++++++++ keyboards/rate/pistachio_pro/keymaps/via/readme.md | 1 + keyboards/rate/pistachio_pro/keymaps/via/rules.mk | 2 + keyboards/rate/pistachio_pro/lib/bme280.c | 255 +++++++++++++++++++++ keyboards/rate/pistachio_pro/lib/bme280.h | 22 ++ keyboards/rate/pistachio_pro/lib/glcdfont.c | 232 +++++++++++++++++++ keyboards/rate/pistachio_pro/matrix.c | 151 ++++++++++++ keyboards/rate/pistachio_pro/pistachio_pro.c | 17 ++ keyboards/rate/pistachio_pro/pistachio_pro.h | 42 ++++ keyboards/rate/pistachio_pro/readme.md | 21 ++ keyboards/rate/pistachio_pro/rules.mk | 25 ++ 48 files changed, 2580 insertions(+) create mode 100644 keyboards/rate/pistachio/config.h create mode 100644 keyboards/rate/pistachio/info.json create mode 100644 keyboards/rate/pistachio/keymaps/default/keymap.c create mode 100644 keyboards/rate/pistachio/keymaps/rate/keymap.c create mode 100644 keyboards/rate/pistachio/keymaps/via/keymap.c create mode 100644 keyboards/rate/pistachio/keymaps/via/rules.mk create mode 100644 keyboards/rate/pistachio/pistachio.c create mode 100644 keyboards/rate/pistachio/pistachio.h create mode 100644 keyboards/rate/pistachio/readme.md create mode 100644 keyboards/rate/pistachio/rev1/config.h create mode 100644 keyboards/rate/pistachio/rev1/readme.md create mode 100644 keyboards/rate/pistachio/rev1/rev1.c create mode 100644 keyboards/rate/pistachio/rev1/rev1.h create mode 100644 keyboards/rate/pistachio/rev1/rules.mk create mode 100644 keyboards/rate/pistachio/rev2/config.h create mode 100644 keyboards/rate/pistachio/rev2/readme.md create mode 100644 keyboards/rate/pistachio/rev2/rev2.c create mode 100644 keyboards/rate/pistachio/rev2/rev2.h create mode 100644 keyboards/rate/pistachio/rev2/rules.mk create mode 100644 keyboards/rate/pistachio/rules.mk create mode 100644 keyboards/rate/pistachio_mp/config.h create mode 100644 keyboards/rate/pistachio_mp/info.json create mode 100644 keyboards/rate/pistachio_mp/keymaps/default/keymap.c create mode 100644 keyboards/rate/pistachio_mp/keymaps/default/readme.md create mode 100644 keyboards/rate/pistachio_mp/keymaps/via/keymap.c create mode 100644 keyboards/rate/pistachio_mp/keymaps/via/readme.md create mode 100644 keyboards/rate/pistachio_mp/keymaps/via/rules.mk create mode 100644 keyboards/rate/pistachio_mp/pistachio_mp.c create mode 100644 keyboards/rate/pistachio_mp/pistachio_mp.h create mode 100644 keyboards/rate/pistachio_mp/readme.md create mode 100644 keyboards/rate/pistachio_mp/rules.mk create mode 100644 keyboards/rate/pistachio_pro/config.h create mode 100644 keyboards/rate/pistachio_pro/info.json create mode 100644 keyboards/rate/pistachio_pro/keymaps/default/keymap.c create mode 100644 keyboards/rate/pistachio_pro/keymaps/default/readme.md create mode 100644 keyboards/rate/pistachio_pro/keymaps/rate/keymap.c create mode 100644 keyboards/rate/pistachio_pro/keymaps/rate/readme.md create mode 100644 keyboards/rate/pistachio_pro/keymaps/via/keymap.c create mode 100644 keyboards/rate/pistachio_pro/keymaps/via/readme.md create mode 100644 keyboards/rate/pistachio_pro/keymaps/via/rules.mk create mode 100644 keyboards/rate/pistachio_pro/lib/bme280.c create mode 100644 keyboards/rate/pistachio_pro/lib/bme280.h create mode 100644 keyboards/rate/pistachio_pro/lib/glcdfont.c create mode 100644 keyboards/rate/pistachio_pro/matrix.c create mode 100644 keyboards/rate/pistachio_pro/pistachio_pro.c create mode 100644 keyboards/rate/pistachio_pro/pistachio_pro.h create mode 100644 keyboards/rate/pistachio_pro/readme.md create mode 100644 keyboards/rate/pistachio_pro/rules.mk (limited to 'keyboards/rate') diff --git a/keyboards/rate/pistachio/config.h b/keyboards/rate/pistachio/config.h new file mode 100644 index 0000000000..5ff7b3d799 --- /dev/null +++ b/keyboards/rate/pistachio/config.h @@ -0,0 +1,31 @@ +/* +Copyright 2020 rate + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5255 +#define PRODUCT_ID 0xD0C2 +#define DEVICE_VER 0x0001 +#define MANUFACTURER rate +#define PRODUCT pistachio + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 diff --git a/keyboards/rate/pistachio/info.json b/keyboards/rate/pistachio/info.json new file mode 100644 index 0000000000..8cdeb51ca3 --- /dev/null +++ b/keyboards/rate/pistachio/info.json @@ -0,0 +1,101 @@ +{ + "keyboard_name": "Pistachio", + "url": "", + "maintainer": "rate", + "layouts": { + "LAYOUT": { + "layout": [{"label":"ESC", "x":1.25, "y":0.25}, + {"label":"F1", "x":2.75, "y":0.25}, + {"label":"F2", "x":3.75, "y":0.25}, + {"label":"F3", "x":4.75, "y":0.25}, + {"label":"F4", "x":5.75, "y":0.25}, + {"label":"DEL", "x":7.25, "y":0.25}, + {"label":"F5", "x":9.5, "y":0.25}, + {"label":"F6", "x":10.5, "y":0.25}, + {"label":"F7", "x":11.5, "y":0.25}, + {"label":"F8", "x":12.5, "y":0.25}, + {"label":"F9", "x":14, "y":0.25}, + {"label":"F10", "x":15, "y":0.25}, + {"label":"F11", "x":16, "y":0.25}, + {"label":"F12", "x":17, "y":0.25}, + {"label":"\u25b6\u25b6|", "x":0, "y":1.75}, + {"label":"E/J", "x":1.25, "y":1.75}, + {"label":"!", "x":2.25, "y":1.75}, + {"label":"\"", "x":3.25, "y":1.75}, + {"label":"#", "x":4.25, "y":1.75}, + {"label":"$", "x":5.25, "y":1.75}, + {"label":"%", "x":6.25, "y":1.75}, + {"label":"&", "x":7.25, "y":1.75}, + {"label":"'", "x":10, "y":1.75}, + {"label":"(", "x":11, "y":1.75}, + {"label":")", "x":12, "y":1.75}, + {"label":"", "x":13, "y":1.75}, + {"label":"=", "x":14, "y":1.75}, + {"label":"~", "x":15, "y":1.75}, + {"label":"\\", "x":16, "y":1.75}, + {"label":"\u2190", "x":17, "y":1.75}, + {"label":"Delete", "x":18.25, "y":1.75}, + {"label":"\u25b6||", "x":0, "y":2.75}, + {"label":"Tab", "x":1.25, "y":2.75, "w":1.5}, + {"label":"Q", "x":2.75, "y":2.75}, + {"label":"W", "x":3.75, "y":2.75}, + {"label":"E", "x":4.75, "y":2.75}, + {"label":"R", "x":5.75, "y":2.75}, + {"label":"T", "x":6.75, "y":2.75}, + {"label":"Y", "x":9.5, "y":2.75}, + {"label":"U", "x":10.5, "y":2.75}, + {"label":"I", "x":11.5, "y":2.75}, + {"label":"O", "x":12.5, "y":2.75}, + {"label":"P", "x":13.5, "y":2.75}, + {"label":"`", "x":14.5, "y":2.75}, + {"label":"{", "x":15.5, "y":2.75}, + {"label":"Home", "x":18.25, "y":2.75}, + {"label":"\ud83d\udd07", "x":0, "y":3.75}, + {"label":"CapsLock", "x":1.25, "y":3.75, "w":1.75}, + {"label":"A", "x":3, "y":3.75}, + {"label":"S", "x":4, "y":3.75}, + {"label":"D", "x":5, "y":3.75}, + {"label":"F", "x":6, "y":3.75}, + {"label":"G", "x":7, "y":3.75}, + {"label":"H", "x":9.75, "y":3.75}, + {"label":"J", "x":10.75, "y":3.75}, + {"label":"K", "x":11.75, "y":3.75}, + {"label":"L", "x":12.75, "y":3.75}, + {"label":"+", "x":13.75, "y":3.75}, + {"label":"*", "x":14.75, "y":3.75}, + {"label":"}", "x":15.75, "y":3.75}, + {"label":"Enter", "x":16.75, "y":2.75, "w":1.25, "h":2}, + {"label":"End", "x":18.25, "y":3.75}, + {"label":"VolUP", "x":0, "y":4.75}, + {"label":"Shift", "x":1.25, "y":4.75, "w":2.25}, + {"label":"Z", "x":3.5, "y":4.75}, + {"label":"X", "x":4.5, "y":4.75}, + {"label":"C", "x":5.5, "y":4.75}, + {"label":"V", "x":6.5, "y":4.75}, + {"label":"B", "x":7.5, "y":4.75}, + {"label":"N", "x":10.25, "y":4.75}, + {"label":"M", "x":11.25, "y":4.75}, + {"label":"<", "x":12.25, "y":4.75}, + {"label":">", "x":13.25, "y":4.75}, + {"label":"?", "x":14.25, "y":4.75}, + {"label":"_", "x":15.25, "y":4.75}, + {"label":"Shift", "x":16.25, "y":4.75, "w":1.75}, + {"label":"Page", "x":18.25, "y":4.75}, + {"label":"VolDW", "x":0, "y":5.75}, + {"label":"Ctrl", "x":1.25, "y":5.75, "w":1.25}, + {"label":"Win", "x":2.5, "y":5.75}, + {"label":"Alt", "x":3.5, "y":5.75, "w":1.25}, + {"label":"Enter", "x":4.75, "y":5.75}, + {"label":"\u7121\u5909\u63db", "x":5.75, "y":5.75}, + {"x":6.75, "y":5.75, "w":1.25}, + {"x":10.5, "y":5.75, "w":1.25}, + {"label":"\u5909\u63db", "x":11.75, "y":5.75}, + {"label":"\u5de6\u30af\u30ea\u30c3\u30af", "x":12.75, "y":5.75}, + {"label":"Insert", "x":13.75, "y":5.75}, + {"label":"Alt", "x":14.75, "y":5.75}, + {"label":"Menu", "x":15.75, "y":5.75}, + {"label":"Ctrl", "x":16.75, "y":5.75, "w":1.25}, + {"label":"Page", "x":18.25, "y":5.75}] + } + } +} diff --git a/keyboards/rate/pistachio/keymaps/default/keymap.c b/keyboards/rate/pistachio/keymaps/default/keymap.c new file mode 100644 index 0000000000..585807abdd --- /dev/null +++ b/keyboards/rate/pistachio/keymaps/default/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2020 rate + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern rgblight_config_t rgblight_config; + +enum layer_names { + _QWERTY = 0, + _FN +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_MNXT, KC_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, KC_DEL, + KC_MPLY, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_HOME, + KC_MUTE, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, KC_ENT, KC_END, + KC_VOLU, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_RSFT, KC_PGUP, + KC_VOLD, KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, KC_MHEN, LT(_FN,KC_SPC), LT(_FN,KC_SPC), KC_HENK, KC_BTN1, KC_INS, KC_RALT, KC_APP, KC_RCTL, KC_PGDN + ), + [_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAD, _______, _______, _______, _______, KC_UP, _______, KC_HOME, KC_PGUP, KC_END, _______, _______, _______, _______, _______, + _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, + RGB_HUI, _______, _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______, RGB_SAI, + RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD + ) +}; + + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool result = false; + switch (keycode) { + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + default: + result = true; + break; + } + + return result; +} diff --git a/keyboards/rate/pistachio/keymaps/rate/keymap.c b/keyboards/rate/pistachio/keymaps/rate/keymap.c new file mode 100644 index 0000000000..34e1324aed --- /dev/null +++ b/keyboards/rate/pistachio/keymaps/rate/keymap.c @@ -0,0 +1,69 @@ +/* Copyright 2020 rate + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + + +enum layer_names { + _QWERTY = 0, + _FN, + _NUM +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_0, KC_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, KC_DEL, + KC_H, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_HOME, + KC_U, KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, KC_ENT, KC_END, + KC_VOLU, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_RSFT, KC_PGUP, + KC_VOLD, KC_LCTRL, KC_LGUI, KC_LALT, KC_LALT, LT(_NUM, KC_M), KC_SPC, LT(_FN, KC_SPC), KC_MPLY, JP_KANA, KC_UP, KC_DOWN, KC_INS, KC_RCTRL, KC_PGDN + ), + [_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAD, _______, _______, _______, _______, KC_UP, _______, _______, KC_HOME, KC_END, _______, KC_PGUP, _______, _______, _______, + _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_PGDN, _______, _______, _______, _______, + RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, + RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD + ), + [_NUM] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PMNS, _______, _______, _______, _______, + RGB_VAD, KC_7, KC_8, KC_9, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, + _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_4, KC_5, KC_6, _______, KC_PPLS, KC_PAST, _______, _______, _______, + RGB_HUI, KC_1, KC_2, KC_3, KC_0, JP_DOT, _______, KC_1, KC_2, KC_3, _______, KC_PSLS, _______, _______, RGB_SAI, + RGB_HUD, _______, _______, _______, _______, _______, _______, KC_0, _______, JP_DOT, _______, _______, _______, _______, RGB_SAD + ) +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + break; + } + + return true; +} diff --git a/keyboards/rate/pistachio/keymaps/via/keymap.c b/keyboards/rate/pistachio/keymaps/via/keymap.c new file mode 100644 index 0000000000..357253ac2d --- /dev/null +++ b/keyboards/rate/pistachio/keymaps/via/keymap.c @@ -0,0 +1,78 @@ +/* Copyright 2020 rate + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + + +enum layer_names { + _QWERTY = 0, + _FN, + _NUM, + _RESERVE +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_0, KC_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, KC_DEL, + KC_H, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_HOME, + KC_U, KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, KC_ENT, KC_END, + KC_VOLU, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_RSFT, KC_PGUP, + KC_VOLD, KC_LCTRL, KC_LGUI, KC_LALT, KC_LALT, LT(_NUM, KC_M), KC_SPC, LT(_FN, KC_SPC), KC_MPLY, JP_KANA, KC_UP, KC_DOWN, KC_INS, KC_RCTRL, KC_PGDN + ), + [_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAD, _______, _______, _______, _______, KC_UP, _______, _______, KC_HOME, KC_END, _______, KC_PGUP, _______, _______, _______, + _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_PGDN, _______, _______, _______, _______, + RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, + RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD + ), + [_NUM] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PMNS, _______, _______, _______, _______, + RGB_VAD, KC_7, KC_8, KC_9, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, + _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_4, KC_5, KC_6, _______, KC_PPLS, KC_PAST, _______, _______, _______, + RGB_HUI, KC_1, KC_2, KC_3, KC_0, JP_DOT, _______, KC_1, KC_2, KC_3, _______, KC_PSLS, _______, _______, RGB_SAI, + RGB_HUD, _______, _______, _______, _______, _______, _______, KC_0, _______, JP_DOT, _______, _______, _______, _______, RGB_SAD + ), + [_RESERVE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + break; + } + + return true; +} diff --git a/keyboards/rate/pistachio/keymaps/via/rules.mk b/keyboards/rate/pistachio/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/rate/pistachio/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/rate/pistachio/pistachio.c b/keyboards/rate/pistachio/pistachio.c new file mode 100644 index 0000000000..2a850f64a4 --- /dev/null +++ b/keyboards/rate/pistachio/pistachio.c @@ -0,0 +1,18 @@ +/* Copyright 2020 rate + * + * 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 . + */ + +#include "pistachio.h" + diff --git a/keyboards/rate/pistachio/pistachio.h b/keyboards/rate/pistachio/pistachio.h new file mode 100644 index 0000000000..7bf2c59ad6 --- /dev/null +++ b/keyboards/rate/pistachio/pistachio.h @@ -0,0 +1,25 @@ +/* Copyright 2020 rate + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#if defined(KEYBOARD_rate_pistachio_rev1) +# include "rev1.h" +#elif defined(KEYBOARD_rate_pistachio_rev2) +# include "rev2.h" +#endif diff --git a/keyboards/rate/pistachio/readme.md b/keyboards/rate/pistachio/readme.md new file mode 100644 index 0000000000..dc989bbe6c --- /dev/null +++ b/keyboards/rate/pistachio/readme.md @@ -0,0 +1,18 @@ +# pistachio + +![pistachio](https://ratelog.net/wp-content/uploads/2021/05/s-IMG_1835.jpg) + +This is a 92-key split keyboard with JIS layout and spare keys. + +* Keyboard Maintainer: [rate](https://github.com/7-rate) [@7_rate](https://twitter.com/7_rate) +* Hardware Supported: pistachio PCB Rev1 Rev2, Pro Micro +* Hardware Availability: [PCB & Case Data](https://github.com/7-rate/Pistachio), [Booth Shop](https://rates.booth.pm/items/2237334) + +Make example for this keyboard (after setting up your build environment): + + make rate/pistachio/rev1:default + make rate/pistachio/rev2:default + +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). + +[Build guide](https://ratelog.net/pistachio-build-guide/) diff --git a/keyboards/rate/pistachio/rev1/config.h b/keyboards/rate/pistachio/rev1/config.h new file mode 100644 index 0000000000..24f121ef17 --- /dev/null +++ b/keyboards/rate/pistachio/rev1/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2020 rate + +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 . +*/ + +#pragma once + +/* + * 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) + * + */ +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D3} +#define UNUSED_PINS + +#define USE_I2C + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D2 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 1, 1 } +#define RGBLED_NUM 2 +#define RGBLIGHT_LAYERS +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) + #define USB_MAX_POWER_CONSUMPTION 400 +#else + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* nKey Rollover */ +#define FORCE_NKRO + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/rate/pistachio/rev1/readme.md b/keyboards/rate/pistachio/rev1/readme.md new file mode 100644 index 0000000000..eae3776935 --- /dev/null +++ b/keyboards/rate/pistachio/rev1/readme.md @@ -0,0 +1,17 @@ +# pistachio Rev1 + +![pistachio](https://ratelog.net/wp-content/uploads/2020/08/Pistachio4-scaled.jpg) + +This is a 92-key split keyboard with JIS layout and spare keys. + +* Keyboard Maintainer: [rate](https://github.com/7-rate) [@7_rate](https://twitter.com/7_rate) +* Hardware Supported: pistachio PCB Rev1, Pro Micro +* Hardware Availability: [PCB & Case Data](https://github.com/7-rate/Pistachio), [Booth Shop](https://rates.booth.pm/items/2237334) + +Make example for this keyboard (after setting up your build environment): + + make pistachio/rev1:default + +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). + +[Build guide](https://ratelog.net/pistachio-build-guide/) \ No newline at end of file diff --git a/keyboards/rate/pistachio/rev1/rev1.c b/keyboards/rate/pistachio/rev1/rev1.c new file mode 100644 index 0000000000..5824157f53 --- /dev/null +++ b/keyboards/rate/pistachio/rev1/rev1.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 rate + +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 . +*/ + +#include "rev1.h" diff --git a/keyboards/rate/pistachio/rev1/rev1.h b/keyboards/rate/pistachio/rev1/rev1.h new file mode 100644 index 0000000000..e42de2d2b0 --- /dev/null +++ b/keyboards/rate/pistachio/rev1/rev1.h @@ -0,0 +1,58 @@ +/* +Copyright 2020 rate + +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 . +*/ + +#pragma once + +#include "quantum.h" + +/* + * ,------------------------------------------------- ---------------------------------------------------------. + * | | L00 | | L01 | L02 | L03 | L04 | | L05 | | R00 | R01 | R02 | R03 | | R04 | R05 | R06 | R07 | | + * |-------------------------------------- ---------- ---------------------------------------------------------+ + * | L10 || L11 | L12 | L13 | L14 | L15 | L16 | L17 | | R10 | R11 | R12 | R13 | R14 | R15 | R16 | R17 || R18 | + * |------------------------------------------------- ---------------------------------------------------------+ + * | L20 || L21 | L22 | L23 | L24 | L25 | L26 | | R20 | R21 | R22 | R23 | R24 | R25 | R26 | R27 || R28 | + * |--------------------------------------------- ------------------------------------------- ------+ + * | L30 || L31 | L32 | L33 | L34 | L35 | L36 | | R30 | R31 | R32 | R33 | R34 | R35 | R36 | || R37 | + * |---------------------------------------------- -------------------------------------------------------+ + * | L40 || L41 | L42 | L43 | L44 | L45 | L46 | | R40 | R41 | R42 | R43 | R44 | R45 | R46 || R47 | + * |----------------------------------------------- -----------------------------------------------------+ + * | L50 || L51 | L52 | L53 | L54 | L55 | L56 | | R50 | R51 | R52 | R53 | R54 | R55 | R56 || R57 | + * |----------------------------------------------- ---------------------------------------------------- + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, R18, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, R28, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, R27, R37, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46, R47, \ + L50, L51, L52, L53, L54, L55, L56, R50, R51, R52, R53, R54, R55, R56, R57 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, KC_NO, KC_NO, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO }, \ + { L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO }, \ + { L50, L51, L52, L53, L54, L55, L56, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, R07, KC_NO }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, R18 }, \ + { R20, R21, R22, R23, R24, R25, R26, R27, R28 }, \ + { R30, R31, R32, R33, R34, R35, R36, R37, KC_NO }, \ + { R40, R41, R42, R43, R44, R45, R46, R47, KC_NO }, \ + { R50, R51, R52, R53, R54, R55, R56, R57, KC_NO } \ + } diff --git a/keyboards/rate/pistachio/rev1/rules.mk b/keyboards/rate/pistachio/rev1/rules.mk new file mode 100644 index 0000000000..909b1e68de --- /dev/null +++ b/keyboards/rate/pistachio/rev1/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes # Enable split keyboard diff --git a/keyboards/rate/pistachio/rev2/config.h b/keyboards/rate/pistachio/rev2/config.h new file mode 100644 index 0000000000..d0de298542 --- /dev/null +++ b/keyboards/rate/pistachio/rev2/config.h @@ -0,0 +1,71 @@ +/* +Copyright 2020 rate + +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 . +*/ + +#pragma once + +/* + * 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) + * + */ +#define MATRIX_ROW_PINS { B5, B4, E6, D7, C6, D4 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4, D3} +#define UNUSED_PINS + +#define USE_I2C + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Split hand configration */ +#define SPLIT_HAND_MATRIX_GRID D4,D3 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D2 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 38, 46 } +#define RGBLED_NUM 84 +#define RGBLIGHT_LIMIT_VAL 195 +#define RGBLIGHT_LAYERS +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) + #define USB_MAX_POWER_CONSUMPTION 400 +#else + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* nKey Rollover */ +#define FORCE_NKRO + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/rate/pistachio/rev2/readme.md b/keyboards/rate/pistachio/rev2/readme.md new file mode 100644 index 0000000000..12d9f6598f --- /dev/null +++ b/keyboards/rate/pistachio/rev2/readme.md @@ -0,0 +1,17 @@ +# pistachio Rev2 + +![pistachio](https://ratelog.net/wp-content/uploads/2021/05/s-IMG_1835.jpg) + +This is a 92-key split keyboard with JIS layout and spare keys. + +* Keyboard Maintainer: [rate](https://github.com/7-rate) [@7_rate](https://twitter.com/7_rate) +* Hardware Supported: pistachio PCB Rev2, Pro Micro, Backlight +* Hardware Availability: [PCB & Case Data](https://github.com/7-rate/Pistachio), [Booth Shop](https://rates.booth.pm/items/2237334) + +Make example for this keyboard (after setting up your build environment): + + make pistachio/rev2:default + +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). + +[Build guide](https://ratelog.net/pistachio-build-guide/) \ No newline at end of file diff --git a/keyboards/rate/pistachio/rev2/rev2.c b/keyboards/rate/pistachio/rev2/rev2.c new file mode 100644 index 0000000000..c6e64a526d --- /dev/null +++ b/keyboards/rate/pistachio/rev2/rev2.c @@ -0,0 +1,19 @@ +/* +Copyright 2020 rate + +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 . +*/ + + +#include "rev2.h" diff --git a/keyboards/rate/pistachio/rev2/rev2.h b/keyboards/rate/pistachio/rev2/rev2.h new file mode 100644 index 0000000000..750778a30e --- /dev/null +++ b/keyboards/rate/pistachio/rev2/rev2.h @@ -0,0 +1,58 @@ +/* +Copyright 2020 rate + +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 . +*/ + +#pragma once + +#include "quantum.h" + +/* + * ,------------------------------------------------- ---------------------------------------------------------. + * | | L00 | | L01 | L02 | L03 | L04 | | L05 | | R00 | R01 | R02 | R03 | | R04 | R05 | R06 | R07 | | + * |-------------------------------------- ---------- ---------------------------------------------------------+ + * | L10 || L11 | L12 | L13 | L14 | L15 | L16 | L17 | | R10 | R11 | R12 | R13 | R14 | R15 | R16 | R17 || R18 | + * |------------------------------------------------- ---------------------------------------------------------+ + * | L20 || L21 | L22 | L23 | L24 | L25 | L26 | | R20 | R21 | R22 | R23 | R24 | R25 | R26 | R27 || R28 | + * |--------------------------------------------- ------------------------------------------- ------+ + * | L30 || L31 | L32 | L33 | L34 | L35 | L36 | | R30 | R31 | R32 | R33 | R34 | R35 | R36 | || R37 | + * |---------------------------------------------- -------------------------------------------------------+ + * | L40 || L41 | L42 | L43 | L44 | L45 | L46 | | R40 | R41 | R42 | R43 | R44 | R45 | R46 || R47 | + * |----------------------------------------------- -----------------------------------------------------+ + * | L50 || L51 | L52 | L53 | L54 | L55 | L56 | | R50 | R51 | R52 | R53 | R54 | R55 | R56 || R57 | + * |----------------------------------------------- ---------------------------------------------------- + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, R18, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, R28, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, R27, R37, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46, R47, \ + L50, L51, L52, L53, L54, L55, L56, R50, R51, R52, R53, R54, R55, R56, R57 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, KC_NO, KC_NO, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO }, \ + { L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO }, \ + { L50, L51, L52, L53, L54, L55, L56, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, R07, KC_NO }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, R18 }, \ + { R20, R21, R22, R23, R24, R25, R26, R28, KC_NO }, \ + { R30, R31, R32, R33, R34, R35, R36, R27, R37 }, \ + { R40, R41, R42, R43, R44, R45, R46, R47, KC_NO }, \ + { R50, R51, R52, R53, R54, R55, R56, R57, KC_NO } \ + } diff --git a/keyboards/rate/pistachio/rev2/rules.mk b/keyboards/rate/pistachio/rev2/rules.mk new file mode 100644 index 0000000000..909b1e68de --- /dev/null +++ b/keyboards/rate/pistachio/rev2/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes # Enable split keyboard diff --git a/keyboards/rate/pistachio/rules.mk b/keyboards/rate/pistachio/rules.mk new file mode 100644 index 0000000000..a5f4485316 --- /dev/null +++ b/keyboards/rate/pistachio/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = rate/pistachio/rev2 diff --git a/keyboards/rate/pistachio_mp/config.h b/keyboards/rate/pistachio_mp/config.h new file mode 100644 index 0000000000..4da866bb7d --- /dev/null +++ b/keyboards/rate/pistachio_mp/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2020 rate + +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.222 + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5255 +#define PRODUCT_ID 0xE212 +#define DEVICE_VER 0x0001 +#define MANUFACTURER rate +#define PRODUCT pistachio_mp + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +#ifdef ENCODER_ENABLE +#define ENCODERS_PAD_A {F4} +#define ENCODERS_PAD_B {F5} +#endif + +/* + * 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) + * + */ +#define MATRIX_ROW_PINS { B4, E6, D7, C6, D4 } +#define MATRIX_COL_PINS { B3, B1, F7, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +#define RGB_DI_PIN D2 +#define RGBLED_NUM 3 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) + #define USB_MAX_POWER_CONSUMPTION 400 +#else + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* nKey Rollover */ +#define FORCE_NKRO + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/rate/pistachio_mp/info.json b/keyboards/rate/pistachio_mp/info.json new file mode 100644 index 0000000000..d4e130300c --- /dev/null +++ b/keyboards/rate/pistachio_mp/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "pistachio_mp", + "url": "", + "maintainer": "rate", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Encoder", "x":3, "y":0}, + + {"label":"Num Lock", "x":0, "y":1.5}, + {"label":"/", "x":1, "y":1.5}, + {"label":"*", "x":2, "y":1.5}, + {"label":"-", "x":3, "y":1.5}, + + {"label":"7", "x":0, "y":2.5}, + {"label":"8", "x":1, "y":2.5}, + {"label":"9", "x":2, "y":2.5}, + + {"label":"4", "x":0, "y":3.5}, + {"label":"5", "x":1, "y":3.5}, + {"label":"6", "x":2, "y":3.5}, + {"label":"+", "x":3, "y":2.5, "h":2}, + + {"label":"1", "x":0, "y":4.5}, + {"label":"2", "x":1, "y":4.5}, + {"label":"3", "x":2, "y":4.5}, + + {"label":"0", "x":0, "y":5.5, "w":2}, + {"label":".", "x":2, "y":5.5}, + {"label":"Enter", "x":3, "y":4.5, "h":2} + ] + } + } +} diff --git a/keyboards/rate/pistachio_mp/keymaps/default/keymap.c b/keyboards/rate/pistachio_mp/keymaps/default/keymap.c new file mode 100644 index 0000000000..c206f30617 --- /dev/null +++ b/keyboards/rate/pistachio_mp/keymaps/default/keymap.c @@ -0,0 +1,56 @@ +/* Copyright 2020 rate + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE = 0, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_MPLY, + LT(_FN, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + /* Fn */ + [_FN] = LAYOUT( + KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, + RGB_HUI, RGB_SAI, RGB_VAI, + RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, + KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO + ) +}; +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + return true; +} +#endif diff --git a/keyboards/rate/pistachio_mp/keymaps/default/readme.md b/keyboards/rate/pistachio_mp/keymaps/default/readme.md new file mode 100644 index 0000000000..2bc50be9dd --- /dev/null +++ b/keyboards/rate/pistachio_mp/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for pistachio_mp diff --git a/keyboards/rate/pistachio_mp/keymaps/via/keymap.c b/keyboards/rate/pistachio_mp/keymaps/via/keymap.c new file mode 100644 index 0000000000..241b501d1d --- /dev/null +++ b/keyboards/rate/pistachio_mp/keymaps/via/keymap.c @@ -0,0 +1,121 @@ +/* Copyright 2020 rate + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE = 0, + _FN, + _RESERVE_0, + _RESERVE_1 +}; + +static uint8_t encoder_state = 0; +static const keypos_t ENC_CW = {.row = 3, .col = 3}; +static const keypos_t ENC_CCW = {.row = 4, .col = 1}; + +#define LAYOUT_via( \ + ECW,ECCW, K07, \ + K00, K01, K02, K03, \ + K04, K05, K06, \ + K08, K09, K10, K11, \ + K12, K13, K14, \ + K15, K16, K17 ) { \ + { K00, K01, K02, K03 }, \ + { K04, K05, K06, K07 }, \ + { K08, K09, K10, K11 }, \ + { K12, K13, K14, ECCW }, \ + { K15, ECW, K16, K17 }, \ +} + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_via( + KC_VOLU,KC_VOLD,KC_MPLY, + LT(_FN, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ), + /* Fn */ + [_FN] = LAYOUT_via( + KC_VOLU,KC_VOLD,KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, + RGB_HUI, RGB_SAI, RGB_VAI, + RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, + KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO + ), + /* Reserve */ + [_RESERVE_0] = LAYOUT_via( + KC_VOLU,KC_VOLD,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + /* Reserve */ + [_RESERVE_1] = LAYOUT_via( + KC_VOLU,KC_VOLD,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +#ifdef ENCODER_ENABLE +void encoder_action_unregister(void) { + if (encoder_state) { + keyevent_t encoder_event = (keyevent_t) { + .key = encoder_state >> 1 ? ENC_CW : ENC_CCW, + .pressed = false, + .time = (timer_read() | 1) + }; + encoder_state = 0; + action_exec(encoder_event); + } + return; +} + +void encoder_action_register(uint8_t index, bool clockwise) { + keyevent_t encoder_event = (keyevent_t) { + .key = clockwise ? ENC_CW : ENC_CCW, + .pressed = true, + .time = (timer_read() | 1) + }; + encoder_state = (clockwise ^ 1) | (clockwise << 1); + action_exec(encoder_event); + return; +} + +void matrix_scan_kb(void) { + encoder_action_unregister(); + matrix_scan_user(); + return; +} + +bool encoder_update_kb(uint8_t index, bool clockwise) { + encoder_action_register(index, clockwise); + // don't return user actions, because they are in the keymap + // encoder_update_user(index, clockwise); + return true; +}; +#endif diff --git a/keyboards/rate/pistachio_mp/keymaps/via/readme.md b/keyboards/rate/pistachio_mp/keymaps/via/readme.md new file mode 100644 index 0000000000..b768049ccc --- /dev/null +++ b/keyboards/rate/pistachio_mp/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for pistachio_mp diff --git a/keyboards/rate/pistachio_mp/keymaps/via/rules.mk b/keyboards/rate/pistachio_mp/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/rate/pistachio_mp/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/rate/pistachio_mp/pistachio_mp.c b/keyboards/rate/pistachio_mp/pistachio_mp.c new file mode 100644 index 0000000000..40e75fe1b0 --- /dev/null +++ b/keyboards/rate/pistachio_mp/pistachio_mp.c @@ -0,0 +1,17 @@ +/* Copyright 2020 rate + * + * 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 . + */ + +#include "pistachio_mp.h" diff --git a/keyboards/rate/pistachio_mp/pistachio_mp.h b/keyboards/rate/pistachio_mp/pistachio_mp.h new file mode 100644 index 0000000000..d7c5c9bad9 --- /dev/null +++ b/keyboards/rate/pistachio_mp/pistachio_mp.h @@ -0,0 +1,48 @@ +/* Copyright 2020 rate + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* + * ,------------------------ + * | K07 | + * |------------------------ + * | K00 | K01 | K02 | K03 | + * |------------------------ + * | K04 | K05 | K06 | | + * |------------------ K11 - + * | K08 | K09 | K10 | | + * |------------------------ + * | K12 | K13 | K14 | | + * |------------------ K17 - + * | K15 | K16 | | + * |------------------------ + */ +#define LAYOUT( \ + K07, \ + K00, K01, K02, K03, \ + K04, K05, K06, \ + K08, K09, K10, K11, \ + K12, K13, K14, \ + K15, K16, K17 ) { \ + { K00, K01, K02, K03 }, \ + { K04, K05, K06, K07 }, \ + { K08, K09, K10, K11 }, \ + { K12, K13, K14, KC_NO }, \ + { K15, KC_NO, K16, K17 }, \ +} diff --git a/keyboards/rate/pistachio_mp/readme.md b/keyboards/rate/pistachio_mp/readme.md new file mode 100644 index 0000000000..b8ea088a4a --- /dev/null +++ b/keyboards/rate/pistachio_mp/readme.md @@ -0,0 +1,21 @@ +# PistachioMacroPad + +![PistachioMacroPad](https://ratelog.net/wp-content/uploads/2020/11/s-PXL_20201114_134133741.jpg) + +This is a numeric keypad with a rotary encoder that uses a stainless steel plate. + +* Keyboard Maintainer: [rate](https://github.com/7-rate) +* Hardware Supported: PistachioMacroPad PCB, Pro Micro, BMP MicroPro +* Hardware Availability: [PCB & CaseData](https://github.com/7-rate/Pistachio_MacroPad.git), [Booth Shop](https://rates.booth.pm/items/2531312) + +Make example for this keyboard (after setting up your build environment): + + make rate/pistachio_mp:default + +Flashing example for this keyboard: + + make rate/pistachio_mp:default:flash + +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). + +[Build guide](https://ratelog.net/pistachiomacropad-build-guide/) diff --git a/keyboards/rate/pistachio_mp/rules.mk b/keyboards/rate/pistachio_mp/rules.mk new file mode 100644 index 0000000000..424aed9074 --- /dev/null +++ b/keyboards/rate/pistachio_mp/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +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 +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes diff --git a/keyboards/rate/pistachio_pro/config.h b/keyboards/rate/pistachio_pro/config.h new file mode 100644 index 0000000000..f268967f6e --- /dev/null +++ b/keyboards/rate/pistachio_pro/config.h @@ -0,0 +1,108 @@ +/* +Copyright 2021 rate + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5255 +#define PRODUCT_ID 0xF40C +#define DEVICE_VE