diff options
author | Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> | 2019-08-31 02:52:02 +0200 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-08-30 17:52:02 -0700 |
commit | 19a85015c2b4c9b4a7196f5be73a16ceec5a4f31 (patch) | |
tree | 315825d4e4bf32886fff37be95449bd22830d8e2 /keyboards/vitamins_included/rev2 | |
parent | a2b855febbaadb5b422e1096ddbdc8b5ff48ea4a (diff) | |
download | qmk_firmware-19a85015c2b4c9b4a7196f5be73a16ceec5a4f31.tar.gz |
[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>
Diffstat (limited to 'keyboards/vitamins_included/rev2')
-rw-r--r-- | keyboards/vitamins_included/rev2/config.h | 81 | ||||
-rw-r--r-- | keyboards/vitamins_included/rev2/readme.md | 10 | ||||
-rw-r--r-- | keyboards/vitamins_included/rev2/rev2.c | 31 | ||||
-rw-r--r-- | keyboards/vitamins_included/rev2/rev2.h | 2 | ||||
-rw-r--r-- | keyboards/vitamins_included/rev2/rules.mk | 2 |
5 files changed, 126 insertions, 0 deletions
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 @@ +/* +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert +Copyright 2019 Mikkel Jeppesen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +#define SPLIT_HAND_PIN B4 +#define SOFT_SERIAL_PIN D0 + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0002 +#define DESCRIPTION A toolless split keyboard for the cheapish makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { F5, F6, C7, F7 } +#define MATRIX_COL_PINS { F1, F4, E2, B6, D7, D6} + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN F0 + +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_ANIMATIONS + +/* Audio settings */ +#ifdef AUDIO_ENABLE + #define C6_AUDIO // Define this to enable the buzzer +#endif + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#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 @@ +# Rev2 + +Revision 2 is documented [on qmk.fm](https://qmk.fm/keyboards/vitamins_included/) + +Key differences between rev1 and rev2: + +* rev2 uses qmk-dfu bootloader +* rev2 uses a USB-C connector +* rev2 6 WS2812 LEDs factory mounted to each half +* 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 @@ +#include "rev2.h" + + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} +#endif + +bool is_keyboard_left(void) { + #if defined(MASTER_LEFT) + return is_keyboard_master(); + #elif defined(MASTER_RIGHT) + return !is_keyboard_master(); + #elif defined(SPLIT_HAND_PIN) + // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand + setPinInputHigh(SPLIT_HAND_PIN); + bool x = !readPin(SPLIT_HAND_PIN); + setPinInput(SPLIT_HAND_PIN); + return x; + #elif defined(EE_HANDS) + return eeprom_read_byte(EECONFIG_HANDEDNESS); + #endif + + return is_keyboard_master(); +} + +void matrix_init_kb(void) { + matrix_init_user(); +}; 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 @@ +#pragma once +#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 @@ +SPLIT_KEYBOARD = yes # Rev2 uses split_common +BOOTLOADER = qmk-dfu |