aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMajorKoos <MajorKoos@users.noreply.github.com>2021-02-27 21:57:04 -0800
committerGitHub <noreply@github.com>2021-02-28 16:57:04 +1100
commitb2a0e98a6018ad019533d98c0c9c8501cba933bc (patch)
tree46ef53bba774f433507fa57606cd892b98f7d5e1
parent74372424ae4c5be0b9f43d59306467ed775f6042 (diff)
downloadqmk_firmware-b2a0e98a6018ad019533d98c0c9c8501cba933bc.tar.gz
qmk_firmware-b2a0e98a6018ad019533d98c0c9c8501cba933bc.zip
OddForge VE.A (#11875)
* VEA Support * Update LEDs to use QMK methods * Enable Backlight * Update Vendor ID * Updates to enable split RGB * Update readme * Update to split RGB * remove unnecessary reference * Knight animation starts at the back * remove hardcoded variable Co-authored-by: Major Koos <MajorKoos@noreply.users.github.com>
-rw-r--r--keyboards/oddforge/vea/config.h46
-rw-r--r--keyboards/oddforge/vea/info.json12
-rw-r--r--keyboards/oddforge/vea/keymaps/default/keymap.c64
-rw-r--r--keyboards/oddforge/vea/keymaps/via/keymap.c64
-rw-r--r--keyboards/oddforge/vea/keymaps/via/rules.mk2
-rw-r--r--keyboards/oddforge/vea/matrix.c192
-rw-r--r--keyboards/oddforge/vea/readme.md30
-rw-r--r--keyboards/oddforge/vea/rules.mk18
-rw-r--r--keyboards/oddforge/vea/vea.c33
-rw-r--r--keyboards/oddforge/vea/vea.h66
10 files changed, 527 insertions, 0 deletions
diff --git a/keyboards/oddforge/vea/config.h b/keyboards/oddforge/vea/config.h
new file mode 100644
index 000000000..44f526401
--- /dev/null
+++ b/keyboards/oddforge/vea/config.h
@@ -0,0 +1,46 @@
1/*
2Copyright 2021 MajorKoos <github.com/majorkoos>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0xFFFE
23#define PRODUCT_ID 0x4155
24#define DEVICE_VER 0x0100
25#define MANUFACTURER OddForge
26#define PRODUCT VE.A
27
28/* matrix size */
29#define MATRIX_ROWS 8
30#define MATRIX_COLS 15
31
32#define DEBOUNCE 5
33#define LOCKING_SUPPORT_ENABLE
34#define LOCKING_RESYNC_ENABLE
35
36#define DYNAMIC_KEYMAP_LAYER_COUNT 3
37
38#define RGBLED_NUM 18
39#define RGBLIGHT_ANIMATIONS
40#define RGBLIGHT_SLEEP
41#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 9
42
43#define LED_NUM_LOCK_PIN D0
44#define LED_CAPS_LOCK_PIN D1
45#define LED_SCROLL_LOCK_PIN D6
46#define BACKLIGHT_PIN D4
diff --git a/keyboards/oddforge/vea/info.json b/keyboards/oddforge/vea/info.json
new file mode 100644
index 000000000..c067a8272
--- /dev/null
+++ b/keyboards/oddforge/vea/info.json
@@ -0,0 +1,12 @@
1{
2 "keyboard_name": "VE.A",
3 "url": "https://drop.com/buy/ve-a",
4 "maintainer": "MajorKoos",
5 "width": 19.75,
6 "height": 6,
7 "layouts": {
8 "LAYOUT": {
9 "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}]
10 }
11 }
12}
diff --git a/keyboards/oddforge/vea/keymaps/default/keymap.c b/keyboards/oddforge/vea/keymaps/default/keymap.c
new file mode 100644
index 000000000..515a3af8d
--- /dev/null
+++ b/keyboards/oddforge/vea/keymaps/default/keymap.c
@@ -0,0 +1,64 @@
1/*
2Copyright 2021 MajorKoos <github.com/majorkoos>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include QMK_KEYBOARD_H
19
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21 /* Base ,-----------------------------------------. ,-----------------------------------------------------.
22 * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |Print| Ins | Del |
23 * ,-----------. |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----------+-----|
24 * | 8 | 9 | | ~ | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | Backspac | Home|
25 * |-----+-----| |-----------------------------------------' ,--------------------------------------------------+-----|
26 * | 6 | 7 | | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] | \ | PgUp|
27 * |-----+-----| |---------------------------------------. `--------------------------------------------------+-----|
28 * | 4 | 5 | | Caps | A | S | D | F | G | | H | J | K | L | ; | ' | Enter | PgDn|
29 * |-----+-----| |-----------------------------------------. `-------------------------------------------------+-----|
30 * | 2 | 3 | | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | Up | End |
31 * |-----+-----| |-----------------------------------------' ,-------------------------------------------+-----+-----|
32 * | 0 | 1 | | Ctrl | GUI | Alt | Space |Space| | Space | Alt | | Ctrl | Left| Down|Right|
33 * `-----------' `---------------------------------------' `-------------------------------------------------------'
34 */
35[0] = LAYOUT(
36 //--------------------------------Left Hand-----------------------------------------| |--------------------------------Right Hand------------------------------------------------
37 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_DEL,
38 KC_8, KC_9, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPC, KC_HOME,
39 KC_6, KC_7, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
40 KC_4, KC_5, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, KC_PGDN,
41 KC_2, KC_3, 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_UP, KC_END,
42 KC_0, KC_1, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
43 ),
44
45[1] = LAYOUT(
46 //--------------------------------Left Hand-----------------------------------------| |--------------------------------Right Hand------------------------------------------------
47 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,
48 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,
49 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,
50 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,
51 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,
52 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
53 ),
54
55[2] = LAYOUT(
56 //--------------------------------Left Hand-----------------------------------------| |--------------------------------Right Hand------------------------------------------------
57 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,
58 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,
59 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,
60 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,
61 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,
62 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
63 )
64};
diff --git a/keyboards/oddforge/vea/keymaps/via/keymap.c b/keyboards/oddforge/vea/keymaps/via/keymap.c
new file mode 100644
index 000000000..515a3af8d
--- /dev/null
+++ b/keyboards/oddforge/vea/keymaps/via/keymap.c
@@ -0,0 +1,64 @@
1/*
2Copyright 2021 MajorKoos <github.com/majorkoos>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include QMK_KEYBOARD_H
19
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21 /* Base ,-----------------------------------------. ,-----------------------------------------------------.
22 * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |Print| Ins | Del |
23 * ,-----------. |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----------+-----|
24 * | 8 | 9 | | ~ | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | Backspac | Home|
25 * |-----+-----| |-----------------------------------------' ,--------------------------------------------------+-----|
26 * | 6 | 7 | | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] | \ | PgUp|
27 * |-----+-----| |---------------------------------------. `--------------------------------------------------+-----|
28 * | 4 | 5 | | Caps | A | S | D | F | G | | H | J | K | L | ; | ' | Enter | PgDn|
29 * |-----+-----| |-----------------------------------------. `-------------------------------------------------+-----|
30 * | 2 | 3 | | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | Up | End |
31 * |-----+-----| |-----------------------------------------' ,-------------------------------------------+-----+-----|
32 * | 0 | 1 | | Ctrl | GUI | Alt | Space |Space| | Space | Alt | | Ctrl | Left| Down|Right|
33 * `-----------' `---------------------------------------' `-------------------------------------------------------'
34 */
35[0] = LAYOUT(
36 //--------------------------------Left Hand-----------------------------------------| |--------------------------------Right Hand------------------------------------------------
37 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_DEL,
38 KC_8, KC_9, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPC, KC_HOME,
39 KC_6, KC_7, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
40 KC_4, KC_5, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, KC_PGDN,
41 KC_2, KC_3, 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_UP, KC_END,
42 KC_0, KC_1, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
43 ),
44
45[1] = LAYOUT(
46 //--------------------------------Left Hand-----------------------------------------| |--------------------------------Right Hand------------------------------------------------
47 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,
48 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,
49 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,
50 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,
51 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,
52 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
53 ),
54
55[2] = LAYOUT(
56 //--------------------------------Left Hand-----------------------------------------| |--------------------------------Right Hand------------------------------------------------
57 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,
58 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,
59 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,
60 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,
61 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,
62 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
63 )
64};
diff --git a/keyboards/oddforge/vea/keymaps/via/rules.mk b/keyboards/oddforge/vea/keymaps/via/rules.mk
new file mode 100644
index 000000000..36b7ba9cb
--- /dev/null
+++ b/keyboards/oddforge/vea/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
1VIA_ENABLE = yes
2LTO_ENABLE = yes
diff --git a/keyboards/oddforge/vea/matrix.c b/keyboards/oddforge/vea/matrix.c
new file mode 100644
index 000000000..118d3e8ae
--- /dev/null
+++ b/keyboards/oddforge/vea/matrix.c
@@ -0,0 +1,192 @@
1/*
2Copyright 2021 MajorKoos <github.com/majorkoos>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include <string.h>
19#include <stdio.h>
20#include "quantum.h"
21#include "i2c_master.h"
22#include "vea.h"
23
24#define RIGHT_HALF
25
26
27void matrix_set_row_status(uint8_t row);
28
29
30#if defined(RIGHT_HALF)
31/* ----------------------- hardware I/O abstraction ------------------------ */
32#define PORTCOLUMNS PORTB ///< port on which we read the state of the columns
33#define PINCOLUMNS PINB ///< port on which we read the state of the columns
34#define DDRCOLUMNS DDRB ///< port on which we read the state of the columns
35#define PORTROWS1 PORTA ///< first port connected to the matrix rows
36#define PINROWS1 PINA ///< first port connected to the matrix rows
37#define DDRROWS1 DDRA ///< first port connected to the matrix rows
38#define PORTROWS2 PORTC ///< second port connected to the matrix rows
39#define PINROWS2 PINC ///< second port connected to the matrix rows
40#define DDRROWS2 DDRC ///< second port connected to the matrix rows
41
42
43// register addresses (see "mcp23018.md")
44#define IODIRA 0x00 // i/o direction register
45#define IODIRB 0x01
46#define GPPUA 0x0C // GPIO pull-up resistor register
47#define GPPUB 0x0D
48#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
49#define GPIOB 0x13
50#define OLATA 0x14 // output latch register
51#define OLATB 0x15
52
53#define TW_READ 1
54#define TW_WRITE 0
55
56#define MCP23018_TWI_ADDRESS 0b0100000
57
58// TWI aliases
59#define TWI_ADDR_WRITE ( (MCP23018_TWI_ADDRESS<<1) | TW_WRITE )
60#define TWI_ADDR_READ ( (MCP23018_TWI_ADDRESS<<1) | TW_READ )
61
62#define I2C_TIMEOUT 10
63#define MCP_ROWS_START 8
64
65uint8_t mcp23018_init(void) {
66 uint8_t ret;
67 uint8_t data[3];
68 // set pin direction
69 // - unused : input : 1
70 // - input : input : 1
71 // - driving : output : 0
72 data[0] = IODIRA;
73 data[1] = 0b00000000; // IODIRA
74 data[2] = (0b11111111); // IODIRB
75
76 ret = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)data, 3, I2C_TIMEOUT);
77 if (ret) goto out; // make sure we got an ACK
78 // set pull-up
79 // - unused : on : 1
80 // - input : on : 1
81 // - driving : off : 0
82 data[0] = GPPUA;
83 data[1] = 0b00000000; // IODIRA
84 data[2] = (0b11111111); // IODIRB
85
86 ret = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)data, 3, I2C_TIMEOUT);
87 if (ret) goto out; // make sure we got an ACK
88
89 // set logical value (doesn't matter on inputs)
90 // - unused : hi-Z : 1
91 // - input : hi-Z : 1
92 // - driving : hi-Z : 1
93 data[0] = OLATA;
94 data[1] = 0b11111111; // IODIRA
95 data[2] = (0b11111111); // IODIRB
96
97 ret = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)data, 3, I2C_TIMEOUT);
98out:
99 return ret;
100}
101#endif
102
103void matrix_init_custom(void) {
104 // initialize matrix ports - cols, rows
105 // PB0-PB7 : col0 .. col7
106 // PA0-PA7 : row0 .. row7
107 // PC7-PC2 : row8 .. row13
108
109 // PD0 : NUM
110 // PD1 : CAPS
111 // PD2 : D+ / Clock
112 // PD3 : D- / Data
113 // PD4 : FULL LED
114 // PD5 : 3.6V switch TR
115 // PD6 : SCRL
116 // PD7 : row14
117
118
119 // signal direction : col -> row
120
121 // pc(PORTROWS1)0, 1 : twi
122 DDRCOLUMNS = 0xFF; // all outputs for cols
123 PORTCOLUMNS = 0xFF; // high
124
125 // all inputs for rows
126 DDRROWS1 = 0x00;
127 DDRROWS2 &= ~(0x111111<<2); //0x00;
128 DDRD &= ~(1<<PIND7); // row 14
129
130 // all rows pull-up.
131 PORTROWS1 = 0xFF;
132 PORTROWS2 |= (0b111111<<2); //0x11111100;
133 PORTD |= (1<<PIND7);// row 14
134
135 i2c_init();
136
137#if defined(RIGHT_HALF)
138 // Initialize the chip on the other half
139 mcp23018_init();
140#endif
141
142}
143
144bool matrix_scan_custom(matrix_row_t current_matrix[]) {
145 bool matrix_has_changed = false;
146
147 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
148 // Store last value of row prior to reading
149 matrix_row_t last_row_value = current_matrix[row];
150
151 matrix_row_t cols = 0;
152 // Select the row to scan
153 matrix_set_row_status(row);
154
155 matrix_io_delay();
156 //Set the local row
157
158#if defined(RIGHT_HALF)
159 // Initialize to 0x7F in case I2C read fails,
160 // as 0x75 would be no keys pressed
161 uint8_t data = 0x7F;
162 // Receive the columns from right half
163 i2c_receive(TWI_ADDR_WRITE, &data, 1, I2C_TIMEOUT);
164#endif
165
166 // cols |= ((~(PINA | 0x80)) & 0x7F);
167 cols |= ((~(PINA)) & 0xFF);
168#if defined(RIGHT_HALF)
169 cols |= (((~(data | 0x80)) & 0x7F) << MCP_ROWS_START);
170#endif
171
172 current_matrix[row] = cols;
173 matrix_has_changed |= (last_row_value != current_matrix[row]);
174 }
175
176 return matrix_has_changed;
177}
178
179void matrix_set_row_status(uint8_t row) {
180#if defined(RIGHT_HALF)
181 uint8_t txdata[3];
182
183 //Set the remote row on port A
184 txdata[0] = (GPIOA);
185 txdata[1] = ( 0xFF & ~(1<<row) );
186 i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)txdata, 2, I2C_TIMEOUT);
187#endif
188
189 //Set the local row on port B
190 DDRB = (1 << row);
191 PORTB = ~(1 << row);
192}
diff --git a/keyboards/oddforge/vea/readme.md b/keyboards/oddforge/vea/readme.md
new file mode 100644
index 000000000..872fb90d3
--- /dev/null
+++ b/keyboards/oddforge/vea/readme.md
@@ -0,0 +1,30 @@
1# Vermillion's Ergo - Armored Edition
2
3![VE.A](https://massdrop-s3.imgix.net/product-images/ve-a/MD-17533_20160504151111_9285b969d2f9c191.jpg)
4
5This is a port of the QMK firmware for the VE.A.
6
7* Keyboard Maintainer: [Major Koos](https://github.com/MajorKoos)
8* Keyboard Manufacturer: OddForge
9* Hardware Availability: [Drop.com](https://drop.com/buy/ve-a)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make oddforge/vea:default
14
15Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
16
17 make oddforge/vea:default:flash
18
19or
20
21 bootloadHID -r oddforge_vea_default.hex
22
23## How to get QMK working on the VE.A
24
25**Reset Key**: Hold down the key located at 3rd left position in the bottom row, commonly programmed as Left Control while plugging in the keyboard. There is also a jumper on the bottom of the PCB (JP_FW) which you can short to get into the bootloader.
26
27![VE.A](https://massdrop-s3.imgix.net/product-images/ve-a/MD-17533_20160330103302_53ecc4b5015273e5.jpg)
28
29
30See 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/oddforge/vea/rules.mk b/keyboards/oddforge/vea/rules.mk
new file mode 100644
index 000000000..fce46039f
--- /dev/null
+++ b/keyboards/oddforge/vea/rules.mk
@@ -0,0 +1,18 @@
1# MCU name
2MCU = atmega32a
3BOOTLOADER = bootloadHID
4
5# Build Options
6BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
7MOUSEKEY_ENABLE = no # Mouse keys
8EXTRAKEY_ENABLE = yes # Audio control and System control
9CONSOLE_ENABLE = no # Console for debug
10COMMAND_ENABLE = no # Commands for debug and configuration
11BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
12RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
13WS2812_DRIVER = i2c
14
15# custom matrix setup
16CUSTOM_MATRIX = lite
17SRC = matrix.c
18QUANTUM_LIB_SRC += i2c_master.c
diff --git a/keyboards/oddforge/vea/vea.c b/keyboards/oddforge/vea/vea.c
new file mode 100644
index 000000000..220083e40
--- /dev/null
+++ b/keyboards/oddforge/vea/vea.c
@@ -0,0 +1,33 @@
1/*
2Copyright 2021 MajorKoos <github.com/majorkoos>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#include "vea.h"
18
19void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { vea_setleds(start_led, num_leds); }
20
21void vea_rgb_init(void) { i2c_init(); }
22
23// Setleds for standard RGB
24void vea_setleds(LED_TYPE *ledarray, uint16_t leds) {
25 static bool s_init = false;
26 if (!s_init) {
27 vea_rgb_init();
28 s_init = true;
29 }
30
31 i2c_transmit(WS2812_ADDRESS, (uint8_t *)ledarray, sizeof(LED_TYPE) * (leds >> 1), WS2812_TIMEOUT);
32 i2c_transmit(WS2812_ADDRESS_SPLIT, (uint8_t *)ledarray+(sizeof(LED_TYPE) * (leds >> 1)), sizeof(LED_TYPE) * (leds - (leds >> 1)), WS2812_TIMEOUT);
33};
diff --git a/keyboards/oddforge/vea/vea.h b/keyboards/oddforge/vea/vea.h
new file mode 100644
index 000000000..8e5851b84
--- /dev/null
+++ b/keyboards/oddforge/vea/vea.h
@@ -0,0 +1,66 @@
1/*
2Copyright 2021 MajorKoos <github.com/majorkoos>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19#include "quantum.h"
20#include "i2c_master.h"
21#include "rgblight.h"
22#include "ws2812.h"
23#include "led.h"
24
25#define WS2812_ADDRESS 0xb0
26#define WS2812_ADDRESS_SPLIT 0xb8
27#define WS2812_TIMEOUT 100
28
29void vea_setleds(LED_TYPE *ledarray, uint16_t leds);
30
31/*
32LEFT
33 .5,0. .5,1. .5,2. .5,3. .5,4. .5,5. .5,6.
34.6,1. .7,1. .4,0. .4,1. .4,2. .4,3. .4,4. .4,5. .4,6.
35.6,2. .7,2. .3,0. .3,1. .3,2. .3,3. .3,4. .3,5.
36.6,3. .7,3. .2,0. .2,1. .2,2. .2,3. .2,4. .2,5.
37.6,4. .7,4. .1,0. .1,1. .1,2. .1,3. .1,4. .1,5.
38.6,5. .7,5. .0,0. .0,1. .0,2. .7,7. .6,6.
39
40RIGHT
41.5,8. .5,9. .5,10. .5,11. .5,12. .5,13. .6,11. .7,11. .6,13.
42.4,8. .4,9. .4,10. .4,11. .4,12. .4,13. .4,14. .6,10.
43.1,8. .1,9. .1,10. .1,11. .1,12. .1,13. .1,14. .2,14. .7,10.
44.2,8. .2,9. .2,10. .2,11. .2,12. .2,13. .3,13. .6,12.
45.3,8. .3,9. .3,10. .3,11. .3,12. .3,14. .6,8. .7,12.
46.6,14. .0,10. .0,9. .0,8. .7,8. .6,9. .7,9.
47
48*/
49
50#define LAYOUT( \
51 K50, K51, K52, K53, K54, K55, K56, K58, K59, K5A, K5B, K5C, K5D, K6B, K7B, K6D, \
52K61, K71, K40, K41, K42, K43, K44, K45, K46, K48, K49, K4A, K4B, K4C, K4D, K4E, K6A, \
53K62, K72, K30, K31, K32, K33, K34, K35, K18, K19, K1A, K1B, K1C, K1D, K1E, K2E, K7A, \
54K63, K73, K20, K21, K22, K23, K24, K25, K28, K29, K2A, K2B, K2C, K2D, K3D, K6C, \
55K64, K74, K10, K11, K12, K13, K14, K15, K38, K39, K3A, K3B, K3C, K3E, K68, K7C, \
56K65, K75, K00, K01, K02, K77, K66, K6E, K0A, K09, K08, K78, K69, K79 \
57){ \
58{ K00, K01, K02, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K08, K09, K0A, KC_NO, KC_NO, KC_NO, KC_NO }, \
59{ K10, K11, K12, K13, K14, K15, KC_NO, KC_NO, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
60{ K20, K21, K22, K23, K24, K25, KC_NO, KC_NO, K28, K29, K2A, K2B, K2C, K2D, K2E }, \
61{ K30, K31, K32, K33, K34, K35, KC_NO, KC_NO, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
62{ K40, K41, K42, K43, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, K4D, K4E }, \
63{ K50, K51, K52, K53, K54, K55, K56, KC_NO, K58, K59, K5A, K5B, K5C, K5D, KC_NO }, \
64{ KC_NO, K61, K62, K63, K64, K65, K66, KC_NO, K68, K69, K6A, K6B, K6C, K6D, K6E }, \
65{ KC_NO, K71, K72, K73, K74, K75, KC_NO, K77, K78, K79, K7A, K7B, K7C, KC_NO, KC_NO } \
66}