Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keyboard] Add keyboard reviung5 #13375

Merged
merged 42 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
e86eb6f
[Keyboard] Add keyboard Reviung41
gtips Jan 6, 2020
c1aa3ea
Modified files
gtips Jan 7, 2020
1569a85
deleted keyboards/reviung41/keymaps/default/config.h
gtips Jan 7, 2020
922eb75
modified keyboards/rebiung41/keymaps/default/keymap.c
gtips Jan 7, 2020
42edbee
modified keyboards/reviung41/readme.md
gtips Jan 7, 2020
086c9d3
modified keyboards/reviung41/readme.md
gtips Jan 7, 2020
8bc5f3b
modified keyboards/reviung41/readme.md
gtips Jan 7, 2020
35a051d
Merge remote-tracking branch 'root_branch/master'
gtips Jan 29, 2020
3651ba9
Merge remote-tracking branch 'root_branch/master'
gtips Feb 18, 2020
57fffc8
Update readme.md
gtips Feb 18, 2020
55c809a
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Jun 22, 2020
ad9def5
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Jul 16, 2020
6d9e900
[Keyboard] Add reviung61
gtips Jul 16, 2020
8dc0dd7
Update readme.md
gtips Jul 16, 2020
2aaf733
fix keyboards/reviung61/ and add keymap default_rgb
gtips Jul 17, 2020
1de30bb
fix keyboards/reviung61/info.json
gtips Jul 18, 2020
124f81d
fix keyboards/reviung61/info.json
gtips Jul 18, 2020
7fc3483
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Jul 18, 2020
ada46a2
remove keyboards/reviung61/keymaps/default/config.h
gtips Jul 21, 2020
e26c6f3
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Jul 21, 2020
e23e34e
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Jul 27, 2020
5f2c4d3
[keyboard] Fixed readme.md for reviung39 and 61.
gtips Jul 27, 2020
ab2bef6
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Jul 29, 2020
2c518fa
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Aug 5, 2020
71832f6
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Aug 11, 2020
2ce78ec
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Aug 21, 2020
04d4101
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Aug 25, 2020
119bb12
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Sep 17, 2020
7942ff4
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Sep 29, 2020
d3f4ca0
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Nov 11, 2020
ae183fc
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Jan 14, 2021
3ea29aa
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Mar 9, 2021
37a0615
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Mar 15, 2021
861dd54
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Apr 19, 2021
b3a8654
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Apr 22, 2021
7152f91
Merge branch 'master' of https://github.com/gtips/qmk_firmware
gtips Apr 22, 2021
57cceda
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Jun 15, 2021
e533a56
Merge branch 'master' of https://github.com/qmk/qmk_firmware
gtips Jun 29, 2021
146fb3d
add keyboards/reviung5/
gtips Jun 29, 2021
b8c2b3d
update keyboards/reviung5/keymaps/default_lre/keymap.c
gtips Jun 29, 2021
5a1d19f
fix keyboards/reviung5/config.h
gtips Jul 2, 2021
84b4627
fix keyboards/reviung5/keymaps/default_rre/keymap.c
gtips Jul 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions keyboards/reviung5/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/*
Copyright 2021 gtips
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"

/* USB Device descriptor parameter */
#define VENDOR_ID 0x5C06
#define PRODUCT_ID 0x4F0D
#define DEVICE_VER 0x0001
#define MANUFACTURER gtips
#define PRODUCT reviung5

/* key matrix size */
#define MATRIX_ROWS 1
#define MATRIX_COLS 5

/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define MATRIX_ROW_PINS { F4 }
drashna marked this conversation as resolved.
Show resolved Hide resolved
#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 }
#define UNUSED_PINS

/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW

/* Encoder */
#define ENCODERS_PAD_A { D0 }
#define ENCODERS_PAD_B { D1 }


#define RGB_DI_PIN D3
#ifdef RGB_DI_PIN
# define RGBLED_NUM 4
# define RGBLIGHT_HUE_STEP 16
# define RGBLIGHT_SAT_STEP 16
# define RGBLIGHT_VAL_STEP 16
# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
/*== all animations enable ==*/
# define RGBLIGHT_ANIMATIONS
/*== or choose animations ==*/
//# define RGBLIGHT_EFFECT_BREATHING
//# define RGBLIGHT_EFFECT_RAINBOW_MOOD
//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
//# define RGBLIGHT_EFFECT_SNAKE
//# define RGBLIGHT_EFFECT_KNIGHT
//# define RGBLIGHT_EFFECT_CHRISTMAS
//# define RGBLIGHT_EFFECT_STATIC_GRADIENT
//# define RGBLIGHT_EFFECT_RGB_TEST
//# define RGBLIGHT_EFFECT_ALTERNATING
/*== customize breathing effect ==*/
/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
/*==== use exp() and sin() ====*/
//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
#endif

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST

/* 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

/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is useful for the Windows task manager shortcut (ctrl+shift+esc).
*/
//#define GRAVE_ESC_CTRL_OVERRIDE

/*
* Force NKRO
*
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
* makefile for this to work.)
*
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
* until the next keyboard reset.
*
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
* fully operational during normal computer usage.
*
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
* power-up.
*
*/
//#define FORCE_NKRO

/*
* 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

/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION

/* Bootmagic Lite key configuration */
//#define BOOTMAGIC_LITE_ROW 0
//#define BOOTMAGIC_LITE_COLUMN 0
18 changes: 18 additions & 0 deletions keyboards/reviung5/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"keyboard_name": "reviung5",
"url": "",
"maintainer": "gtips",
"width": 5,
"height": 1,
"layouts": {
"LAYOUT_reviung5": {
"layout": [
{"label": "k00", "x": 0, "y": 0},
{"label": "k01", "x": 1, "y": 0.25},
{"label": "k02", "x": 2, "y": 0.25},
{"label": "k03", "x": 3, "y": 0.25},
{"label": "k04", "x": 4, "y": 0}
]
}
}
}
34 changes: 34 additions & 0 deletions keyboards/reviung5/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* Copyright 2021 gtips
*
* 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 QMK_KEYBOARD_H

// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_LOWER,
};

#define LO_VD LT(_LOWER, KC_VOLD)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_BASE] = LAYOUT_reviung5(
LO_VD, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU
),
[_LOWER] = LAYOUT_reviung5(
_______, RGB_HUI, RGB_MOD, RGB_TOG, KC_MUTE
)
};
1 change: 1 addition & 0 deletions keyboards/reviung5/keymaps/default/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# The default keymap for reviung5
75 changes: 75 additions & 0 deletions keyboards/reviung5/keymaps/default_lre/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* Copyright 2021 gtips
*
* 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 QMK_KEYBOARD_H

// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_LOWER,
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_BASE] = LAYOUT_reviung5(
TG(_LOWER), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE
),
[_LOWER] = LAYOUT_reviung5(
_______, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), RGB_TOG
)
};

bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (IS_LAYER_ON(_LOWER)) {
tap_code16((clockwise == true) ? KC_WH_D : KC_WH_U);
} else {
tap_code((clockwise == true) ? KC_VOLD : KC_VOLU);
}
}
return true;
}

layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case _LOWER:
rgblight_setrgb (RGB_GOLD);
break;
default: // for any other layers, or the default layer
rgblight_setrgb (RGB_TEAL);
break;
}
return state;
/* Colors
RGB_WHITE
RGB_RED
RGB_CORAL
RGB_ORANGE
RGB_GOLDENROD
RGB_GOLD
RGB_YELLOW
RGB_CHARTREUSE
RGB_GREEN
RGB_SPRINGGREEN
RGB_TURQUOISE
RGB_TEAL
RGB_CYAN
RGB_AZURE
RGB_BLUE
RGB_PURPLE
RGB_MAGENTA
RGB_PINK
*/
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
}
3 changes: 3 additions & 0 deletions keyboards/reviung5/keymaps/default_lre/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The default keymap for reviung5

## Use the Left Rotary Encoder
75 changes: 75 additions & 0 deletions keyboards/reviung5/keymaps/default_rre/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* Copyright 2021 gtips
*
* 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 QMK_KEYBOARD_H

// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_LOWER,
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_BASE] = LAYOUT_reviung5(
KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, TG(_LOWER)
),
[_LOWER] = LAYOUT_reviung5(
RGB_TOG, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______
)
};

bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
if (IS_LAYER_ON(_LOWER)) {
tap_code16((clockwise == true) ? KC_WH_D : KC_WH_U);
} else {
tap_code((clockwise == true) ? KC_VOLD : KC_VOLU);
}
}
return true;
}

layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case _LOWER:
rgblight_setrgb (RGB_RED);
break;
default: // for any other layers, or the default layer
rgblight_setrgb (RGB_TEAL);
break;
}
return state;
/* Colors
RGB_WHITE
RGB_RED
RGB_CORAL
RGB_ORANGE
RGB_GOLDENROD
RGB_GOLD
RGB_YELLOW
RGB_CHARTREUSE
RGB_GREEN
RGB_SPRINGGREEN
RGB_TURQUOISE
RGB_TEAL
RGB_CYAN
RGB_AZURE
RGB_BLUE
RGB_PURPLE
RGB_MAGENTA
RGB_PINK
*/
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
}
4 changes: 4 additions & 0 deletions keyboards/reviung5/keymaps/default_rre/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The default keymap for reviung5

## Use the Right Rotary Encoder

19 changes: 19 additions & 0 deletions keyboards/reviung5/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# reviung5

![reviung5](https://github.com/gtips/reviung/blob/master/reviung5/image/reviung5-1.jpg)

The REVIUNG5 is 5-key (or 4-key + Rotary Encoder) macropad.

* Keyboard Maintainer: [gtips](https://github.com/gtips)
* Hardware Supported: REVIUNG5 PCB.
* Hardware Availability: [PCB & Case Data](https://github.com/gtips/reviung/tree/master/reviung5)

Make example for this keyboard (after setting up your build environment):

make reviung5:default

Flashing example for this keyboard:

make reviung5:default:flash

See 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).
17 changes: 17 additions & 0 deletions keyboards/reviung5/reviung5.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* Copyright 2021 gtips
*
* 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 "reviung5.h"
Loading