summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsol <1731279+s-ol@users.noreply.github.com>2022-04-13 07:46:12 +0200
committerGitHub <noreply@github.com>2022-04-12 22:46:12 -0700
commit8cc86490aac59a93ece62229cc93097a17420fa5 (patch)
tree8888ac7283017257da5b3687190ce26a67929f09
parenta5e41615f729ab1d68e56a59f05dbcad30beadd7 (diff)
[Keyboard] Add s-ol/0xC.pad (#16057)
* [Keyboard] Add s_ol/0xc_pad * [Keyboard] add factory testing RGB_MATRIX pattern Co-authored-by: s-ol <s-ol@users.noreply.github.com>
-rw-r--r--keyboards/s_ol/0xc_pad/0xc_pad.c30
-rw-r--r--keyboards/s_ol/0xc_pad/0xc_pad.h36
-rw-r--r--keyboards/s_ol/0xc_pad/config.h49
-rw-r--r--keyboards/s_ol/0xc_pad/info.json33
-rw-r--r--keyboards/s_ol/0xc_pad/keymaps/default/config.h18
-rw-r--r--keyboards/s_ol/0xc_pad/keymaps/default/keymap.c25
-rw-r--r--keyboards/s_ol/0xc_pad/keymaps/default/readme.md5
-rw-r--r--keyboards/s_ol/0xc_pad/keymaps/default/rgb_matrix_user.inc41
-rw-r--r--keyboards/s_ol/0xc_pad/keymaps/default/rules.mk1
-rw-r--r--keyboards/s_ol/0xc_pad/readme.md24
-rw-r--r--keyboards/s_ol/0xc_pad/rules.mk22
-rw-r--r--keyboards/s_ol/info.json4
12 files changed, 288 insertions, 0 deletions
diff --git a/keyboards/s_ol/0xc_pad/0xc_pad.c b/keyboards/s_ol/0xc_pad/0xc_pad.c
new file mode 100644
index 0000000000..b8dd2976ef
--- /dev/null
+++ b/keyboards/s_ol/0xc_pad/0xc_pad.c
@@ -0,0 +1,30 @@
+/* Copyright 2021 s-ol
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#include "0xc_pad.h"
+
+#ifdef RGB_MATRIX_ENABLE
+# define Q(...) __VA_ARGS__
+
+led_config_t g_led_config = {
+ // indices
+ LAYOUT(0, 6, 1, 5, 7, 2, 4, 8, 11, 3, 9, 10),
+ // phys position
+ LED_LAYOUT(Q({96, 110}), Q({128, 110}), Q({80, 83}), Q({112, 83}), Q({144, 83}), Q({64, 55}), Q({96, 55}), Q({128, 55}), Q({160, 55}), Q({80, 28}), Q({112, 28}), Q({144, 28})),
+ // flags
+ LED_LAYOUT(4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4),
+};
+# undef Q
+#endif
diff --git a/keyboards/s_ol/0xc_pad/0xc_pad.h b/keyboards/s_ol/0xc_pad/0xc_pad.h
new file mode 100644
index 0000000000..52c9c3adfd
--- /dev/null
+++ b/keyboards/s_ol/0xc_pad/0xc_pad.h
@@ -0,0 +1,36 @@
+/* Copyright 2021 s-ol
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ k01, k05, \
+ k02, k06, k10, \
+ k03, k07, k11, k15, \
+ k08, k12, k16 \
+) { \
+ { k01, k05, KC_NO, KC_NO }, \
+ { k02, k06, k10, KC_NO }, \
+ { k03, k07, k11, k15 }, \
+ { KC_NO, k08, k12, k16 } \
+}
+
+#define LED_LAYOUT( \
+ \
+ k01, k05, k02, k06, k10, k03, k07, k11, k15, k08, k12, k16) \
+ \
+ { k01, k02, k03, k08, k07, k06, k05, k10, k11, k12, k16, k15, }
diff --git a/keyboards/s_ol/0xc_pad/config.h b/keyboards/s_ol/0xc_pad/config.h
new file mode 100644
index 0000000000..4260c7a07d
--- /dev/null
+++ b/keyboards/s_ol/0xc_pad/config.h
@@ -0,0 +1,49 @@
+/* Copyright 2021 s-ol
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "config_common.h"
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN C7
+#define DRIVER_LED_TOTAL 12
+#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
+#define RGB_MATRIX_CENTER \
+ { 112, 63 }
+#define RGB_MATRIX_KEYPRESSES
+#define RGB_MATRIX_FRAMEBUFFER
+
+#define ENABLE_RGB_MATRIX_BREATHING
+#define ENABLE_RGB_MATRIX_BAND_SAT
+#define ENABLE_RGB_MATRIX_BAND_VAL
+#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
+#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
+
+#define ENABLE_RGB_MATRIX_CYCLE_ALL
+#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
+#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
+
+#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
+#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
+#define ENABLE_RGB_MATRIX_HUE_BREATHING
+#define ENABLE_RGB_MATRIX_HUE_WAVE
+
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
+#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
+#define ENABLE_RGB_MATRIX_SPLASH
diff --git a/keyboards/s_ol/0xc_pad/info.json b/keyboards/s_ol/0xc_pad/info.json
new file mode 100644
index 0000000000..4462b983ec
--- /dev/null
+++ b/keyboards/s_ol/0xc_pad/info.json
@@ -0,0 +1,33 @@
+{
+ "keyboard_name": "0xC.pad",
+ "url": "https://s-ol.nu/0xC.pad",
+ "debounce": 5,
+ "diode_direction": "ROW2COL",
+ "matrix_pins": {
+ "rows": ["B7", "B6", "B5", "B4"],
+ "cols": ["D4", "D3", "D2", "D1"]
+ },
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"x":1, "y":0},
+ {"x":2, "y":0},
+ {"x":0.5, "y":1},
+ {"x":1.5, "y":1},
+ {"x":2.5, "y":1},
+ {"x":0, "y":2},
+ {"x":1, "y":2},
+ {"x":2, "y":2},
+ {"x":3, "y":2},
+ {"x":0.5, "y":3},
+ {"x":1.5, "y":3},
+ {"x":2.5, "y":3}
+ ]
+ }
+ },
+ "usb": {
+ "vid": "0x732D",
+ "pid": "0x0C70",
+ "device_version": "0.0.1"
+ }
+}
diff --git a/keyboards/s_ol/0xc_pad/keymaps/default/config.h b/keyboards/s_ol/0xc_pad/keymaps/default/config.h
new file mode 100644
index 0000000000..194cb5a200
--- /dev/null
+++ b/keyboards/s_ol/0xc_pad/keymaps/default/config.h
@@ -0,0 +1,18 @@
+/* Copyright 2022 s-ol
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CUSTOM_RGB_TESTING
diff --git a/keyboards/s_ol/0xc_pad/keymaps/default/keymap.c b/keyboards/s_ol/0xc_pad/keymaps/default/keymap.c
new file mode 100644
index 0000000000..562d895071
--- /dev/null
+++ b/keyboards/s_ol/0xc_pad/keymaps/default/keymap.c
@@ -0,0 +1,25 @@
+/* Copyright 2021 s-ol
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT(
+ RGB_RMOD, RGB_MOD,
+ KC_CUT , KC_COPY, KC_PSTE,
+ KC_PGUP, KC_PGDN, KC_VOLU, KC_VOLD,
+ KC_1 , KC_2 , KC_3
+ ),
+};
diff --git a/keyboards/s_ol/0xc_pad/keymaps/default/readme.md b/keyboards/s_ol/0xc_pad/keymaps/default/readme.md
new file mode 100644
index 0000000000..fb71b2bf20
--- /dev/null
+++ b/keyboards/s_ol/0xc_pad/keymaps/default/readme.md
@@ -0,0 +1,5 @@
+![0xC.pad Layout Image](https://i.imgur.com/pk4G33B.png)
+​
+# Default 0xC.pad Layout
+​
+This is a simple default layout to get you started with the 0xC.pad.
diff --git a/keyboards/s_ol/0xc_pad/keymaps/default/rgb_matrix_user.inc b/keyboards/s_ol/0xc_pad/keymaps/default/rgb_matrix_user.inc
new file mode 100644
index 0000000000..8acb4934bc
--- /dev/null
+++ b/keyboards/s_ol/0xc_pad/keymaps/default/rgb_matrix_user.inc
@@ -0,0 +1,41 @@
+/* Copyright 2022 s-ol
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+RGB_MATRIX_EFFECT(RGB_TESTING)
+#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+static HSV RGB_TESTING_math(HSV hsv, uint8_t i, uint8_t time) {
+ hsv.v = 255;
+ hsv.s = 255;
+
+ uint8_t t = (time + i * 6) % 256;
+ switch (t / (256 / 4)) {
+ case 0:
+ hsv.h = 0;
+ break;
+ case 1:
+ hsv.h = 85;
+ break;
+ case 2:
+ hsv.h = 170;
+ break;
+ default:
+ hsv.s = 0;
+ }
+ return hsv;
+}
+
+static bool RGB_TESTING(effect_params_t* params) { return effect_runner_i(params, &RGB_TESTING_math); }
+#endif
diff --git a/keyboards/s_ol/0xc_pad/keymaps/default/rules.mk b/keyboards/s_ol/0xc_pad/keymaps/default/rules.mk
new file mode 100644
index 0000000000..6245023e80
--- /dev/null
+++ b/keyboards/s_ol/0xc_pad/keymaps/default/rules.mk
@@ -0,0 +1 @@
+RGB_MATRIX_CUSTOM_USER = yes
diff --git a/keyboards/s_ol/0xc_pad/readme.md b/keyboards/s_ol/0xc_pad/readme.md
new file mode 100644
index 0000000000..8ca3f78d1a
--- /dev/null
+++ b/keyboards/s_ol/0xc_pad/readme.md
@@ -0,0 +1,24 @@
+# 0xC.pad
+
+![0xC.pad](https://i.imgur.com/YXMKy4u.png)
+
+A 12-key, RGB-backlit hexagonal macropad.
+
+* Keyboard Maintainer: [s-ol](https://github.com/s-ol)
+* Hardware Supported: "hex12pad r0", 0xC.pad r1
+* Hardware Availability: [IC form](https://s-ol.nu/0xC.pad)
+
+To flash the example keymap for this macropad
+(after setting up your build environment):
+
+ make s_ol/0xc_pad:default:flash
+
+Before flashing, the macropad must be brought into DFU mode by one of the
+following means:
+- holding down the top-left key (next to the USB port) while plugging it in
+- bridging the two pads labeled `BOOT` on the back of the PCB with a metallic
+ object (tweezers, paperclip. wire)
+- putting the `RESET` keycode in your keymap and pressing the corresponding key
+
+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/s_ol/0xc_pad/rules.mk b/keyboards/s_ol/0xc_pad/rules.mk
new file mode 100644
index 0000000000..1322621d85
--- /dev/null
+++ b/keyboards/s_ol/0xc_pad/rules.mk
@@ -0,0 +1,22 @@
+# MCU name
+MCU = atmega32u2
+
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
+# 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 = yes # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+AUDIO_ENABLE = no # Audio output
+LTO_ENABLE = yes
+RGB_MATRIX_ENABLE = yes
+RGB_MATRIX_DRIVER = WS2812
+WS2812_DRIVER = bitbang
diff --git a/keyboards/s_ol/info.json b/keyboards/s_ol/info.json
new file mode 100644
index 0000000000..3c1c21d534
--- /dev/null
+++ b/keyboards/s_ol/info.json
@@ -0,0 +1,4 @@
+{
+ "manufacturer": "s-ol",
+ "maintainer": "s-ol"
+}