summaryrefslogtreecommitdiff
path: root/keyboards/oddforge/vea
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/oddforge/vea')
-rw-r--r--keyboards/oddforge/vea/info.json118
-rw-r--r--keyboards/oddforge/vea/matrix.c1
-rw-r--r--keyboards/oddforge/vea/rules.mk1
-rw-r--r--keyboards/oddforge/vea/vea.c33
-rw-r--r--keyboards/oddforge/vea/vea.h66
-rw-r--r--keyboards/oddforge/vea/ws2812_custom.c34
6 files changed, 151 insertions, 102 deletions
diff --git a/keyboards/oddforge/vea/info.json b/keyboards/oddforge/vea/info.json
index 06e71e1be2..d6586a09e8 100644
--- a/keyboards/oddforge/vea/info.json
+++ b/keyboards/oddforge/vea/info.json
@@ -11,6 +11,9 @@
"backlight": {
"pin": "D4"
},
+ "ws2812": {
+ "driver": "custom"
+ },
"indicators": {
"caps_lock": "D1",
"num_lock": "D0",
@@ -20,7 +23,120 @@
"bootloader": "bootloadhid",
"layouts": {
"LAYOUT": {
- "layout": [{"label":"5,0", "x":2.25, "y":0}, {"label":"5,1", "x":3.25, "y":0}, {"label":"5,2", "x":4.25, "y":0}, {"label":"5,3", "x":5.25, "y":0}, {"label":"5,4", "x":6.25, "y":0}, {"label":"5,5", "x":7.25, "y":0}, {"label":"5,6", "x":8.25, "y":0}, {"label":"5,8", "x":10.75, "y":0}, {"label":"5,9", "x":11.75, "y":0}, {"label":"5,10", "x":12.75, "y":0}, {"label":"5,11", "x":13.75, "y":0}, {"label":"5,12", "x":14.75, "y":0}, {"label":"5,13", "x":15.75, "y":0}, {"label":"6,11", "x":16.75, "y":0}, {"label":"7,11", "x":17.75, "y":0}, {"label":"6,13", "x":18.75, "y":0}, {"label":"6,1", "x":0, "y":1}, {"label":"7,1", "x":1, "y":1}, {"label":"4,0", "x":2.25, "y":1}, {"label":"4,1", "x":3.25, "y":1}, {"label":"4,2", "x":4.25, "y":1}, {"label":"4,3", "x":5.25, "y":1}, {"label":"4,4", "x":6.25, "y":1}, {"label":"4,5", "x":7.25, "y":1}, {"label":"4,6", "x":8.25, "y":1}, {"label":"4,8", "x":10.75, "y":1}, {"label":"4,9", "x":11.75, "y":1}, {"label":"4,10", "x":12.75, "y":1}, {"label":"4,11", "x":13.75, "y":1}, {"label":"4,12", "x":14.75, "y":1}, {"label":"4,13", "x":15.75, "y":1}, {"label":"4,14", "x":16.75, "y":1, "w":2}, {"label":"6,10", "x":18.75, "y":1}, {"label":"6,2", "x":0, "y":2}, {"label":"7,2", "x":1, "y":2}, {"label":"3,0", "x":2.25, "y":2, "w":1.5}, {"label":"3,1", "x":3.75, "y":2}, {"label":"3,2", "x":4.75, "y":2}, {"label":"3,3", "x":5.75, "y":2}, {"label":"3,4", "x":6.75, "y":2}, {"label":"3,5", "x":7.75, "y":2}, {"label":"1,8", "x":10.25, "y":2}, {"label":"1,9", "x":11.25, "y":2}, {"label":"1,10", "x":12.25, "y":2}, {"label":"1,11", "x":13.25, "y":2}, {"label":"1,12", "x":14.25, "y":2}, {"label":"1,13", "x":15.25, "y":2}, {"label":"1,14", "x":16.25, "y":2}, {"label":"2,14", "x":17.25, "y":2, "w":1.5}, {"label":"7,10", "x":18.75, "y":2}, {"label":"6,3", "x":0, "y":3}, {"label":"7,3", "x":1, "y":3}, {"label":"2,0", "x":2.25, "y":3, "w":1.75}, {"label":"2,1", "x":4, "y":3}, {"label":"2,2", "x":5, "y":3}, {"label":"2,3", "x":6, "y":3}, {"label":"2,4", "x":7, "y":3}, {"label":"2,5", "x":8, "y":3}, {"label":"2,8", "x":10.5, "y":3}, {"label":"2,9", "x":11.5, "y":3}, {"label":"2,10", "x":12.5, "y":3}, {"label":"2,11", "x":13.5, "y":3}, {"label":"2,12", "x":14.5, "y":3}, {"label":"2,13", "x":15.5, "y":3}, {"label":"3,13", "x":16.5, "y":3, "w":2.25}, {"label":"6,12", "x":18.75, "y":3}, {"label":"6,4", "x":0, "y":4}, {"label":"7,4", "x":1, "y":4}, {"label":"1,0", "x":2.25, "y":4, "w":2.25}, {"label":"1,1", "x":4.5, "y":4}, {"label":"1,2", "x":5.5, "y":4}, {"label":"1,3", "x":6.5, "y":4}, {"label":"1,4", "x":7.5, "y":4}, {"label":"1,5", "x":8.5, "y":4}, {"label":"3,8", "x":11, "y":4}, {"label":"3,9", "x":12, "y":4}, {"label":"3,10", "x":13, "y":4}, {"label":"3,11", "x":14, "y":4}, {"label":"3,12", "x":15, "y":4}, {"label":"3,14", "x":16, "y":4, "w":1.75}, {"label":"6,8", "x":17.75, "y":4}, {"label":"7,12", "x":18.75, "y":4}, {"label":"6,5", "x":0, "y":5}, {"label":"7,5", "x":1, "y":5}, {"label":"0,0", "x":2.25, "y":5, "w":1.25}, {"label":"0,1", "x":3.5, "y":5, "w":1.25}, {"label":"0,2", "x":4.75, "y":5, "w":1.25}, {"label":"7,7", "x":6, "y":5, "w":2}, {"label":"6,6", "x":8, "y":5}, {"label":"6,14", "x":10.5, "y":5, "w":2.75}, {"label":"0,10", "x":13.25, "y":5, "w":1.25}, {"label":"0,9", "x":14.5, "y":5}, {"label":"0,8", "x":15.5, "y":5, "w":1.25}, {"label":"7,8", "x":16.75, "y":5}, {"label":"6,9", "x":17.75, "y":5}, {"label":"7,9", "x":18.75, "y":5}]
+ "layout": [
+ {"matrix": [5, 0], "x": 2.25, "y": 0},
+ {"matrix": [5, 1], "x": 3.25, "y": 0},
+ {"matrix": [5, 2], "x": 4.25, "y": 0},
+ {"matrix": [5, 3], "x": 5.25, "y": 0},
+ {"matrix": [5, 4], "x": 6.25, "y": 0},
+ {"matrix": [5, 5], "x": 7.25, "y": 0},
+ {"matrix": [5, 6], "x": 8.25, "y": 0},
+
+ {"matrix": [5, 8], "x": 10.75, "y": 0},
+ {"matrix": [5, 9], "x": 11.75, "y": 0},
+ {"matrix": [5, 10], "x": 12.75, "y": 0},
+ {"matrix": [5, 11], "x": 13.75, "y": 0},
+ {"matrix": [5, 12], "x": 14.75, "y": 0},
+ {"matrix": [5, 13], "x": 15.75, "y": 0},
+ {"matrix": [6, 11], "x": 16.75, "y": 0},
+ {"matrix": [7, 11], "x": 17.75, "y": 0},
+ {"matrix": [6, 13], "x": 18.75, "y": 0},
+
+ {"matrix": [6, 1], "x": 0, "y": 1},
+ {"matrix": [7, 1], "x": 1, "y": 1},
+
+ {"matrix": [4, 0], "x": 2.25, "y": 1},
+ {"matrix": [4, 1], "x": 3.25, "y": 1},
+ {"matrix": [4, 2], "x": 4.25, "y": 1},
+ {"matrix": [4, 3], "x": 5.25, "y": 1},
+ {"matrix": [4, 4], "x": 6.25, "y": 1},
+ {"matrix": [4, 5], "x": 7.25, "y": 1},
+ {"matrix": [4, 6], "x": 8.25, "y": 1},
+
+ {"matrix": [4, 8], "x": 10.75, "y": 1},
+ {"matrix": [4, 9], "x": 11.75, "y": 1},
+ {"matrix": [4, 10], "x": 12.75, "y": 1},
+ {"matrix": [4, 11], "x": 13.75, "y": 1},
+ {"matrix": [4, 12], "x": 14.75, "y": 1},
+ {"matrix": [4, 13], "x": 15.75, "y": 1},
+ {"matrix": [4, 14], "x": 16.75, "y": 1, "w": 2},
+ {"matrix": [6, 10], "x": 18.75, "y": 1},
+
+ {"matrix": [6, 2], "x": 0, "y": 2},
+ {"matrix": [7, 2], "x": 1, "y": 2},
+
+ {"matrix": [3, 0], "x": 2.25, "y": 2, "w": 1.5},
+ {"matrix": [3, 1], "x": 3.75, "y": 2},
+ {"matrix": [3, 2], "x": 4.75, "y": 2},
+ {"matrix": [3, 3], "x": 5.75, "y": 2},
+ {"matrix": [3, 4], "x": 6.75, "y": 2},
+ {"matrix": [3, 5], "x": 7.75, "y": 2},
+
+ {"matrix": [1, 8], "x": 10.25, "y": 2},
+ {"matrix": [1, 9], "x": 11.25, "y": 2},
+ {"matrix": [1, 10], "x": 12.25, "y": 2},
+ {"matrix": [1, 11], "x": 13.25, "y": 2},
+ {"matrix": [1, 12], "x": 14.25, "y": 2},
+ {"matrix": [1, 13], "x": 15.25, "y": 2},
+ {"matrix": [1, 14], "x": 16.25, "y": 2},
+ {"matrix": [2, 14], "x": 17.25, "y": 2, "w": 1.5},
+ {"matrix": [7, 10], "x": 18.75, "y": 2},
+
+ {"matrix": [6, 3], "x": 0, "y": 3},
+ {"matrix": [7, 3], "x": 1, "y": 3},
+
+ {"matrix": [2, 0], "x": 2.25, "y": 3, "w": 1.75},
+ {"matrix": [2, 1], "x": 4, "y": 3},
+ {"matrix": [2, 2], "x": 5, "y": 3},
+ {"matrix": [2, 3], "x": 6, "y": 3},
+ {"matrix": [2, 4], "x": 7, "y": 3},
+ {"matrix": [2, 5], "x": 8, "y": 3},
+
+ {"matrix": [2, 8], "x": 10.5, "y": 3},
+ {"matrix": [2, 9], "x": 11.5, "y": 3},
+ {"matrix": [2, 10], "x": 12.5, "y": 3},
+ {"matrix": [2, 11], "x": 13.5, "y": 3},
+ {"matrix": [2, 12], "x": 14.5, "y": 3},
+ {"matrix": [2, 13], "x": 15.5, "y": 3},
+ {"matrix": [3, 13], "x": 16.5, "y": 3, "w": 2.25},
+ {"matrix": [6, 12], "x": 18.75, "y": 3},
+
+ {"matrix": [6, 4], "x": 0, "y": 4},
+ {"matrix": [7, 4], "x": 1, "y": 4},
+
+ {"matrix": [1, 0], "x": 2.25, "y": 4, "w": 2.25},
+ {"matrix": [1, 1], "x": 4.5, "y": 4},
+ {"matrix": [1, 2], "x": 5.5, "y": 4},
+ {"matrix": [1, 3], "x": 6.5, "y": 4},
+ {"matrix": [1, 4], "x": 7.5, "y": 4},
+ {"matrix": [1, 5], "x": 8.5, "y": 4},
+
+ {"matrix": [3, 8], "x": 11, "y": 4},
+ {"matrix": [3, 9], "x": 12, "y": 4},
+ {"matrix": [3, 10], "x": 13, "y": 4},
+ {"matrix": [3, 11], "x": 14, "y": 4},
+ {"matrix": [3, 12], "x": 15, "y": 4},
+ {"matrix": [3, 14], "x": 16, "y": 4, "w": 1.75},
+ {"matrix": [6, 8], "x": 17.75, "y": 4},
+ {"matrix": [7, 12], "x": 18.75, "y": 4},
+
+ {"matrix": [6, 5], "x": 0, "y": 5},
+ {"matrix": [7, 5], "x": 1, "y": 5},
+
+ {"matrix": [0, 0], "x": 2.25, "y": 5, "w": 1.25},
+ {"matrix": [0, 1], "x": 3.5, "y": 5, "w": 1.25},
+ {"matrix": [0, 2], "x": 4.75, "y": 5, "w": 1.25},
+ {"matrix": [7, 7], "x": 6, "y": 5, "w": 2},
+ {"matrix": [6, 6], "x": 8, "y": 5},
+
+ {"matrix": [6, 14], "x": 10.5, "y": 5, "w": 2.75},
+ {"matrix": [0, 10], "x": 13.25, "y": 5, "w": 1.25},
+ {"matrix": [0, 9], "x": 14.5, "y": 5},
+ {"matrix": [0, 8], "x": 15.5, "y": 5, "w": 1.25},
+ {"matrix": [7, 8], "x": 16.75, "y": 5},
+ {"matrix": [6, 9], "x": 17.75, "y": 5},
+ {"matrix": [7, 9], "x": 18.75, "y": 5}
+ ]
}
}
}
diff --git a/keyboards/oddforge/vea/matrix.c b/keyboards/oddforge/vea/matrix.c
index 118d3e8aed..8b054ccbe0 100644
--- a/keyboards/oddforge/vea/matrix.c
+++ b/keyboards/oddforge/vea/matrix.c
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdio.h>
#include "quantum.h"
#include "i2c_master.h"
-#include "vea.h"
#define RIGHT_HALF
diff --git a/keyboards/oddforge/vea/rules.mk b/keyboards/oddforge/vea/rules.mk
index ebcb8a1159..f616b9400e 100644
--- a/keyboards/oddforge/vea/rules.mk
+++ b/keyboards/oddforge/vea/rules.mk
@@ -8,7 +8,6 @@ CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-WS2812_DRIVER = i2c
# custom matrix setup
CUSTOM_MATRIX = lite
diff --git a/keyboards/oddforge/vea/vea.c b/keyboards/oddforge/vea/vea.c
deleted file mode 100644
index 220083e403..0000000000
--- a/keyboards/oddforge/vea/vea.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright 2021 MajorKoos <github.com/majorkoos>
-
-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 "vea.h"
-
-void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { vea_setleds(start_led, num_leds); }
-
-void vea_rgb_init(void) { i2c_init(); }
-
-// Setleds for standard RGB
-void vea_setleds(LED_TYPE *ledarray, uint16_t leds) {
- static bool s_init = false;
- if (!s_init) {
- vea_rgb_init();
- s_init = true;
- }
-
- i2c_transmit(WS2812_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * (leds >> 1), WS2812_TIMEOUT);
- i2c_transmit(WS2812_ADDRESS_SPLIT, (uint8_t *)ledarray+(sizeof(LED_TYPE) * (leds >> 1)), sizeof(LED_TYPE) * (leds - (leds >> 1)), WS2812_TIMEOUT);
-};
diff --git a/keyboards/oddforge/vea/vea.h b/keyboards/oddforge/vea/vea.h
deleted file mode 100644
index 8e5851b84d..0000000000
--- a/keyboards/oddforge/vea/vea.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Copyright 2021 MajorKoos <github.com/majorkoos>
-
-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"
-#include "i2c_master.h"
-#include "rgblight.h"
-#include "ws2812.h"
-#include "led.h"
-
-#define WS2812_ADDRESS 0xb0
-#define WS2812_ADDRESS_SPLIT 0xb8
-#define WS2812_TIMEOUT 100
-
-void vea_setleds(LED_TYPE *ledarray, uint16_t leds);
-
-/*
-LEFT
- .5,0. .5,1. .5,2. .5,3. .5,4. .5,5. .5,6.
-.6,1. .7,1. .4,0. .4,1. .4,2. .4,3. .4,4. .4,5. .4,6.
-.6,2. .7,2. .3,0. .3,1. .3,2. .3,3. .3,4. .3,5.
-.6,3. .7,3. .2,0. .2,1. .2,2. .2,3. .2,4. .2,5.
-.6,4. .7,4. .1,0. .1,1. .1,2. .1,3. .1,4. .1,5.
-.6,5. .7,5. .0,0. .0,1. .0,2. .7,7. .6,6.
-
-RIGHT
-.5,8. .5,9. .5,10. .5,11. .5,12. .5,13. .6,11. .7,11. .6,13.
-.4,8. .4,9. .4,10. .4,11. .4,12. .4,13. .4,14. .6,10.
-.1,8. .1,9. .1,10. .1,11. .1,12. .1,13. .1,14. .2,14. .7,10.
-.2,8. .2,9. .2,10. .2,11. .2,12. .2,13. .3,13. .6,12.
-.3,8. .3,9. .3,10. .3,11. .3,12. .3,14. .6,8. .7,12.
-.6,14. .0,10. .0,9. .0,8. .7,8. .6,9. .7,9.
-
-*/
-
-#define LAYOUT( \
- K50, K51, K52, K53, K54, K55, K56, K58, K59, K5A, K5B, K5C, K5D, K6B, K7B, K6D, \
-K61, K71, K40, K41, K42, K43, K44, K45, K46, K48, K49, K4A, K4B, K4C, K4D, K4E, K6A, \
-K62, K72, K30, K31, K32, K33, K34, K35, K18, K19, K1A, K1B, K1C, K1D, K1E, K2E, K7A, \
-K63, K73, K20, K21, K22, K23, K24, K25, K28, K29, K2A, K2B, K2C, K2D, K3D, K6C, \
-K64, K74, K10, K11, K12, K13, K14, K15, K38, K39, K3A, K3B, K3C, K3E, K68, K7C, \
-K65, K75, K00, K01, K02, K77, K66, K6E, K0A, K09, K08, K78, K69, K79 \
-){ \
-{ K00, K01, K02, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K08, K09, K0A, KC_NO, KC_NO, KC_NO, KC_NO }, \
-{ K10, K11, K12, K13, K14, K15, KC_NO, KC_NO, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
-{ K20, K21, K22, K23, K24, K25, KC_NO, KC_NO, K28, K29, K2A, K2B, K2C, K2D, K2E }, \
-{ K30, K31, K32, K33, K34, K35, KC_NO, KC_NO, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
-{ K40, K41, K42, K43, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, K4D, K4E }, \
-{ K50, K51, K52, K53, K54, K55, K56, KC_NO, K58, K59, K5A, K5B, K5C, K5D, KC_NO }, \
-{ KC_NO, K61, K62, K63, K64, K65, K66, KC_NO, K68, K69, K6A, K6B, K6C, K6D, K6E }, \
-{ KC_NO, K71, K72, K73, K74, K75, KC_NO, K77, K78, K79, K7A, K7B, K7C, KC_NO, KC_NO } \
-}
diff --git a/keyboards/oddforge/vea/ws2812_custom.c b/keyboards/oddforge/vea/ws2812_custom.c
new file mode 100644
index 0000000000..0dc5a2d0f1
--- /dev/null
+++ b/keyboards/oddforge/vea/ws2812_custom.c
@@ -0,0 +1,34 @@
+#include "ws2812.h"
+#include "i2c_master.h"
+
+#ifdef RGBW
+# error "RGBW not supported"
+#endif
+
+#ifndef WS2812_I2C_ADDRESS
+# define WS2812_I2C_ADDRESS 0xB0
+#endif
+
+#ifndef WS2812_I2C_ADDRESS_RIGHT
+# define WS2812_I2C_ADDRESS_RIGHT 0xB8
+#endif
+
+#ifndef WS2812_I2C_TIMEOUT
+# define WS2812_I2C_TIMEOUT 100
+#endif
+
+void ws2812_init(void) {
+ i2c_init();
+}
+
+// Setleds for standard RGB
+void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
+ static bool s_init = false;
+ if (!s_init) {
+ ws2812_init();
+ s_init = true;
+ }
+
+ i2c_transmit(WS2812_I2C_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * (leds >> 1), WS2812_I2C_TIMEOUT);
+ i2c_transmit(WS2812_I2C_ADDRESS_RIGHT, (uint8_t *)ledarray+(sizeof(LED_TYPE) * (leds >> 1)), sizeof(LED_TYPE) * (leds - (leds >> 1)), WS2812_I2C_TIMEOUT);
+}