Skip to content

Commit

Permalink
Add Piantor Vial and EstarDyn clone support
Browse files Browse the repository at this point in the history
Rebased Vial config from [here](beekeeb/vial-qmk-piantor@36c0fa9#diff-50b215a89a3057054d008a63d5be69aee88134514ead8b432ab246662cc8fe53)
produced by Beekeeb, and added support for EstarDyn Pico clones which each have a WS2812 LED
  • Loading branch information
rickyelopez committed Oct 31, 2023
1 parent 31dd035 commit 07e1b13
Show file tree
Hide file tree
Showing 8 changed files with 396 additions and 2 deletions.
10 changes: 10 additions & 0 deletions keyboards/beekeeb/piantor/estardyn/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// can't do vbus sense on this board because
// vbus == vsys when powered from vsys
#undef USB_VBUS_PIN

#define WS2812_DI_PIN GP23
#define RGBLED_NUM 2
#define RGBLED_SPLIT { 1, 1 }

#define RGBLIGHT_LAYERS
#define RGBLIGHT_LAYERS_RETAIN_VAL
11 changes: 11 additions & 0 deletions keyboards/beekeeb/piantor/estardyn/readme.md
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions keyboards/beekeeb/piantor/estardyn/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RGBLIGHT_ENABLE = yes
RGBLIGHT_DRIVER = ws2812
WS2812_DRIVER = vendor
2 changes: 0 additions & 2 deletions keyboards/beekeeb/piantor/keymaps/vial/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@

/* default layer count */
#define DYNAMIC_KEYMAP_LAYER_COUNT 10


8 changes: 8 additions & 0 deletions keyboards/beekeeb/piantor/keymaps/vial_estardyn/config.h
Original file line number Diff line number Diff line change
@@ -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
100 changes: 100 additions & 0 deletions keyboards/beekeeb/piantor/keymaps/vial_estardyn/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// 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
),

[1] = LAYOUT_split_3x6_3(
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, 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,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[2] = LAYOUT_split_3x6_3(
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, 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,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
[3] = LAYOUT_split_3x6_3(
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, 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,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};

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;
}
2 changes: 2 additions & 0 deletions keyboards/beekeeb/piantor/keymaps/vial_estardyn/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes
Loading

0 comments on commit 07e1b13

Please sign in to comment.