diff options
| author | Legonut <legonut3@gmail.com> | 2020-11-10 01:22:22 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-09 22:22:22 -0800 |
| commit | abf1902ff597e77e910c0fb9a8d132b46f78317b (patch) | |
| tree | 96e69eca6df482de55366d038e940484ad0d5ad5 | |
| parent | aa90cf1da895aaa280cc19068037c74de644bd27 (diff) | |
| download | qmk_firmware-abf1902ff597e77e910c0fb9a8d132b46f78317b.tar.gz qmk_firmware-abf1902ff597e77e910c0fb9a8d132b46f78317b.zip | |
[Keyboard] RGBKB Pan (#9587)
* Add new keyboard Pan
Encoder switches still need work
* New keyboard Pan
Should be complete
* Split MCU selection into 2 revision folders
* [rgbkb/pan] Make requested changes for PR
Additionally, set DEFAULT_FOLDER to rev1, and default rev1
to atmega32a (as all shipped kits include an atmega32a)
* Apply suggestions from code review
* Fix default keymap typo
* add usb max power define
* Commit suggested changes
* Update keyboards/rgbkb/pan/config.h
* Apply suggestions from code review
Small copyright updates
* Apply suggestions from code review
| -rw-r--r-- | keyboards/rgbkb/pan/config.h | 43 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/keymaps/default/keymap.c | 117 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/keymaps/default/rules.mk | 6 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/pan.c | 88 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/pan.h | 37 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/post_rules.mk | 22 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/readme.md | 19 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/rev1/32a/config.h | 24 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/rev1/32a/post_rules.mk | 22 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/rev1/32a/rules.mk | 8 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/rev1/proton_c/config.h | 24 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/rev1/proton_c/post_rules.mk | 22 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/rev1/proton_c/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/rev1/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/rgbkb/pan/rules.mk | 25 |
15 files changed, 461 insertions, 0 deletions
diff --git a/keyboards/rgbkb/pan/config.h b/keyboards/rgbkb/pan/config.h new file mode 100644 index 000000000..a1a2aae9f --- /dev/null +++ b/keyboards/rgbkb/pan/config.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /*Copyright 2020 RGBKB | ||
| 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 "config_common.h" | ||
| 20 | |||
| 21 | #define VENDOR_ID 0x5247 // "RG" - RGBKB | ||
| 22 | #define PRODUCT_ID 0x8C9C // Pan | ||
| 23 | #define DEVICE_VER 0x0002 | ||
| 24 | #define MANUFACTURER RGBKB | ||
| 25 | #define PRODUCT Pan | ||
| 26 | |||
| 27 | /* key matrix size */ | ||
| 28 | #define MATRIX_ROWS 5 | ||
| 29 | #define MATRIX_COLS 13 | ||
| 30 | |||
| 31 | #define ENCODER_RESOLUTION 4 | ||
| 32 | #define RGBLED_NUM 64 | ||
| 33 | #define RGBLIGHT_ANIMATIONS | ||
| 34 | #define DRIVER_LED_TOTAL RGBLED_NUM | ||
| 35 | |||
| 36 | /* COL2ROW, ROW2COL*/ | ||
| 37 | #define DIODE_DIRECTION COL2ROW | ||
| 38 | |||
| 39 | #define RGBLIGHT_LIMIT_VAL 120 | ||
| 40 | #define USB_MAX_POWER_CONSUMPTION 500 | ||
| 41 | |||
| 42 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 43 | #define DEBOUNCE 5 | ||
diff --git a/keyboards/rgbkb/pan/keymaps/default/keymap.c b/keyboards/rgbkb/pan/keymaps/default/keymap.c new file mode 100644 index 000000000..c041c0b57 --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default/keymap.c | |||
| @@ -0,0 +1,117 @@ | |||
| 1 | /* Copyright 2020 RGBKB | ||
| 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 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 17 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 18 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 19 | // entirely and just use numbers. | ||
| 20 | #include QMK_KEYBOARD_H | ||
| 21 | |||
| 22 | enum layer_number { | ||
| 23 | _QWERTY, | ||
| 24 | _COLEMAK, | ||
| 25 | _FN, | ||
| 26 | _ADJ | ||
| 27 | }; | ||
| 28 | |||
| 29 | #define FN_ESC LT(_FN, KC_ESC) | ||
| 30 | #define FN_CAPS LT(_FN, KC_CAPS) | ||
| 31 | #define QWERTY DF(_QWERTY) | ||
| 32 | #define COLEMAK DF(_COLEMAK) | ||
| 33 | |||
| 34 | |||
| 35 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 36 | [_QWERTY] = LAYOUT_all( | ||
| 37 | KC_NO, KC_NO, | ||
| 38 | GRAVE_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_DEL, | ||
| 39 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | ||
| 40 | FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, | ||
| 41 | KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, | ||
| 42 | KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT | ||
| 43 | ), | ||
| 44 | |||
| 45 | [_COLEMAK] = LAYOUT_all( | ||
| 46 | KC_NO, KC_NO, | ||
| 47 | GRAVE_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_DEL, | ||
| 48 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, | ||
| 49 | FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, | ||
| 50 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_ENT, | ||
| 51 | KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT | ||
| 52 | ), | ||
| 53 | |||
| 54 | [_FN] = LAYOUT_all( | ||
| 55 | KC_NO, KC_NO, | ||
| 56 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, | ||
| 57 | _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, | ||
| 58 | _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, | ||
| 59 | _______, _______, _______, _______, _______, _______, _______, KC_LBRC, _______, KC_RBRC, _______, _______, _______, | ||
| 60 | _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 61 | ), | ||
| 62 | |||
| 63 | [_ADJ] = LAYOUT_all( | ||
| 64 | KC_NO, KC_NO, | ||
| 65 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, | ||
| 66 | _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, | ||
| 67 | _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, | ||
| 68 | _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, | ||
| 69 | _______, _______, _______, RGB_MOD, _______, _______, _______, KC_P0, KC_PDOT, KC_NLCK, _QWERTY, _COLEMAK | ||
| 70 | ) | ||
| 71 | }; | ||
| 72 | |||
| 73 | #ifdef OLED_DRIVER_ENABLE | ||
| 74 | void oled_task_user(void) { | ||
| 75 | // Host Keyboard Layer Status | ||
| 76 | oled_write_P(PSTR("RGBKB Pan\n"), false); | ||
| 77 | oled_write_P(PSTR("Layer: "), false); | ||
| 78 | uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); | ||
| 79 | switch (layer) { | ||
| 80 | case _QWERTY: | ||
| 81 | oled_write_P(PSTR("Default\n"), false); | ||
| 82 | break; | ||
| 83 | case _COLEMAK: | ||
| 84 | oled_write_P(PSTR("Colemak\n"), false); | ||
| 85 | break; | ||
| 86 | case _FN: | ||
| 87 | oled_write_P(PSTR("Function\n"), false); | ||
| 88 | break; | ||
| 89 | case _ADJ: | ||
| 90 | oled_write_P(PSTR("Adjust\n"), false); | ||
| 91 | break; | ||
| 92 | default: | ||
| 93 | oled_write_P(PSTR("Undefined\n"), false); | ||
| 94 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 95 | //oled_write_ln_P(PSTR("Undefined"), false); | ||
| 96 | } | ||
| 97 | led_t led_state = host_keyboard_led_state(); | ||
| 98 | oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false); | ||
| 99 | oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false); | ||
| 100 | } | ||
| 101 | #endif | ||
| 102 | |||
| 103 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 104 | if (index == 0) { // First encoder - right | ||
| 105 | if (clockwise) { | ||
| 106 | tap_code(KC_VOLU); | ||
| 107 | } else { | ||
| 108 | tap_code(KC_VOLD); | ||
| 109 | } | ||
| 110 | } else if (index == 1) { // Second encoder - left | ||
| 111 | if (clockwise) { | ||
| 112 | tap_code(KC_VOLU); | ||
| 113 | } else { | ||
| 114 | tap_code(KC_VOLD); | ||
| 115 | } | ||
| 116 | } | ||
| 117 | } | ||
diff --git a/keyboards/rgbkb/pan/keymaps/default/rules.mk b/keyboards/rgbkb/pan/keymaps/default/rules.mk new file mode 100644 index 000000000..9ad29c645 --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default/rules.mk | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | # RGB layout selection | ||
| 2 | RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips | ||
| 3 | STAGGERED_LAYOUT = no # If you soldered R1-A12 and R4-A12, enable this. | ||
| 4 | |||
| 5 | # Do not edit past here | ||
| 6 | include keyboards/$(KEYBOARD)/post_rules.mk | ||
diff --git a/keyboards/rgbkb/pan/pan.c b/keyboards/rgbkb/pan/pan.c new file mode 100644 index 000000000..bc438f2d0 --- /dev/null +++ b/keyboards/rgbkb/pan/pan.c | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | /* Copyright 2020 RGBKB | ||
| 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 "pan.h" | ||
| 17 | #include "quantum.h" | ||
| 18 | #include "rgb_matrix_types.h" | ||
| 19 | |||
| 20 | |||
| 21 | #if defined RGB_MATRIX_ENABLE | ||
| 22 | led_config_t g_led_config = { { | ||
| 23 | { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, | ||
| 24 | { 0, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, | ||
| 25 | { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1 }, | ||
| 26 | { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40 }, | ||
| 27 | { 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, NO_LED } | ||
| 28 | }, { | ||
| 29 | #ifdef STAGGERED_RGB_ENCODERS | ||
| 30 | {0, -19},{228, -19}, | ||
| 31 | {0, 0}, {14, 0}, {33, 0}, {52, 0}, {71, 0}, {90, 0}, {109, 0}, {128, 0}, {147, 0}, {166, 0}, {185, 0}, {204, 0}, {223, 0}, | ||
| 32 | {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, | ||
| 33 | {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, | ||
| 34 | {223, 57}, {204, 57}, {185, 57}, {171, 57}, {147, 57}, {128, 57}, {109, 57}, {90, 57}, {71, 57}, {52, 57}, {33, 57}, {14, 57}, {0, 57}, | ||
| 35 | {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, | ||
| 36 | #elif defined RGB_ENCODERS | ||
| 37 | {0, -19},{228, -19}, | ||
| 38 | {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, | ||
| 39 | {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, | ||
| 40 | {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, | ||
| 41 | {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, | ||
| 42 | {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, | ||
| 43 | {0, 95},{19, 95}, //not used | ||
| 44 | #elif defined STAGGERED_LAYOUT | ||
| 45 | {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, {0, 0}, | ||
| 46 | {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, | ||
| 47 | {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, | ||
| 48 | {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, {0, 0}, | ||
| 49 | {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, | ||
| 50 | {0, 95},{19, 95},//not used | ||
| 51 | #else | ||
| 52 | {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, | ||
| 53 | {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, | ||
| 54 | {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, | ||
| 55 | {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, | ||
| 56 | {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, | ||
| 57 | {0, 0},{0, 0}, {0, 0},{0, 0},//not used | ||
| 58 | #endif | ||
| 59 | }, { | ||
| 60 | #ifdef STAGGERED_RGB_ENCODERS | ||
| 61 | 1, 1, | ||
| 62 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 63 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 64 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 65 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 66 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||
| 67 | #elif defined RGB_ENCODERS | ||
| 68 | 1, 1, | ||
| 69 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 70 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 71 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 72 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 73 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||
| 74 | #elif defined STAGGERED_LAYOUT | ||
| 75 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 76 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 77 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 78 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 79 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||
| 80 | #else | ||
| 81 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 82 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 83 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 84 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 85 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||
| 86 | #endif | ||
| 87 | } }; | ||
| 88 | #endif | ||
diff --git a/keyboards/rgbkb/pan/pan.h b/keyboards/rgbkb/pan/pan.h new file mode 100644 index 000000000..c1b9f77f6 --- /dev/null +++ b/keyboards/rgbkb/pan/pan.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* Copyright 2020 RGBKB | ||
| 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 | #define _x_ KC_NO | ||
| 20 | |||
| 21 | #include "quantum.h" | ||
| 22 | |||
| 23 | #define LAYOUT_all( \ | ||
| 24 | E01, E02, \ | ||
| 25 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 */\ | ||
| 26 | /* 0 */ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \ | ||
| 27 | /* 1 */ K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \ | ||
| 28 | /* 2 */ K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \ | ||
| 29 | /* 3 */ K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K50, \ | ||
| 30 | /* 4 */ K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62 \ | ||
| 31 | ) { \ | ||
| 32 | /* 0 */{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12 }, \ | ||
| 33 | /* 1 */{ K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, KC_NO }, \ | ||
| 34 | /* 2 */{ K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, KC_NO }, \ | ||
| 35 | /* 3 */{ K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K50 }, \ | ||
| 36 | /* 4 */{ K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, KC_NO, K62 } \ | ||
| 37 | } | ||
diff --git a/keyboards/rgbkb/pan/post_rules.mk b/keyboards/rgbkb/pan/post_rules.mk new file mode 100644 index 000000000..7947d1d9b --- /dev/null +++ b/keyboards/rgbkb/pan/post_rules.mk | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines | ||
| 2 | ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) | ||
| 3 | OPT_DEFS += -DRGB_MATRIX_KEYPRESSES | ||
| 4 | endif | ||
| 5 | |||
| 6 | ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) | ||
| 7 | OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
| 8 | endif | ||
| 9 | |||
| 10 | ifeq ($(strip $(STAGGERED_LAYOUT)), yes) | ||
| 11 | OPT_DEFS += -DSTAGGERED_LAYOUT | ||
| 12 | endif | ||
| 13 | |||
| 14 | ifeq ($(strip $(RGB_ENCODERS)), yes) | ||
| 15 | OPT_DEFS += -DRGB_ENCODERS | ||
| 16 | endif | ||
| 17 | |||
| 18 | ifeq ($(strip $(RGB_ENCODERS)), yes) | ||
| 19 | ifeq ($(strip $(STAGGERED_LAYOUT)), yes) | ||
| 20 | OPT_DEFS += -DSTAGGERED_RGB_ENCODERS=$(strip $(STAGGERED_RGB_ENCODERS)) | ||
| 21 | endif | ||
| 22 | endif | ||
diff --git a/keyboards/rgbkb/pan/readme.md b/keyboards/rgbkb/pan/readme.md new file mode 100644 index 000000000..f7041605c --- /dev/null +++ b/keyboards/rgbkb/pan/readme.md | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # Pan | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | Ortho or Staggered DIY kit with RGB | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [RGBKB](https://github.com/RGBKB) | ||
| 8 | * Hardware Supported: Pan, atmega32a or Proton-C | ||
| 9 | * Hardware Availability: [rgbkb.net](https://www.rgbkb.net/), [GitHub](https://github.com/RGBKB/Keyboard-files/tree/master/Pan) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make rgbkb/pan/rev1/32a:default | ||
| 14 | |||
| 15 | If you are using the Proton-C: | ||
| 16 | |||
| 17 | make rgbkb/pan/rev1/proton_c:default | ||
| 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). | ||
diff --git a/keyboards/rgbkb/pan/rev1/32a/config.h b/keyboards/rgbkb/pan/rev1/32a/config.h new file mode 100644 index 000000000..ed5d3457c --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/32a/config.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /*Copyright 2020 RGBKB | ||
| 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 "config_common.h" | ||
| 20 | #define MATRIX_ROW_PINS { D7, D1, D5, D6, C2 } | ||
| 21 | #define MATRIX_COL_PINS { C3, C4, C5, C6, C7, A7, A6, A5, A4, A3, A2, A1, A0 } | ||
| 22 | #define ENCODERS_PAD_A { B0, D0 } | ||
| 23 | #define ENCODERS_PAD_B { B1, B2} | ||
| 24 | #define RGB_DI_PIN B3 | ||
diff --git a/keyboards/rgbkb/pan/rev1/32a/post_rules.mk b/keyboards/rgbkb/pan/rev1/32a/post_rules.mk new file mode 100644 index 000000000..7947d1d9b --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/32a/post_rules.mk | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines | ||
| 2 | ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) | ||
| 3 | OPT_DEFS += -DRGB_MATRIX_KEYPRESSES | ||
| 4 | endif | ||
| 5 | |||
| 6 | ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) | ||
| 7 | OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
| 8 | endif | ||
| 9 | |||
| 10 | ifeq ($(strip $(STAGGERED_LAYOUT)), yes) | ||
| 11 | OPT_DEFS += -DSTAGGERED_LAYOUT | ||
| 12 | endif | ||
| 13 | |||
| 14 | ifeq ($(strip $(RGB_ENCODERS)), yes) | ||
| 15 | OPT_DEFS += -DRGB_ENCODERS | ||
| 16 | endif | ||
| 17 | |||
| 18 | ifeq ($(strip $(RGB_ENCODERS)), yes) | ||
| 19 | ifeq ($(strip $(STAGGERED_LAYOUT)), yes) | ||
| 20 | OPT_DEFS += -DSTAGGERED_RGB_ENCODERS=$(strip $(STAGGERED_RGB_ENCODERS)) | ||
| 21 | endif | ||
| 22 | endif | ||
diff --git a/keyboards/rgbkb/pan/rev1/32a/rules.mk b/keyboards/rgbkb/pan/rev1/32a/rules.mk new file mode 100644 index 000000000..321ecc5c1 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/32a/rules.mk | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32a | ||
| 3 | |||
| 4 | # Processor frequency | ||
| 5 | F_CPU = 16000000 | ||
| 6 | |||
| 7 | # Bootloader selection | ||
| 8 | BOOTLOADER = USBasp | ||
diff --git a/keyboards/rgbkb/pan/rev1/proton_c/config.h b/keyboards/rgbkb/pan/rev1/proton_c/config.h new file mode 100644 index 000000000..7a909a9a1 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/proton_c/config.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /*Copyright 2020 RGBKB | ||
| 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 "config_common.h" | ||
| 20 | #define MATRIX_ROW_PINS { A15, B10, A14, A13, A7 } | ||
| 21 | #define MATRIX_COL_PINS { A8, A6, B0, B1, B2, B4, B5, A1, A2, B3, B9, A10, A9 } | ||
| 22 | #define ENCODERS_PAD_A { B14, B11 } | ||
| 23 | #define ENCODERS_PAD_B { B15, B12 } | ||
| 24 | #define RGB_DI_PIN A3 | ||
diff --git a/keyboards/rgbkb/pan/rev1/proton_c/post_rules.mk b/keyboards/rgbkb/pan/rev1/proton_c/post_rules.mk new file mode 100644 index 000000000..7947d1d9b --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/proton_c/post_rules.mk | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines | ||
| 2 | ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) | ||
| 3 | OPT_DEFS += -DRGB_MATRIX_KEYPRESSES | ||
| 4 | endif | ||
| 5 | |||
| 6 | ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) | ||
| 7 | OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
| 8 | endif | ||
| 9 | |||
| 10 | ifeq ($(strip $(STAGGERED_LAYOUT)), yes) | ||
| 11 | OPT_DEFS += -DSTAGGERED_LAYOUT | ||
| 12 | endif | ||
| 13 | |||
| 14 | ifeq ($(strip $(RGB_ENCODERS)), yes) | ||
| 15 | OPT_DEFS += -DRGB_ENCODERS | ||
| 16 | endif | ||
| 17 | |||
| 18 | ifeq ($(strip $(RGB_ENCODERS)), yes) | ||
| 19 | ifeq ($(strip $(STAGGERED_LAYOUT)), yes) | ||
| 20 | OPT_DEFS += -DSTAGGERED_RGB_ENCODERS=$(strip $(STAGGERED_RGB_ENCODERS)) | ||
| 21 | endif | ||
| 22 | endif | ||
diff --git a/keyboards/rgbkb/pan/rev1/proton_c/rules.mk b/keyboards/rgbkb/pan/rev1/proton_c/rules.mk new file mode 100644 index 000000000..b17a3d031 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/proton_c/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = STM32F303 | ||
diff --git a/keyboards/rgbkb/pan/rev1/rules.mk b/keyboards/rgbkb/pan/rev1/rules.mk new file mode 100644 index 000000000..4d3c0f667 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | # The default configuration is a atmega32a | ||
| 2 | DEFAULT_FOLDER = rgbkb/pan/rev1/32a | ||
diff --git a/keyboards/rgbkb/pan/rules.mk b/keyboards/rgbkb/pan/rules.mk new file mode 100644 index 000000000..196030450 --- /dev/null +++ b/keyboards/rgbkb/pan/rules.mk | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # Build Options | ||
| 2 | # change yes to no to disable | ||
| 3 | # | ||
| 4 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 5 | MOUSEKEY_ENABLE = no # Mouse keys | ||
| 6 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 7 | CONSOLE_ENABLE = no # Console for debug | ||
| 8 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 9 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 10 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 11 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 12 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 13 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 14 | AUDIO_ENABLE = no # Audio output | ||
| 15 | RGB_MATRIX_ENABLE = WS2812 | ||
| 16 | WS2812_DRIVER = bitbang | ||
| 17 | ENCODER_ENABLE = yes | ||
| 18 | OLED_DRIVER_ENABLE = yes | ||
| 19 | |||
| 20 | # RGB layout selection | ||
| 21 | RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips | ||
| 22 | STAGGERED_LAYOUT = no # If you soldered R1-A12 and R4-A12, enable this. | ||
| 23 | |||
| 24 | # Default to revision 1 | ||
| 25 | DEFAULT_FOLDER = rgbkb/pan/rev1 | ||
