aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Jeppesen <2756925+Duckle29@users.noreply.github.com>2019-08-31 02:52:02 +0200
committerDrashna Jaelre <drashna@live.com>2019-08-30 17:52:02 -0700
commit19a85015c2b4c9b4a7196f5be73a16ceec5a4f31 (patch)
tree315825d4e4bf32886fff37be95449bd22830d8e2
parenta2b855febbaadb5b422e1096ddbdc8b5ff48ea4a (diff)
downloadqmk_firmware-19a85015c2b4c9b4a7196f5be73a16ceec5a4f31.tar.gz
qmk_firmware-19a85015c2b4c9b4a7196f5be73a16ceec5a4f31.zip
[Keyboard] Added Vitamins Included Rev2 (#6593)
* Fixed pin for RGB * Added support for second revision of vitamins included * Added rev2 config and switched to #pragma once * Switch to quantum.h pincontrol * Fixed left-half check * Moved revision agnostic code to main header file * Moved common build options to main makefile * Referred to rev2 documentation * JTAG is dissabled in keyboard.c now * moved EEHANDS to rev1 config * moved rev2 to use split_common * Updated default keymaps * Changed handedness ifdef to allow user-overrides * Add some space saving defines * Changed to more sane I2C clock * Removed rev2 check in matrix.c as rev2 uses split_common * Removed rev2 check in rev1 only code * Update debounce constant name Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Switch KEYMAP macro to LAYOUT Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Switch kc_keymap macro to layout_kc Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Switch kc_keymap macro to layout_kc Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Add legacy layout macro alias Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/vitamins_included/rev2/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Split readme into revision specific versions * Updated src to allow LTO * Renamed readmes to lower-case * Switched my keyboards to FEED VID * Fixed markdown lint errors * fixed readme links Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Maintain keymap backwards compatibility Co-Authored-By: Joel Challis <git@zvecr.com>
-rw-r--r--keyboards/lets_split/sockets/config.h6
-rw-r--r--keyboards/vitamins_included/config.h24
-rw-r--r--keyboards/vitamins_included/i2c.h2
-rw-r--r--keyboards/vitamins_included/info.json12
-rw-r--r--keyboards/vitamins_included/keymaps/default/config.h13
-rw-r--r--keyboards/vitamins_included/keymaps/default/keymap.c6
-rw-r--r--keyboards/vitamins_included/keymaps/numpad/config.h13
-rw-r--r--keyboards/vitamins_included/keymaps/numpad/keymap.c22
-rw-r--r--keyboards/vitamins_included/matrix.c2
-rw-r--r--keyboards/vitamins_included/readme.md118
-rw-r--r--keyboards/vitamins_included/rev1/config.h13
-rw-r--r--keyboards/vitamins_included/rev1/readme.md81
-rw-r--r--keyboards/vitamins_included/rev1/rev1.h35
-rw-r--r--keyboards/vitamins_included/rev1/rules.mk14
-rw-r--r--keyboards/vitamins_included/rev2/config.h81
-rw-r--r--keyboards/vitamins_included/rev2/readme.md10
-rw-r--r--keyboards/vitamins_included/rev2/rev2.c31
-rw-r--r--keyboards/vitamins_included/rev2/rev2.h2
-rw-r--r--keyboards/vitamins_included/rev2/rules.mk2
-rw-r--r--keyboards/vitamins_included/rules.mk80
-rw-r--r--keyboards/vitamins_included/serial.h4
-rw-r--r--keyboards/vitamins_included/split_util.c8
-rw-r--r--keyboards/vitamins_included/split_util.h8
-rw-r--r--keyboards/vitamins_included/vitamins_included.h41
24 files changed, 367 insertions, 261 deletions
diff --git a/keyboards/lets_split/sockets/config.h b/keyboards/lets_split/sockets/config.h
index 2d3e68610..e8459494b 100644
--- a/keyboards/lets_split/sockets/config.h
+++ b/keyboards/lets_split/sockets/config.h
@@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
19#pragma once 19#pragma once
20 20
21/* USB Device descriptor parameter */ 21/* USB Device descriptor parameter */
22#define VENDOR_ID 0xBEE5 22#define VENDOR_ID 0xFEED
23#define PRODUCT_ID 0xFEED 23#define PRODUCT_ID 0x0BEE
24#define DEVICE_VER 0x0001 24#define DEVICE_VER 0x0001
25#define MANUFACTURER Duckle29 25#define MANUFACTURER Duckle29
26#define PRODUCT Lets Split Sockets 26#define PRODUCT Lets Split Sockets
@@ -88,4 +88,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
88 #define NO_ACTION_FUNCTION 88 #define NO_ACTION_FUNCTION
89 89
90 #define DISABLE_LEADER 90 #define DISABLE_LEADER
91#endif // USE_Link_Time_Optimization \ No newline at end of file 91#endif // USE_Link_Time_Optimization
diff --git a/keyboards/vitamins_included/config.h b/keyboards/vitamins_included/config.h
index bcaf777c7..1be7f3a90 100644
--- a/keyboards/vitamins_included/config.h
+++ b/keyboards/vitamins_included/config.h
@@ -17,11 +17,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
18 18
19#pragma once 19#pragma once
20//#define USE_I2C
20 21
21#include "config_common.h" 22/* Common USB Device descriptor parameters */
22 23#define VENDOR_ID 0xFEED
23#define NO_ACTION_MACRO 24#define PRODUCT_ID 0xBEE5
24#define NO_ACTION_FUNCTION 25#define MANUFACTURER Duckle29
25 26#define PRODUCT Vitamins included
26 27
28#include "config_common.h"
27 29
30#ifndef NO_ACTION_MACRO
31 #define NO_ACTION_MACRO
32#endif
33#ifndef NO_ACTION_FUNCTION
34 #define NO_ACTION_FUNCTION
35#endif
36#ifndef NO_DEBUG
37 #define NO_DEBUG
38#endif // !NO_DEBUG
39#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
40 #define NO_PRINT
41#endif // !NO_PRINT
diff --git a/keyboards/vitamins_included/i2c.h b/keyboards/vitamins_included/i2c.h
index 739d134be..6cb8cce91 100644
--- a/keyboards/vitamins_included/i2c.h
+++ b/keyboards/vitamins_included/i2c.h
@@ -17,7 +17,7 @@
17#define SLAVE_BUFFER_SIZE 0x10 17#define SLAVE_BUFFER_SIZE 0x10
18 18
19// i2c SCL clock frequency 19// i2c SCL clock frequency
20#define SCL_CLOCK 400000L 20#define SCL_CLOCK 100000UL
21 21
22extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; 22extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE];
23 23
diff --git a/keyboards/vitamins_included/info.json b/keyboards/vitamins_included/info.json
new file mode 100644
index 000000000..598688a21
--- /dev/null
+++ b/keyboards/vitamins_included/info.json
@@ -0,0 +1,12 @@
1{
2 "keyboard_name": "Vitamins Included",
3 "url": "",
4 "maintainer": "Duckle29",
5 "width": 13,
6 "height": 4,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}]
10 }
11 }
12}
diff --git a/keyboards/vitamins_included/keymaps/default/config.h b/keyboards/vitamins_included/keymaps/default/config.h
index aba9fa7d4..95dd8ec46 100644
--- a/keyboards/vitamins_included/keymaps/default/config.h
+++ b/keyboards/vitamins_included/keymaps/default/config.h
@@ -20,16 +20,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20 20
21#pragma once 21#pragma once
22 22
23/* Use I2C or Serial, not both */ 23/* Use I2C or Serial. Default is Serial */
24
25#define USE_SERIAL
26// #define USE_I2C 24// #define USE_I2C
27 25
28/* Select hand configuration */ 26/* Select hand configuration */
27// Defaults:
28// Rev1: EE_HANDS
29// Rev2: SPLIT_HAND_PIN B4
29 30
31// You can override the defaults (rev1 doesn't support SPLIT_HAND_PIN)
32//#define EE_HANDS
30//#define MASTER_LEFT 33//#define MASTER_LEFT
31// #define MASTER_RIGHT 34//#define MASTER_RIGHT
32#define EE_HANDS 35
33 36
34#ifdef AUDIO_ENABLE 37#ifdef AUDIO_ENABLE
35 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ 38 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
diff --git a/keyboards/vitamins_included/keymaps/default/keymap.c b/keyboards/vitamins_included/keymaps/default/keymap.c
index 782490572..9ee0d1a35 100644
--- a/keyboards/vitamins_included/keymaps/default/keymap.c
+++ b/keyboards/vitamins_included/keymaps/default/keymap.c
@@ -116,17 +116,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
116 116
117/* Adjust (Lower + Raise) 117/* Adjust (Lower + Raise)
118 * ,-----------------------------------------------------------------------------------. 118 * ,-----------------------------------------------------------------------------------.
119 * | | Reset| | | | | | | | | | Del | 119 * | | RESET| | | | | | | | | RESET| Del |
120 * |------+------+------+------+------+-------------+------+------+------+------+------| 120 * |------+------+------+------+------+-------------+------+------+------+------+------|
121 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | 121 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
122 * |------+------+------+------+------+------|------+------+------+------+------+------| 122 * |------+------+------+------+------+------|------+------+------+------+------+------|
123 * | | | | | | | | | | | | | 123 * | | | | | | | | | | | | |
124 * |------+------+------+------+------+------+------+------+------+------+------+------| 124 * |------+------+------+------+------+------+------+------+------+------+------+------|
125 * | | | | | | | | | | |RGB_MOD| 125 * | | | | | | | | | | |RGBMOD|
126 * `-----------------------------------------------------------------------------------' 126 * `-----------------------------------------------------------------------------------'
127 */ 127 */
128[_ADJUST] = LAYOUT_ortho_4x12( \ 128[_ADJUST] = LAYOUT_ortho_4x12( \
129 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ 129 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_DEL, \
130 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ 130 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
131 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ 131 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
132 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD \ 132 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD \
diff --git a/keyboards/vitamins_included/keymaps/numpad/config.h b/keyboards/vitamins_included/keymaps/numpad/config.h
index aba9fa7d4..95dd8ec46 100644
--- a/keyboards/vitamins_included/keymaps/numpad/config.h
+++ b/keyboards/vitamins_included/keymaps/numpad/config.h
@@ -20,16 +20,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20 20
21#pragma once 21#pragma once
22 22
23/* Use I2C or Serial, not both */ 23/* Use I2C or Serial. Default is Serial */
24
25#define USE_SERIAL
26// #define USE_I2C 24// #define USE_I2C
27 25
28/* Select hand configuration */ 26/* Select hand configuration */
27// Defaults:
28// Rev1: EE_HANDS
29// Rev2: SPLIT_HAND_PIN B4
29 30
31// You can override the defaults (rev1 doesn't support SPLIT_HAND_PIN)
32//#define EE_HANDS
30//#define MASTER_LEFT 33//#define MASTER_LEFT
31// #define MASTER_RIGHT 34//#define MASTER_RIGHT
32#define EE_HANDS 35
33 36
34#ifdef AUDIO_ENABLE 37#ifdef AUDIO_ENABLE
35 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ 38 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
diff --git a/keyboards/vitamins_included/keymaps/numpad/keymap.c b/keyboards/vitamins_included/keymaps/numpad/keymap.c
index 1767851fe..973d4e936 100644
--- a/keyboards/vitamins_included/keymaps/numpad/keymap.c
+++ b/keyboards/vitamins_included/keymaps/numpad/keymap.c
@@ -7,7 +7,7 @@ extern keymap_config_t keymap_config;
7// Layer names don't all need to be of the same length, obviously, and you can also skip them 7// Layer names don't all need to be of the same length, obviously, and you can also skip them
8// entirely and just use numbers. 8// entirely and just use numbers.
9#define _NUMPAD 0 9#define _NUMPAD 0
10#define _ADJUST 3 10#define _ADJUST 1
11 11
12enum custom_keycodes { 12enum custom_keycodes {
13 NUMPAD = SAFE_RANGE, 13 NUMPAD = SAFE_RANGE,
@@ -18,31 +18,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
18 18
19/* Numpad 19/* Numpad
20 * ,-----------------------------------------------------------------------------------. 20 * ,-----------------------------------------------------------------------------------.
21 * | 0 | 1 | 4 | 7 | nlck | esc | 0 | 1 | 4 | 7 | nlck | esc | 21 * | 0 | 1 | 4 | 7 | nlck | <-- | 0 | 1 | 4 | 7 | nlck | <-- |
22 * |------+------+------+------+------+-------------+------+------+------+------+------| 22 * |------+------+------+------+------+-------------+------+------+------+------+------|
23 * | , | 2 | 5 | 8 | / | adj | , | 2 | 5 | 8 | / | adj | 23 * | adj | 2 | 5 | 8 | / | \/ | , | 2 | 5 | 8 | / | \/ |
24 * |------+------+------+------+------+------|------+------+------+------+------+------| 24 * |------+------+------+------+------+------|------+------+------+------+------+------|
25 * | . | 3 | 6 | 9 | * | adj | . | 3 | 6 | 9 | * | adj | 25 * | . | 3 | 6 | 9 | * | /\ | . | 3 | 6 | 9 | * | /\ |
26 * |------+------+------+------+------+------+------+------+------+------+------+------| 26 * |------+------+------+------+------+------+------+------+------+------+------+------|
27 * | Enter| adj | - | + |bckspc| adj | Enter| adj | - | + |bckspc| adj | 27 * | Enter| tab | - | + |bckspc| --> | Enter| tab | - | + |bckspc| --> |
28 * `-----------------------------------------------------------------------------------' 28 * `-----------------------------------------------------------------------------------'
29 */ 29 */
30[_NUMPAD] = LAYOUT_ortho_4x12( \ 30[_NUMPAD] = LAYOUT_ortho_4x12( \
31 KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_ESC, KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_ESC, \ 31 KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_LEFT, KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_LEFT,\
32 KC_KP_COMMA, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, ADJUST, KC_KP_COMMA, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, ADJUST, \ 32 ADJUST, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, KC_DOWN, ADJUST, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, KC_DOWN,\
33 KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, ADJUST, KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, ADJUST , \ 33 KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, KC_UP, KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, KC_UP, \
34 KC_KP_ENTER, ADJUST, KC_KP_MINUS, KC_KP_PLUS, KC_BSPACE, ADJUST, KC_KP_ENTER, ADJUST, KC_KP_MINUS, KC_KP_PLUS, KC_BSPACE, ADJUST \ 34 KC_KP_ENTER, KC_TAB, KC_KP_MINUS, KC_KP_PLUS, KC_BSPACE, KC_RIGHT, KC_KP_ENTER, KC_TAB, KC_KP_MINUS, KC_KP_PLUS, KC_BSPACE, KC_RIGHT\
35), 35),
36 36
37/* Adjust (Lower + Raise) 37/* Adjust (Lower + Raise)
38 * ,-----------------------------------------------------------------------------------. 38 * ,-----------------------------------------------------------------------------------.
39 * | | Reset| | | | | | | | | | Del | 39 * | | | | | | | | | | | | Del |
40 * |------+------+------+------+------+-------------+------+------+------+------+------| 40 * |------+------+------+------+------+-------------+------+------+------+------+------|
41 * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | 41 * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | |
42 * |------+------+------+------+------+------|------+------+------+------+------+------| 42 * |------+------+------+------+------+------|------+------+------+------+------+------|
43 * | | | | | | | | | | | | | 43 * | | | | | | | | | | | | |
44 * |------+------+------+------+------+------+------+------+------+------+------+------| 44 * |------+------+------+------+------+------+------+------+------+------+------+------|
45 * | | | | | | RESET RESET | | | | |RGB_MOD| 45 * | | | | | | RESET RESET | | | | |RGBMOD|
46 * `-----------------------------------------------------------------------------------' 46 * `-----------------------------------------------------------------------------------'
47 */ 47 */
48[_ADJUST] = LAYOUT_ortho_4x12( \ 48[_ADJUST] = LAYOUT_ortho_4x12( \
diff --git a/keyboards/vitamins_included/matrix.c b/keyboards/vitamins_included/matrix.c
index d44e70f08..df3e86985 100644
--- a/keyboards/vitamins_included/matrix.c
+++ b/keyboards/vitamins_included/matrix.c
@@ -131,7 +131,7 @@ uint8_t matrix_cols(void) {
131} 131}
132 132
133bool has_usb(void) { 133bool has_usb(void) {
134 return UDADDR & _BV(ADDEN); // This will return true of a USB connection has been established 134 return UDADDR & _BV(ADDEN); // This will return true if a USB connection has been established
135} 135}
136 136
137void matrix_init(void) 137void matrix_init(void)
diff --git a/keyboards/vitamins_included/readme.md b/keyboards/vitamins_included/readme.md
index 84bab9007..5702fe343 100644
--- a/keyboards/vitamins_included/readme.md
+++ b/keyboards/vitamins_included/readme.md
@@ -1,126 +1,44 @@
1Let's Split Vitamins Included 1# Let's Split Vitamins Included
2======
3![Let's Split Vitamins included, assmebled in 3D printed case](https://i.imgur.com/btl0vNQ.jpg)
4
5This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/
6
7
8**Hardware files for the Let's Split vitamins included are stored [here](http://github.com/duckle29/let-s-Split-v2/tree/onboardMCU)**
9
10## First Time Setup
11
12Clone the `qmk_firmware` repo and navigate to its top level directory. [Once your build environment is setup](https://docs.qmk.fm/getting_started_build_tools.html), you'll be able to generate the default .hex using the [build/compile instructions](https://docs.qmk.fm/build-compile-instructions) in the docs
13
14If everything worked correctly you will see a file:
15 2
16```bash 3![Let's Split Vitamins included, assmebled in 3D printed case](https://i.imgur.com/btl0vNQ.jpg)
17lets_split_vitamins_rev1_YOUR_KEYMAP_NAME.hex
18```
19
20If you want, you can flash the hex file to the keyboard right after compilation, by adding `:avrdude` to the end of the make command like so:
21 4
22```bash 5This readme and most of the code are from the lets split readme
23make lets_split_vitamins/rev1:default:avrdude
24```
25 6
26This will both compile the hex, and flash the connected half. 7## Quick links
27 8
28For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. 9[REV1](./rev1/readme.md)
10[REV2](./rev2/readme.md)
29 11
12## Hardware
30 13
31Features 14Hardware files for the Let's Split vitamins included are stored [here](https://git.io/vita-inc)
32--------
33 15
34For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). 16## Features
35 17
36Some features supported by the firmware: 18Some features supported by the firmware:
37 19
38* Either half can connect to the computer via USB, or both halves can be used 20* Either half can connect to the computer via USB, or both halves can be used independently.
39 independently.
40* You only need 3 wires to connect the two halves. One for VCC, one for GND and one
41 for serial communication.
42* Optional support for I2C connection between the two halves if for some 21* Optional support for I2C connection between the two halves if for some
43 reason you require a faster connection between the two halves. Note this 22 reason you require a faster connection between the two halves. Note that this requires 4 conductors between halves, and as such requires a TRRS cable.
44 requires an extra wire between halves and pull-up resistors on the data lines. 23
45 This is supported on the vitamins included. 24## Required Hardware
46 The extra data line can also be used for ws2812 type LEDs. 25
47 If neither I2C nor RGB underglow is used, a TRS cable can be used instead of the 4wire TRRS cables.
48
49Required Hardware
50-----------------
51|Amount| Description | 26|Amount| Description |
52|--|--| 27|--|--|
53| 1 | PCB kit from novelkeys | 28| 1 | PCB kit from novelkeys |
54| 48 | MX compatible switches | 29| 48 | MX compatible switches |
55| 48 | 1U keycaps 30| 48 | 1U keycaps
56| 2 | Half cases. A 3D model for the left half is available [here](https://cad.onshape.com/documents/c6e5ae250d1e24fe46c9ef6c/w/d69f7049c0921df3d2b241f9/e/ecc2b176ab52a6d77bc55051). Mirror that to get a right-half case. Plate cases will be designed in the future. 31| 1 | Mini-usb-B cable or USB-C cable for rev2. Keep in mind rev2.0 doesn't work with USB-C <> USB-C cables|
57| 1 | USB-mini-B cable of your choice |
58| 1 | TRS / TRRS cable 32| 1 | TRS / TRRS cable
59 33
60Optional Hardware 34## Optional Hardware
61-----------------
62 35
63A speaker can be hooked-up to the footprint on the PCBs. It is already enabled in the default firmware from github. 36A speaker can be hooked-up to the footprint on the PCBs. It is already enabled in the default firmware.
64
65A strip of WS2812 LEDs can be hooked up too, a guide will be written on how to do that once I get mine in the mail.
66The PCB and connectors can safely handle 1A of current, but the USB standard is only rated at 500mA. Keep that in mind when picking the amount of LEDs.
67 37
38WS2812 LEDs can be added to the board. Check the different revision readme for specifics.
68 39
69## Using I2C 40## Using I2C
70 41
71On the left half PCB, there's two pads labled ***I2C Pullup*** if you want to use I2C, you need to bridge those two solder jumpers with a soldering iron. 42On the left half PCB, there's two pads labled ***I2C Pullup*** if you want to use I2C, you need to bridge those two solder jumpers with a soldering iron.
72 43
73You can change your configuration between serial and i2c by modifying your `config.h` file. 44You can change your configuration between serial and i2c by modifying your `config.h` file.
74
75Notes on Software Configuration
76-------------------------------
77
78Configuring the firmware is similar to any other QMK project. One thing
79to note is that `MATRIX_ROWS` in `config.h` is the total number of rows between
80the two halves, so because the let's split vitamins included has 4 rows in each half, it's
81`MATRIX_ROWS=8`.
82
83Also, the current implementation assumes a maximum of 8 columns, but it would
84not be very difficult to adapt it to support more if required.
85
86
87## Entering bootloader
88If the keyboard isn't new, and has been flashed before, you need to enter bootloader.
89To enter bootloader, either use the assigned keys on the keymap, or if none have been put in the keymap, quickly short the reset to gnd twice. (Bottom pins of programming header, see image) ![Reset pins](https://i.imgur.com/LCXlv9W.png)
90
91If using the default keymap, there's a reset key-combination on each half:
92***Lower (SW23) and left-shift (SW13)*** on the left half, or
93***Raise(SW44) and Enter(SW42)*** on the right half
94It is recommended to add such reset keys to any custom keymaps. It shouldn't be necesarry to have one on each half, but the default layout has that.
95
96The board exits bootloader mode after 8 seconds, if you haven't started flashing.
97
98## EEPROM
99
100If this is the first time you're flashing the boards, you have to flash EEPROM
101
1020. If your keyboard is plugged in, unplug it
1031. Open a terminal, and navigate to the qmk_firmware folder
1042. Run `ls /dev | grep tty` Note down which ports you see
1052. Plug the keyboard in, if it's new, it should enter bootloader, if it's not new, see **Entering bootloader** on how to enter bootloader mode
1064. Right after entering bootloader, run `ls /dev | grep tty` again. There should be a new tty, this is the bootloader TTY, note it down. If nothing shows see **Entering bootloader** on how to enter bootloader mode
1076. For the left hand side, run `avrdude -c avr109 -p m32u4 -P /dev/ttyS1 -U eeprom:w:"./quantum/split_common/eeprom-lefthand.eep":a`
108Replace ***/dev/ttyS1*** with the port you noted down earlier. If you're on windows using msys2, replace ***/dev/ttyS1*** with COM2, note that the number is one higher than the tty number.
109Do the same For the right hand, but change the file to ***eeprom-righthand.eep***
110
111Your EEPROM should be flashed :)
112
113In the future, you shouldn't need to flash EEPROM (it will in fact wear the eeprom memory, so don't)
114
115## Flashing
116If you haven't flashed EEPROM before, do that first.
117
118To flash keymaps onto the keyboard, use:
119```bash
120make lets_split_vitamins/rev1:[KEYMAP]:avrdude
121```
122from the qmk_firmware folder. Default being the default keymap.
123
124You can plug either half into USB and it will work. you can also remove the TRS/TRRS cable, and plug both halves in. (which is why the default layout has reset on both halves)
125
126Enjoy your keyboard! :D
diff --git a/keyboards/vitamins_included/rev1/config.h b/keyboards/vitamins_included/rev1/config.h
index f4e5666fe..39b6a9ff4 100644
--- a/keyboards/vitamins_included/rev1/config.h
+++ b/keyboards/vitamins_included/rev1/config.h
@@ -16,17 +16,14 @@ You should have received a copy of the GNU General Public License
16along with this program. If not, see <http://www.gnu.org/licenses/>. 16along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
18 18
19#ifndef REV1_CONFIG_H 19#pragma once
20#define REV1_CONFIG_H
21 20
22#include "config_common.h" 21#include "config_common.h"
23 22
24/* USB Device descriptor parameter */ 23#define EE_HANDS
25#define VENDOR_ID 0xBEE5 24
26#define PRODUCT_ID 0xF33D 25/* USB Device descriptor parameters */
27#define DEVICE_VER 0x0001 26#define DEVICE_VER 0x0001
28#define MANUFACTURER Duckle29
29#define PRODUCT Lets Split sockets vitamins included
30#define DESCRIPTION A split keyboard for the cheapish makers 27#define DESCRIPTION A split keyboard for the cheapish makers
31 28
32/* key matrix size */ 29/* key matrix size */
@@ -80,5 +77,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
80//#define NO_ACTION_ONESHOT 77//#define NO_ACTION_ONESHOT
81//#define NO_ACTION_MACRO 78//#define NO_ACTION_MACRO
82//#define NO_ACTION_FUNCTION 79//#define NO_ACTION_FUNCTION
83
84#endif
diff --git a/keyboards/vitamins_included/rev1/readme.md b/keyboards/vitamins_included/rev1/readme.md
new file mode 100644
index 000000000..038f14f5d
--- /dev/null
+++ b/keyboards/vitamins_included/rev1/readme.md
@@ -0,0 +1,81 @@
1# Rev1
2
3This readme describes the specifics of using the rev1 design
4
5## First Time Setup
6
7Clone the `qmk_firmware` repo and navigate to its top level directory. [Once your build environment is setup](https://docs.qmk.fm/getting_started_build_tools.html), you'll be able to generate the default .hex using the [build/compile instructions](https://docs.qmk.fm/build-compile-instructions) in the docs
8
9If everything worked correctly you will see a file:
10
11```bash
12lets_split_vitamins_rev1_YOUR_KEYMAP_NAME.hex
13```
14
15If you want, you can flash the hex file to the keyboard right after compilation, by adding `:avrdude` to the end of the make command like so:
16
17```bash
18make lets_split_vitamins/rev1:default:avrdude
19```
20
21This will both compile the hex, and flash the connected half.
22
23For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md.
24
25## Entering bootloader
26
27If the keyboard isn't new, and has been flashed before, you need to enter bootloader.
28To enter bootloader, either use the assigned keys on the keymap, or if none have been put in the keymap, quickly short the reset to gnd twice. (Bottom pins of programming header, see image) ![Reset pins](https://i.imgur.com/LCXlv9W.png)
29
30If using the default keymap, there's a reset key-combination on each half:
31***Lower (SW23) and left-shift (SW13)*** on the left half, or
32***Raise(SW44) and Enter(SW42)*** on the right half
33It is recommended to add such reset keys to any custom keymaps. It shouldn't be necesarry to have one on each half, but the default layout has that.
34
35The board exits bootloader mode after 8 seconds, if you haven't started flashing.
36
37## EEPROM
38
39If this is the first time you're flashing the boards, you have to flash EEPROM
40
410. If your keyboard is plugged in, unplug it
421. Open a terminal, and navigate to the qmk_firmware folder
431. Run `ls /dev | grep tty` Note down which ports you see
441. Plug the keyboard in, if it's new, it should enter bootloader, if it's not new, see **Entering bootloader** on how to enter bootloader mode
451. Right after entering bootloader, run `ls /dev | grep tty` again. There should be a new tty, this is the bootloader TTY, note it down. If nothing shows see **Entering bootloader** on how to enter bootloader mode
461. For the left hand side, run `avrdude -c avr109 -p m32u4 -P /dev/ttyS1 -U eeprom:w:"./quantum/split_common/eeprom-lefthand.eep":a`
47Replace ***/dev/ttyS1*** with the port you noted down earlier. If you're on windows using msys2, replace ***/dev/ttyS1*** with COM2, note that the number is one higher than the tty number.
48Do the same For the right hand, but change the file to ***eeprom-righthand.eep***
49
50Your EEPROM should be flashed :)
51
52In the future, you shouldn't need to flash EEPROM (it will in fact wear the eeprom memory, so don't)
53
54## Flashing
55
56If you haven't flashed EEPROM before, do that first.
57
58To flash keymaps onto the keyboard, use:
59
60```bash
61make lets_split_vitamins/rev1:[KEYMAP]:avrdude
62```
63
64from the qmk_firmware folder. Default being the default keymap.
65
66## Cases
67
68The keyboard is supplied with some simple plate cases, alternatively a 3D model for the left half is available [here](https://cad.onshape.com/documents/c6e5ae250d1e24fe46c9ef6c/w/d69f7049c0921df3d2b241f9/e/ecc2b176ab52a6d77bc55051).
69
70Alternatively the flat case for the Rev2 works for the rev1 kit as well, however one of the supports collide with a diode. If printed in thermo-plastics this can be heated and pressed to form a recess for the diode.
71
72## WS2812 RGB
73
74If you wish to add RGB LED strips to your board, then the boards have breakouts for these.
75You can either have each halfcontrol it's own strip of LEDs, or, if you're using a TRRS cable, you can have one half control the LEDs in both halves.
76
77To add RGB LEDs to the board, solder the + and - of the >WS2812 headers to the LED strips. Then if you want each half to control it's own set of LEDs seperately, solder the D pad to Din on the strips.
78
79If you instead want to syncronize the halves over a TRRS cable, solder the D pad to Din in the side you want to control the strips, either will work so flip a coin, and then solder the Dout pad to the WS2812> pad on the board. On the other half, solder the WS2812> pad to Din.
80
81![pad legend](https://i.imgur.com/g6ane0Q.jpg)
diff --git a/keyboards/vitamins_included/rev1/rev1.h b/keyboards/vitamins_included/rev1/rev1.h
index ee97e09cf..53ae64a6e 100644
--- a/keyboards/vitamins_included/rev1/rev1.h
+++ b/keyboards/vitamins_included/rev1/rev1.h
@@ -1,36 +1,3 @@
1#ifndef REV1_H
2#define REV1_H
3#define EE_HANDS // This isn't optional for the vitamins included
4 1
2#pragma once
5#include QMK_KEYBOARD_H 3#include QMK_KEYBOARD_H
6
7#include "quantum.h"
8
9
10#ifdef USE_I2C
11#include <stddef.h>
12#ifdef __AVR__
13 #include <avr/io.h>
14 #include <avr/interrupt.h>
15#endif
16#endif
17
18#define KEYMAP( \
19 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
20 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
21 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
22 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
23 ) \
24 { \
25 { L00, L01, L02, L03, L04, L05 }, \
26 { L10, L11, L12, L13, L14, L15 }, \
27 { L20, L21, L22, L23, L24, L25 }, \
28 { L30, L31, L32, L33, L34, L35 }, \
29 { R00, R01, R02, R03, R04, R05 }, \
30 { R10, R11, R12, R13, R14, R15 }, \
31 { R20, R21, R22, R23, R24, R25 }, \
32 { R30, R31, R32, R33, R34, R35 } \
33 }
34
35#define LAYOUT_ortho_4x12 KEYMAP
36#endif
diff --git a/keyboards/vitamins_included/rev1/rules.mk b/keyboards/vitamins_included/rev1/rules.mk
index 0542810ee..b500c8f27 100644
--- a/keyboards/vitamins_included/rev1/rules.mk
+++ b/keyboards/vitamins_included/rev1/rules.mk
@@ -1,5 +1,9 @@
1BACKLIGHT_ENABLE = no 1SRC += matrix.c \
2AUDIO_ENABLE = yes 2 split_util.c \
3RGBLIGHT_ENABLE = yes 3 ssd1306.c
4DEBUG_ENABLE = no 4
5CONSOLE_ENABLE = no 5QUANTUM_LIB_SRC += i2c.c \
6 serial.c \
7
8CUSTOM_MATRIX = yes
9BOOTLOADER = caterina
diff --git a/keyboards/vitamins_included/rev2/config.h b/keyboards/vitamins_included/rev2/config.h
new file mode 100644
index 000000000..4ae02e86e
--- /dev/null
+++ b/keyboards/vitamins_included/rev2/config.h
@@ -0,0 +1,81 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3Copyright 2015 Jack Humbert
4Copyright 2019 Mikkel Jeppesen
5
6This program is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include "config_common.h"
23
24#define SPLIT_HAND_PIN B4
25#define SOFT_SERIAL_PIN D0
26
27/* USB Device descriptor parameter */
28#define DEVICE_VER 0x0002
29#define DESCRIPTION A toolless split keyboard for the cheapish makers
30
31/* key matrix size */
32// Rows are doubled-up
33#define MATRIX_ROWS 8
34#define MATRIX_COLS 6
35
36// wiring of each half
37#define MATRIX_ROW_PINS { F5, F6, C7, F7 }
38#define MATRIX_COL_PINS { F1, F4, E2, B6, D7, D6}
39
40/* define if matrix has ghost */
41//#define MATRIX_HAS_GHOST
42
43/* number of backlight levels */
44// #define BACKLIGHT_LEVELS 3
45
46/* Set 0 if debouncing isn't needed */
47#define DEBOUNCE 5
48
49/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
50#define LOCKING_SUPPORT_ENABLE
51/* Locking resynchronize hack */
52#define LOCKING_RESYNC_ENABLE
53
54/* ws2812 RGB LED */
55#define RGB_DI_PIN F0
56
57#define RGBLED_NUM 12 // Number of LEDs
58#define RGBLIGHT_ANIMATIONS
59
60/* Audio settings */
61#ifdef AUDIO_ENABLE
62 #define C6_AUDIO // Define this to enable the buzzer
63#endif
64
65/*
66 * Feature disable options
67 * These options are also useful to firmware size reduction.
68 */
69
70/* disable debug print */
71// #define NO_DEBUG
72
73/* disable print */
74// #define NO_PRINT
75
76/* disable action features */
77//#define NO_ACTION_LAYER
78//#define NO_ACTION_TAPPING
79//#define NO_ACTION_ONESHOT
80//#define NO_ACTION_MACRO
81//#define NO_ACTION_FUNCTION
diff --git a/keyboards/vitamins_included/rev2/readme.md b/keyboards/vitamins_included/rev2/readme.md
new file mode 100644
index 000000000..3e202b64e
--- /dev/null
+++ b/keyboards/vitamins_included/rev2/readme.md
@@ -0,0 +1,10 @@
1# Rev2
2
3Revision 2 is documented [on qmk.fm](https://qmk.fm/keyboards/vitamins_included/)
4
5Key differences between rev1 and rev2:
6
7* rev2 uses qmk-dfu bootloader
8* rev2 uses a USB-C connector
9* rev2 6 WS2812 LEDs factory mounted to each half
10* rev2 has more mounting holes. 1 additional M3, and 4 additional M2.5 holes
diff --git a/keyboards/vitamins_included/rev2/rev2.c b/keyboards/vitamins_included/rev2/rev2.c
new file mode 100644
index 000000000..7bdeebb03
--- /dev/null
+++ b/keyboards/vitamins_included/rev2/rev2.c
@@ -0,0 +1,31 @@
1#include "rev2.h"
2
3
4#ifdef SSD1306OLED
5void led_set_kb(uint8_t usb_led) {
6 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
7 led_set_user(usb_led);
8}
9#endif
10
11bool is_keyboard_left(void) {
12 #if defined(MASTER_LEFT)
13 return is_keyboard_master();
14 #elif defined(MASTER_RIGHT)
15 return !is_keyboard_master();
16 #elif defined(SPLIT_HAND_PIN)
17 // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
18 setPinInputHigh(SPLIT_HAND_PIN);
19 bool x = !readPin(SPLIT_HAND_PIN);
20 setPinInput(SPLIT_HAND_PIN);
21 return x;
22 #elif defined(EE_HANDS)
23 return eeprom_read_byte(EECONFIG_HANDEDNESS);
24 #endif
25
26 return is_keyboard_master();
27}
28
29void matrix_init_kb(void) {
30 matrix_init_user();
31};
diff --git a/keyboards/vitamins_included/rev2/rev2.h b/keyboards/vitamins_included/rev2/rev2.h
new file mode 100644
index 000000000..7e12888dd
--- /dev/null
+++ b/keyboards/vitamins_included/rev2/rev2.h
@@ -0,0 +1,2 @@
1#pragma once
2#include QMK_KEYBOARD_H
diff --git a/keyboards/vitamins_included/rev2/rules.mk b/keyboards/vitamins_included/rev2/rules.mk
new file mode 100644
index 000000000..3d8bbe0f6
--- /dev/null
+++ b/keyboards/vitamins_included/rev2/rules.mk
@@ -0,0 +1,2 @@
1SPLIT_KEYBOARD = yes # Rev2 uses split_common
2BOOTLOADER = qmk-dfu
diff --git a/keyboards/vitamins_included/rules.mk b/keyboards/vitamins_included/rules.mk
index 34f423f59..761df0357 100644
--- a/keyboards/vitamins_included/rules.mk
+++ b/keyboards/vitamins_included/rules.mk
@@ -1,76 +1,28 @@
1SRC += matrix.c \
2 i2c.c \
3 split_util.c \
4 serial.c \
5 ssd1306.c
6
7# MCU name 1# MCU name
8MCU = atmega32u4 2MCU = atmega32u4
9 3
10# Processor frequency.
11# This will define a symbol, F_CPU, in all source code files equal to the
12# processor frequency in Hz. You can then use this symbol in your source code to
13# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
14# automatically to create a 32-bit value in your source code.
15#
16# This will be an integer division of F_USB below, as it is sourced by
17# F_USB after it has run through any CPU prescalers. Note that this value
18# does not *change* the processor frequency - it should merely be updated to
19# reflect the processor speed set externally so that the code can use accurate
20# software delays.
21F_CPU = 16000000
22
23#
24# LUFA specific
25#
26# Target architecture (see library "Board Types" documentation).
27ARCH = AVR8
28
29# Input clock frequency.
30# This will define a symbol, F_USB, in all source code files equal to the
31# input clock frequency (before any prescaling is performed) in Hz. This value may
32# differ from F_CPU if prescaling is used on the latter, and is required as the
33# raw input clock is fed directly to the PLL sections of the AVR for high speed
34# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
35# at the end, this will be done automatically to create a 32-bit value in your
36# source code.
37#
38# If no clock division is performed on the input clock inside the AVR (via the
39# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
40F_USB = $(F_CPU)
41
42# Bootloader
43# This definition is optional, and if your keyboard supports multiple bootloaders of
44# different sizes, comment this out, and the correct address will be loaded
45# automatically (+60). See bootloader.mk for all options.
46BOOTLOADER = caterina
47
48# Interrupt driven control endpoint task(+60)
49OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
50
51# Build Options 4# Build Options
52# change to "no" to disable the options, or define them in the Makefile in 5# change to "no" to disable the options, or define them in the Makefile in
53# the appropriate keymap folder that will get included automatically 6# the appropriate keymap folder that will get included automatically
54# 7#
55BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) 8AUDIO_ENABLE = yes # Audio output on port C6
56MOUSEKEY_ENABLE = no # Mouse keys(+4700) 9BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
57EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 10BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
58CONSOLE_ENABLE = no # Console for debug(+400) 11BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
59COMMAND_ENABLE = no # Commands for debug and configuration 12COMMAND_ENABLE = no # Commands for debug and configuration
60NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 13CONSOLE_ENABLE = no # Console for debug(+400)
61BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality 14DEBUG_ENABLE = no # Enable more debug info
62MIDI_ENABLE = no # MIDI controls 15EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
63AUDIO_ENABLE = no # Audio output on port C6 16MIDI_ENABLE = no # MIDI controls
64UNICODE_ENABLE = no # Unicode 17MOUSEKEY_ENABLE = no # Mouse keys(+4700)
65BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 18NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
66RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. 19RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
20UNICODE_ENABLE = no # Unicode
67# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 21# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
68SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 22SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
69
70CUSTOM_MATRIX = yes
71 23
72LAYOUTS = ortho_4x12 24LAYOUTS = ortho_4x12
73 25
74DEFAULT_FOLDER = vitamins_included/rev1 26DEFAULT_FOLDER = vitamins_included/rev2
75 27
76EXTRAFLAGS += -flto 28LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/vitamins_included/serial.h b/keyboards/vitamins_included/serial.h
index ade7620b7..53b3a3bf0 100644
--- a/keyboards/vitamins_included/serial.h
+++ b/keyboards/vitamins_included/serial.h
@@ -1,5 +1,4 @@
1#ifndef MY_SERIAL_H 1#pragma once
2#define MY_SERIAL_H
3 2
4#include "config.h" 3#include "config.h"
5#include <stdbool.h> 4#include <stdbool.h>
@@ -24,4 +23,3 @@ void serial_slave_init(void);
24int serial_update_buffers(void); 23int serial_update_buffers(void);
25bool serial_slave_data_corrupt(void); 24bool serial_slave_data_corrupt(void);
26 25
27#endif
diff --git a/keyboards/vitamins_included/split_util.c b/keyboards/vitamins_included/split_util.c
index b86ad137b..4a898cd7b 100644
--- a/keyboards/vitamins_included/split_util.c
+++ b/keyboards/vitamins_included/split_util.c
@@ -14,6 +14,14 @@
14volatile bool isLeftHand = true; 14volatile bool isLeftHand = true;
15volatile bool contacted_by_master = false; 15volatile bool contacted_by_master = false;
16 16
17bool is_rev2(void) // Input with pullup, if rev2, pin is pulled down with 220R resistor.
18{
19 setPinInputHigh(B5);
20 bool rev2 = !readPin(B5);
21 setPinInput(B5);
22 return rev2;
23}
24
17// this code runs before the usb and keyboard is initialized 25// this code runs before the usb and keyboard is initialized
18void matrix_setup(void) { 26void matrix_setup(void) {
19 isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); 27 isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
diff --git a/keyboards/vitamins_included/split_util.h b/keyboards/vitamins_included/split_util.h
index 5acf386e4..da7be5155 100644
--- a/keyboards/vitamins_included/split_util.h
+++ b/keyboards/vitamins_included/split_util.h
@@ -1,8 +1,8 @@
1#ifndef SPLIT_KEYBOARD_UTIL_H 1#pragma once
2#define SPLIT_KEYBOARD_UTIL_H
3 2
4#include <stdbool.h> 3#include <stdbool.h>
5#include "eeconfig.h" 4#include "eeconfig.h"
5#include "quantum.h"
6 6
7#define SLAVE_I2C_ADDRESS 0x32 7#define SLAVE_I2C_ADDRESS 0x32
8 8
@@ -10,9 +10,7 @@ extern volatile bool isLeftHand;
10extern volatile bool contacted_by_master; 10extern volatile bool contacted_by_master;
11 11
12bool has_usb(void); 12bool has_usb(void);
13bool is_rev2(void);
13 14
14// slave version of matix scan, defined in matrix.c 15// slave version of matix scan, defined in matrix.c
15void matrix_slave_scan(void); 16void matrix_slave_scan(void);
16
17
18#endif
diff --git a/keyboards/vitamins_included/vitamins_included.h b/keyboards/vitamins_included/vitamins_included.h
index b5fbd5294..4cdfe03ed 100644
--- a/keyboards/vitamins_included/vitamins_included.h
+++ b/keyboards/vitamins_included/vitamins_included.h
@@ -1,13 +1,40 @@
1#ifndef VITAMINS_INCLUDED_H 1#pragma once
2#define VITAMINS_INCLUDED_H
3 2
4#include "quantum.h" 3#include "quantum.h"
5 4
6#include "rev1.h" 5#ifdef KEYBOARD_vitamins_included_rev1
6 #include "rev1.h"
7#else
8 #include "rev2.h"
9#endif
10
11#ifdef USE_I2C
12#include <stddef.h>
13#ifdef __AVR__
14 #include <avr/io.h>
15 #include <avr/interrupt.h>
16#endif
17#endif
7 18
19#define LAYOUT( \
20 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
21 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
22 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
23 L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
24 ) \
25 { \
26 { L00, L01, L02, L03, L04, L05 }, \
27 { L10, L11, L12, L13, L14, L15 }, \
28 { L20, L21, L22, L23, L24, L25 }, \
29 { L30, L31, L32, L33, L34, L35 }, \
30 { R00, R01, R02, R03, R04, R05 }, \
31 { R10, R11, R12, R13, R14, R15 }, \
32 { R20, R21, R22, R23, R24, R25 }, \
33 { R30, R31, R32, R33, R34, R35 } \
34 }
8 35
9// Used to create a keymap using only KC_ prefixed keys 36// Used to create a keymap using only KC_ prefixed keys
10#define KC_KEYMAP( \ 37#define LAYOUT_kc( \
11 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ 38 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
12 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ 39 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
13 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ 40 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
@@ -20,6 +47,6 @@
20 KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ 47 KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
21 ) 48 )
22 49
23#define KC_LAYOUT_ortho_4x12 KC_KEYMAP 50#define KC_LAYOUT_ortho_4x12 LAYOUT_kc
24 51#define LAYOUT_ortho_4x12 LAYOUT
25#endif 52#define KC_KEYMAP LAYOUT_kc