From a5bd3fe0e3f26b5ad65bd997e75cfc42c4afe728 Mon Sep 17 00:00:00 2001 From: Ricky <31072564+rickyelopez@users.noreply.github.com> Date: Mon, 6 Nov 2023 18:59:41 -0800 Subject: [PATCH] Add Piantor Vial and EstarDyn clone support (#586) * Add piantor * Add Piantor Vial and EstarDyn clone support Rebased Vial config from [here](https://github.com/beekeeb/vial-qmk-piantor/commit/36c0fa94a3c50bbd8d1c42e534eb4c0f5963c158#diff-50b215a89a3057054d008a63d5be69aee88134514ead8b432ab246662cc8fe53) produced by Beekeeb, and added support for EstarDyn Pico clones which each have a WS2812 LED --------- Co-authored-by: Leo Lou --- keyboards/beekeeb/piantor/estardyn/config.h | 6 + keyboards/beekeeb/piantor/estardyn/readme.md | 11 + keyboards/beekeeb/piantor/estardyn/rules.mk | 3 + .../beekeeb/piantor/keymaps/vial/config.h | 8 + .../beekeeb/piantor/keymaps/vial/keymap.c | 85 +++++++ .../beekeeb/piantor/keymaps/vial/rules.mk | 2 + .../beekeeb/piantor/keymaps/vial/vial.json | 214 ++++++++++++++++++ keyboards/beekeeb/piantor/rpi_pico/config.h | 1 + keyboards/beekeeb/piantor/rpi_pico/rules.mk | 0 keyboards/beekeeb/piantor/weact/config.h | 1 + keyboards/beekeeb/piantor/weact/rules.mk | 0 11 files changed, 331 insertions(+) create mode 100644 keyboards/beekeeb/piantor/estardyn/config.h create mode 100644 keyboards/beekeeb/piantor/estardyn/readme.md create mode 100644 keyboards/beekeeb/piantor/estardyn/rules.mk create mode 100644 keyboards/beekeeb/piantor/keymaps/vial/config.h create mode 100644 keyboards/beekeeb/piantor/keymaps/vial/keymap.c create mode 100644 keyboards/beekeeb/piantor/keymaps/vial/rules.mk create mode 100644 keyboards/beekeeb/piantor/keymaps/vial/vial.json create mode 100644 keyboards/beekeeb/piantor/rpi_pico/config.h create mode 100644 keyboards/beekeeb/piantor/rpi_pico/rules.mk create mode 100644 keyboards/beekeeb/piantor/weact/config.h create mode 100644 keyboards/beekeeb/piantor/weact/rules.mk diff --git a/keyboards/beekeeb/piantor/estardyn/config.h b/keyboards/beekeeb/piantor/estardyn/config.h new file mode 100644 index 00000000000..10b9d99344a --- /dev/null +++ b/keyboards/beekeeb/piantor/estardyn/config.h @@ -0,0 +1,6 @@ +#define WS2812_DI_PIN GP23 +#define RGBLED_NUM 2 +#define RGBLED_SPLIT { 1, 1 } + +#define RGBLIGHT_LAYERS +#define RGBLIGHT_LAYERS_RETAIN_VAL diff --git a/keyboards/beekeeb/piantor/estardyn/readme.md b/keyboards/beekeeb/piantor/estardyn/readme.md new file mode 100644 index 00000000000..df803dad797 --- /dev/null +++ b/keyboards/beekeeb/piantor/estardyn/readme.md @@ -0,0 +1,11 @@ +# EstarDyn Raspberry Pi Pico Clone + +Like [this](https://www.aliexpress.us/item/3256803610338545.html) + +Because of a difference in how `VIN` and `VOUT` (called `VBUS` and `VSYS` on the genuine Pico) are wired, +`USB_VBUS_PIN` cannot be used. + +For the same reason as above, you will have to bridge the `VIN` and `VOUT` pins for the right half to be powered properly + +The EstarDyn clone has a ws2812 wired to pin `GP23`. Both (one per half) have been enabled +in this config and configured as layer indicator leds diff --git a/keyboards/beekeeb/piantor/estardyn/rules.mk b/keyboards/beekeeb/piantor/estardyn/rules.mk new file mode 100644 index 00000000000..ca767bdc604 --- /dev/null +++ b/keyboards/beekeeb/piantor/estardyn/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +RGBLIGHT_DRIVER = ws2812 +WS2812_DRIVER = vendor diff --git a/keyboards/beekeeb/piantor/keymaps/vial/config.h b/keyboards/beekeeb/piantor/keymaps/vial/config.h new file mode 100644 index 00000000000..2c1e29fe14b --- /dev/null +++ b/keyboards/beekeeb/piantor/keymaps/vial/config.h @@ -0,0 +1,8 @@ +/* keyboard uid */ +#define VIAL_KEYBOARD_UID {0xDC, 0x6D, 0x9C, 0x42, 0x53, 0x42, 0x75, 0x0F} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 4 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 5 } + +/* default layer count */ +#define DYNAMIC_KEYMAP_LAYER_COUNT 10 diff --git a/keyboards/beekeeb/piantor/keymaps/vial/keymap.c b/keyboards/beekeeb/piantor/keymaps/vial/keymap.c new file mode 100644 index 00000000000..3df7a022add --- /dev/null +++ b/keyboards/beekeeb/piantor/keymaps/vial/keymap.c @@ -0,0 +1,85 @@ +// Copyright 2022 Diego Palacios (@diepala) +// SPDX-License-Identifier: GPL-2.0 + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ + * │Tab│ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │Bsp│ + * ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + * │Ctl│ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ + * ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ + * │Sft│ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │Sft│ + * └───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┘ + * ┌───┐ ┌───┐ + * │GUI├───┐ ┌───┤Alt│ + * └───┤ ├───┐ ┌───┤ ├───┘ + * └───┤Bsp│ │Ent├───┘ + * └───┘ └───┘ + */ + [0] = LAYOUT_split_3x6_3( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, KC_RALT + ) +}; + +#ifdef RGBLIGHT_ENABLE + +const rgblight_segment_t PROGMEM layer0_colors[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, 85, 255, 75} +); +const rgblight_segment_t PROGMEM layer1_colors[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, 170, 255, 75} +); +const rgblight_segment_t PROGMEM layer2_colors[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, 0, 255, 75} +); +const rgblight_segment_t PROGMEM layer3_colors[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, 191, 255, 75} +); +const rgblight_segment_t PROGMEM layer4_colors[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, 30, 218, 75} +); +const rgblight_segment_t PROGMEM layer5_colors[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, 11, 176, 75} +); +const rgblight_segment_t PROGMEM layer6_colors[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 2, 106, 255, 75} +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( + layer0_colors, + layer1_colors, + layer2_colors, + layer3_colors, + layer4_colors, + layer5_colors, + layer6_colors +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = rgb_layers; +} + +layer_state_t default_layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(0, layer_state_cmp(state, 0)); + return state; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(0, layer_state_cmp(state, 0)); + rgblight_set_layer_state(1, layer_state_cmp(state, 1)); + rgblight_set_layer_state(2, layer_state_cmp(state, 2)); + rgblight_set_layer_state(3, layer_state_cmp(state, 3)); + rgblight_set_layer_state(4, layer_state_cmp(state, 4)); + rgblight_set_layer_state(5, layer_state_cmp(state, 5)); + rgblight_set_layer_state(6, layer_state_cmp(state, 6)); + return state; +} + +#endif diff --git a/keyboards/beekeeb/piantor/keymaps/vial/rules.mk b/keyboards/beekeeb/piantor/keymaps/vial/rules.mk new file mode 100644 index 00000000000..b60410dc1a1 --- /dev/null +++ b/keyboards/beekeeb/piantor/keymaps/vial/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +VIAL_ENABLE = yes diff --git a/keyboards/beekeeb/piantor/keymaps/vial/vial.json b/keyboards/beekeeb/piantor/keymaps/vial/vial.json new file mode 100644 index 00000000000..6221ea4535b --- /dev/null +++ b/keyboards/beekeeb/piantor/keymaps/vial/vial.json @@ -0,0 +1,214 @@ +{ + "name": "piantor", + "lighting": "none", + "matrix": { + "rows": 8, + "cols": 6 + }, + "layouts": { + "keymap": [ + [ + { + "x": 3 + }, + "0,3", + { + "x": 7.5 + }, + "4,2" + ], + [ + { + "y": -0.75, + "x": 2 + }, + "0,2", + { + "x": 1 + }, + "0,4", + { + "x": 5.5 + }, + "4,1", + { + "x": 1 + }, + "4,3" + ], + [ + { + "y": -0.9, + "x": 5 + }, + "0,5", + { + "x": 3.5 + }, + "4,0" + ], + [ + { + "y": -0.3500000000000001 + }, + "0,0", + "0,1", + { + "x": 1 + }, + "1,3", + { + "x": 7.5 + }, + "5,2", + { + "x": 1 + }, + "4,4", + "4,5" + ], + [ + { + "y": -0.75, + "x": 2 + }, + "1,2", + { + "x": 1 + }, + "1,4", + { + "x": 5.5 + }, + "5,1", + { + "x": 1 + }, + "5,3" + ], + [ + { + "y": -0.8999999999999999, + "x": 5 + }, + "1,5", + { + "x": 3.5 + }, + "5,0" + ], + [ + { + "y": -0.3500000000000001 + }, + "1,0", + "1,1", + { + "x": 1 + }, + "2,3", + { + "x": 7.5 + }, + "6,2", + { + "x": 1 + }, + "5,4", + "5,5" + ], + [ + { + "y": -0.75, + "x": 2 + }, + "2,2", + { + "x": 1 + }, + "2,4", + { + "x": 5.5 + }, + "6,1", + { + "x": 1 + }, + "6,3" + ], + [ + { + "y": -0.8999999999999999, + "x": 5 + }, + "2,5", + { + "x": 3.5 + }, + "6,0" + ], + [ + { + "y": -0.3500000000000001 + }, + "2,0", + "2,1", + { + "x": 11.5 + }, + "6,4", + "6,5" + ], + [ + { + "r": 5, + "rx": 5, + "ry": 3.5, + "x": 0.09999999999999964 + }, + "3,1" + ], + [ + { + "rx": 10.75 + }, + "7,2" + ], + [ + { + "r": 15, + "rx": 6.5, + "y": 0.20000000000000018, + "x": -0.04999999999999982 + }, + "3,2" + ], + [ + { + "r": -15, + "rx": 8.25, + "y": 0.3900000000000001, + "x": -0.15000000000000036 + }, + "7,0" + ], + [ + { + "r": -5, + "rx": 3.6, + "y": 0.10000000000000009, + "x": 0.20000000000000018 + }, + "3,0" + ], + [ + { + "rx": 9.5, + "y": 0.10000000000000009, + "x": -0.05000000000000071 + }, + "7,1" + ] + ] + } +} diff --git a/keyboards/beekeeb/piantor/rpi_pico/config.h b/keyboards/beekeeb/piantor/rpi_pico/config.h new file mode 100644 index 00000000000..ef4ec3ce947 --- /dev/null +++ b/keyboards/beekeeb/piantor/rpi_pico/config.h @@ -0,0 +1 @@ +#define USB_VBUS_PIN GP24 diff --git a/keyboards/beekeeb/piantor/rpi_pico/rules.mk b/keyboards/beekeeb/piantor/rpi_pico/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/beekeeb/piantor/weact/config.h b/keyboards/beekeeb/piantor/weact/config.h new file mode 100644 index 00000000000..64380f6e6b7 --- /dev/null +++ b/keyboards/beekeeb/piantor/weact/config.h @@ -0,0 +1 @@ +#define USB_VBUS_PIN GP29 diff --git a/keyboards/beekeeb/piantor/weact/rules.mk b/keyboards/beekeeb/piantor/weact/rules.mk new file mode 100644 index 00000000000..e69de29bb2d