[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>
This commit is contained in:
committed by
Drashna Jaelre
parent
a2b855febb
commit
19a85015c2
81
keyboards/vitamins_included/rev2/config.h
Normal file
81
keyboards/vitamins_included/rev2/config.h
Normal file
@@ -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
|
10
keyboards/vitamins_included/rev2/readme.md
Normal file
10
keyboards/vitamins_included/rev2/readme.md
Normal file
@@ -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
|
31
keyboards/vitamins_included/rev2/rev2.c
Normal file
31
keyboards/vitamins_included/rev2/rev2.c
Normal file
@@ -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();
|
||||
};
|
2
keyboards/vitamins_included/rev2/rev2.h
Normal file
2
keyboards/vitamins_included/rev2/rev2.h
Normal file
@@ -0,0 +1,2 @@
|
||||
#pragma once
|
||||
#include QMK_KEYBOARD_H
|
2
keyboards/vitamins_included/rev2/rules.mk
Normal file
2
keyboards/vitamins_included/rev2/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
SPLIT_KEYBOARD = yes # Rev2 uses split_common
|
||||
BOOTLOADER = qmk-dfu
|
Reference in New Issue
Block a user