summaryrefslogtreecommitdiff
path: root/keyboards/boardsource/microdox/v2
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/boardsource/microdox/v2')
-rw-r--r--keyboards/boardsource/microdox/v2/config.h45
-rw-r--r--keyboards/boardsource/microdox/v2/rules.mk8
-rw-r--r--keyboards/boardsource/microdox/v2/v2.c62
-rw-r--r--keyboards/boardsource/microdox/v2/v2.h22
4 files changed, 137 insertions, 0 deletions
diff --git a/keyboards/boardsource/microdox/v2/config.h b/keyboards/boardsource/microdox/v2/config.h
new file mode 100644
index 0000000000..1f8bc7c3d9
--- /dev/null
+++ b/keyboards/boardsource/microdox/v2/config.h
@@ -0,0 +1,45 @@
+// Copyright 2022 jack (@waffle87)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+#undef MATRIX_ROW_PINS
+#undef MATRIX_COL_PINS
+#define MATRIX_ROW_PINS \
+ { F4, D2, C6, B1 }
+#define MATRIX_COL_PINS \
+ { D4, D7, B3, F7, F6 }
+#define MATRIX_ROW_PINS_RIGHT \
+ { F5, F7, F6, E6 }
+#define MATRIX_COL_PINS_RIGHT \
+ { F4, B1, D7, C6, B3 }
+#undef SOFT_SERIAL_PIN
+#define SOFT_SERIAL_PIN D3
+#undef RGB_DI_PIN
+#define RGB_DI_PIN B5
+#ifdef RGBLIGHT_ENABLE
+# undef RGBLED_NUM
+# undef RGBLED_SPLIT
+# define RGBLED_NUM 8
+# define RGBLED_SPLIT { 4, 4 } // underglow only
+# define RGBLIGHT_SLEEP
+# define RGBLIGHT_EFFECT_BREATHING
+# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+# define RGBLIGHT_EFFECT_STATIC_GRADIENT
+#endif
+#ifdef RGB_MATRIX_ENABLE
+# define DRIVER_LED_TOTAL 44
+# define RGB_MATRIX_SPLIT { 22, 22 }
+# define RGB_DISABLE_WHEN_USB_SUSPENDED
+# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
+# define ENABLE_RGB_MATRIX_ALPHAS_MODS
+# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
+# define ENABLE_RGB_MATRIX_BREATHING
+# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
+# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
+#endif
+#ifdef ENCODER_ENABLE
+# define ENCODERS_PAD_A { E6 }
+# define ENCODERS_PAD_B { B2 }
+# define ENCODERS_PAD_A_RIGHT { B6 }
+# define ENCODERS_PAD_B_RIGHT { B2 }
+#endif
diff --git a/keyboards/boardsource/microdox/v2/rules.mk b/keyboards/boardsource/microdox/v2/rules.mk
new file mode 100644
index 0000000000..0d57a06d1e
--- /dev/null
+++ b/keyboards/boardsource/microdox/v2/rules.mk
@@ -0,0 +1,8 @@
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = WS2812
+RGB_MATRIX_SUPPORTED = yes
+RGBLIGHT_ENABLE = no
+OLED_ENABLE = yes
+OLED_DRIVER = SSD1306
+ENCODER_ENABLE = yes
+LTO_ENABLE = yes
diff --git a/keyboards/boardsource/microdox/v2/v2.c b/keyboards/boardsource/microdox/v2/v2.c
new file mode 100644
index 0000000000..11476a6ea2
--- /dev/null
+++ b/keyboards/boardsource/microdox/v2/v2.c
@@ -0,0 +1,62 @@
+// Copyright 2022 jack (@waffle87)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#include "v2.h"
+
+#ifdef RGB_MATRIX_ENABLE
+led_config_t g_led_config = {
+ {
+ { 13, 14, 15, 16, 17 },
+ { 12, 11, 10, 9, 8 },
+ { 3, 4, 5, 6, 7 },
+ { NO_LED, NO_LED, 2, 1, 0 },
+ //18-21 left underglow
+ { 35, 36, 37, 38, 39 },
+ { 34, 33, 32, 31, 30 },
+ { 25, 26, 27, 28, 29 },
+ { NO_LED, NO_LED, 24, 23, 22 }
+ //40-44 right underglow
+ }, {
+ {99,64}, {74,64}, {49,64}, //0-2
+ {0,42}, {24,42}, {49,42}, {74,42}, {99,42}, //3-7
+ {99,21}, {74,21}, {49,21}, {24,21}, {0,21}, //8-12
+ {0,0}, {24,0}, {49,0}, {74,0}, {99,0}, //13-17
+ {12,11}, {86,11}, {86,53}, {0,64}, //18-21
+ {124,64}, {149,64}, {174,64}, //22-24
+ {224,42}, {199,42}, {174,42}, {149,42}, {124,42}, //25-29
+ {124,21}, {149,21}, {174,21}, {199,21}, {224,21}, //30-34
+ {224,0}, {199,0}, {174,0}, {149,0}, {124,0}, //35-39
+ {211,11}, {136,11}, {136,53}, {224,64} //40-44
+ }, {
+ 1, 1, 1,
+ 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4,
+ 2, 2, 2, 2,
+ 1, 1, 1,
+ 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4,
+ 2, 2, 2, 2
+ }
+};
+#endif
+
+#ifdef ENCODER_ENABLE
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) { return false; }
+ if (index == 0) {
+ if (clockwise) {
+ tap_code_delay(KC_VOLU, 10);
+ } else {
+ tap_code_delay(KC_VOLD, 10);
+ }
+ } else {
+ if (clockwise) {
+ tap_code(KC_MNXT);
+ } else {
+ tap_code(KC_MPRV);
+ }
+ }
+ return false;
+}
+#endif
diff --git a/keyboards/boardsource/microdox/v2/v2.h b/keyboards/boardsource/microdox/v2/v2.h
new file mode 100644
index 0000000000..400660fffa
--- /dev/null
+++ b/keyboards/boardsource/microdox/v2/v2.h
@@ -0,0 +1,22 @@
+// Copyright 2022 jack (@waffle87)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+#include "quantum.h"
+#define xxx KC_NO
+
+#define LAYOUT_split_3x5_3(\
+ k00, k01, k02, k03, k04, k44, k43, k42, k41, k40, \
+ k10, k11, k12, k13, k14, k54, k53, k52, k51, k50, \
+ k20, k21, k22, k23, k24, k64, k63, k62, k61, k60, \
+ k32, k33, k34, k74, k73, k72 \
+ ) \
+ { \
+ { k00, k01, k02, k03, k04 }, \
+ { k10, k11, k12, k13, k14 }, \
+ { k20, k21, k22, k23, k24 }, \
+ { xxx, xxx, k32, k33, k34 }, \
+ { k40, k41, k42, k43, k44 }, \
+ { k50, k51, k52, k53, k54 }, \
+ { k60, k61, k62, k63, k64 }, \
+ { xxx, xxx, k72, k73, k74 } \
+ }