summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny <nooges@users.noreply.github.com>2022-04-05 17:14:07 -0400
committerGitHub <noreply@github.com>2022-04-05 17:14:07 -0400
commit563c4dbb09fcb3ff76bd453d8780f398e57c2ada (patch)
tree45a3218ca97428ed7ec90a3c4dc78fc2b6e3cfa3
parent67bb6e19458e49008ee11fbce3a26e1967edffe4 (diff)
Add Iris Rev 6.1 (#16722)
-rw-r--r--keyboards/keebio/iris/iris.h2
-rw-r--r--keyboards/keebio/iris/rev6a/config.h134
-rw-r--r--keyboards/keebio/iris/rev6a/rev6a.c141
-rw-r--r--keyboards/keebio/iris/rev6a/rev6a.h42
-rw-r--r--keyboards/keebio/iris/rev6a/rules.mk24
5 files changed, 343 insertions, 0 deletions
diff --git a/keyboards/keebio/iris/iris.h b/keyboards/keebio/iris/iris.h
index db0440a126..e17b3b69c6 100644
--- a/keyboards/keebio/iris/iris.h
+++ b/keyboards/keebio/iris/iris.h
@@ -14,6 +14,8 @@
14 #include "rev5.h" 14 #include "rev5.h"
15#elif defined(KEYBOARD_keebio_iris_rev6) 15#elif defined(KEYBOARD_keebio_iris_rev6)
16 #include "rev6.h" 16 #include "rev6.h"
17#elif defined(KEYBOARD_keebio_iris_rev6a)
18 #include "rev6a.h"
17#endif 19#endif
18 20
19#include "quantum.h" 21#include "quantum.h"
diff --git a/keyboards/keebio/iris/rev6a/config.h b/keyboards/keebio/iris/rev6a/config.h
new file mode 100644
index 0000000000..06c1f38e11
--- /dev/null
+++ b/keyboards/keebio/iris/rev6a/config.h
@@ -0,0 +1,134 @@
1/*
2Copyright 2021 Danny Nguyen <danny@keeb.io>
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
20/* USB Device descriptor parameter */
21#define VENDOR_ID 0xCB10
22#define PRODUCT_ID 0x6356
23#define DEVICE_VER 0x0610
24#define MANUFACTURER Keebio
25#define PRODUCT Iris Rev. 6.1
26
27/* key matrix size */
28// Rows are doubled-up
29#define MATRIX_ROWS 10
30#define MATRIX_COLS 6
31
32// wiring of each half
33#define MATRIX_ROW_PINS { B1, F0, F5, B4, D7 }
34#define MATRIX_COL_PINS { F1, F4, B5, C7, D4, D6 }
35#define MATRIX_ROW_PINS_RIGHT { B1, F0, F5, B4, B5 }
36#define MATRIX_COL_PINS_RIGHT { D4, D6, D7, C7, F1, F4 }
37#define SPLIT_HAND_PIN D5
38
39#define ENCODERS_PAD_A { B3 }
40#define ENCODERS_PAD_B { B2 }
41#define ENCODERS_PAD_A_RIGHT { B3 }
42#define ENCODERS_PAD_B_RIGHT { B2 }
43
44/* COL2ROW or ROW2COL */
45#define DIODE_DIRECTION COL2ROW
46
47/* define if matrix has ghost */
48//#define MATRIX_HAS_GHOST
49
50/* number of backlight levels */
51// #define BACKLIGHT_LEVELS 3
52
53/* Set 0 if debouncing isn't needed */
54#define DEBOUNCE 5
55
56/* serial.c configuration for split keyboard */
57#define SOFT_SERIAL_PIN D0
58
59/* ws2812 RGB LED */
60#define RGB_DI_PIN E6
61#ifdef RGB_DI_PIN
62# define RGBLED_NUM 68
63# define RGBLED_SPLIT { 34, 34 }
64# define RGBLIGHT_HUE_STEP 8
65# define RGBLIGHT_SAT_STEP 8
66# define RGBLIGHT_VAL_STEP 8
67# define RGBLIGHT_LIMIT_VAL 120 /* The maximum brightness level */
68# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
69/*== enabled animations ==*/
70# define RGBLIGHT_EFFECT_BREATHING
71# define RGBLIGHT_EFFECT_RAINBOW_MOOD
72# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
73# define RGBLIGHT_EFFECT_SNAKE
74# define RGBLIGHT_EFFECT_KNIGHT
75# define RGBLIGHT_EFFECT_CHRISTMAS
76# define RGBLIGHT_EFFECT_STATIC_GRADIENT
77# define RGBLIGHT_EFFECT_RGB_TEST
78# define RGBLIGHT_EFFECT_ALTERNATING
79# define RGBLIGHT_EFFECT_TWINKLE
80# define RGBLIGHT_DEFAULT_VAL 120
81# define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_MODE_RAINBOW_SWIRL + 2)
82// RGB Matrix
83//# ifdef RGB_MATRIX_ENABLE
84# define ENABLE_RGB_MATRIX_ALPHAS_MODS
85# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
86# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
87# define ENABLE_RGB_MATRIX_BREATHING
88# define ENABLE_RGB_MATRIX_BAND_SAT
89# define ENABLE_RGB_MATRIX_BAND_VAL
90# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
91# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
92# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
93# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
94# define ENABLE_RGB_MATRIX_CYCLE_ALL
95# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
96# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
97# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
98# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
99# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
100# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
101# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
102# define ENABLE_RGB_MATRIX_DUAL_BEACON
103# define ENABLE_RGB_MATRIX_RAINBOW_BEACON
104# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
105// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
106# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
107# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
108// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
109# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
110# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
111# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
112# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
113# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
114# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
115# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
116# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
117# define ENABLE_RGB_MATRIX_SPLASH
118# define ENABLE_RGB_MATRIX_MULTISPLASH
119# define ENABLE_RGB_MATRIX_SOLID_SPLASH
120# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
121# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 160
122# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
123# define DRIVER_LED_TOTAL RGBLED_NUM
124# define RGB_MATRIX_SPLIT { 34, 34 }
125# define RGB_DISABLE_WHEN_USB_SUSPENDED
126# define RGB_MATRIX_KEYPRESSES
127//# endif
128#endif
129
130#define VIA_QMK_RGBLIGHT_ENABLE
131
132// Enable the workaround for the speed parameter mismatch between RGBLIGHT and
133// RGB Matrix, so that the speed slider in VIA behaves in a more useful way.
134#define VIA_CUSTOM_LIGHTING_ENABLE
diff --git a/keyboards/keebio/iris/rev6a/rev6a.c b/keyboards/keebio/iris/rev6a/rev6a.c
new file mode 100644
index 0000000000..cc9c3f6b8f
--- /dev/null
+++ b/keyboards/keebio/iris/rev6a/rev6a.c
@@ -0,0 +1,141 @@
1/*
2Copyright 2021 Danny Nguyen <danny@keeb.io>
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7This program is distributed in the hope that it will be useful,
8but WITHOUT ANY WARRANTY; without even the implied warranty of
9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10GNU General Public License for more details.
11You should have received a copy of the GNU General Public License
12along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/
14#include "rev6a.h"
15
16#ifdef RGB_MATRIX_ENABLE
17led_config_t g_led_config = { {
18 // Key Matrix to LED Index
19 // Left Half
20 { 0, 1, 2, 3, 4, 5 },
21 { 11, 10, 9, 8, 7, 6 },
22 { 12, 13, 14, 15, 16, 17 },
23 { 23, 22, 21, 20, 19, 18 },
24 { NO_LED, NO_LED, 24, 25, 26, 27 },
25 // Right Half
26 { 34, 35, 36, 37, 38, 39 },
27 { 45, 44, 43, 42, 41, 40 },
28 { 46, 47, 48, 49, 50, 51 },
29 { 57, 56, 55, 54, 53, 52 },
30 { NO_LED, NO_LED, 58, 59, 60, 61 }
31}, {
32 // LED Index to Physical Position
33 // Left Half
34 { 0, 5 }, { 16, 5 }, { 32, 2 }, { 48, 0 }, { 64, 2 }, { 80, 3 },
35 { 80, 17 }, { 64, 15 }, { 48, 13 }, { 32, 15 }, { 16, 18 }, { 0, 18 },
36 { 0, 32 }, { 16, 32 }, { 32, 28 }, { 48, 27 }, { 64, 28 }, { 80, 30 },
37 { 80, 43 }, { 64, 42 }, { 48, 40 }, { 32, 42 }, { 16, 45 }, { 0, 45 },
38 { 56, 47 }, { 72, 58 }, { 90, 64 }, { 98, 52 },
39 { 80, 58 }, { 40, 50 }, { 8, 43 }, { 8, 5 }, { 40, 1 }, { 72, 3 },
40 // Right Half
41 { 224, 5 }, { 208, 5 }, { 192, 2 }, { 176, 0 }, { 160, 2 }, { 144, 3 },
42 { 144, 18 }, { 160, 18 }, { 176, 15 }, { 192, 13 }, { 208, 15 }, { 244, 17 },
43 { 224, 32 }, { 208, 32 }, { 192, 28 }, { 176, 27 }, { 160, 28 }, { 144, 30 },
44 { 144, 45 }, { 160, 45 }, { 176, 42 }, { 192, 40 }, { 208, 42 }, { 244, 43 },
45 { 168, 47 }, { 152, 58 }, { 134, 64 }, { 126, 52 },
46 { 144, 58 }, { 184, 50 }, { 216, 43 }, { 216, 5 }, { 184, 1 }, { 152, 3 }
47}, {
48 // LED Index to Flag
49 // Left Half
50 4, 4, 4, 4, 4, 4,
51 4, 4, 4, 4, 4, 4,
52 4, 4, 4, 4, 4, 4,
53 4, 4, 4, 4, 4, 4,
54 4, 4, 4, 4,
55 2, 2, 2, 2, 2, 2,
56 // Right Half
57 4, 4, 4, 4, 4, 4,
58 4, 4, 4, 4, 4, 4,
59 4, 4, 4, 4, 4, 4,
60 4, 4, 4, 4, 4, 4,
61 4, 4, 4, 4,
62 2, 2, 2, 2, 2, 2
63
64} };
65
66
67# if defined(VIA_ENABLE) && defined(VIA_CUSTOM_LIGHTING_ENABLE)
68
69// VIA supports only 4 discrete values for effect speed; map these to some
70// useful speed values for RGB Matrix.
71enum speed_values {
72 RGBLIGHT_SPEED_0 = UINT8_MAX / 16, // not 0 to avoid really slow effects
73 RGBLIGHT_SPEED_1 = UINT8_MAX / 4,
74 RGBLIGHT_SPEED_2 = UINT8_MAX / 2, // matches the default value
75 RGBLIGHT_SPEED_3 = UINT8_MAX / 4 * 3, // UINT8_MAX is really fast
76};
77
78static uint8_t speed_from_rgblight(uint8_t rgblight_speed) {
79 switch (rgblight_speed) {
80 case 0:
81 return RGBLIGHT_SPEED_0;
82 case 1:
83 return RGBLIGHT_SPEED_1;
84 case 2:
85 default:
86 return RGBLIGHT_SPEED_2;
87 case 3:
88 return RGBLIGHT_SPEED_3;
89 }
90}
91
92static uint8_t speed_to_rgblight(uint8_t rgb_matrix_speed) {
93 if (rgb_matrix_speed < ((RGBLIGHT_SPEED_0 + RGBLIGHT_SPEED_1) / 2)) {
94 return 0;
95 } else if (rgb_matrix_speed < ((RGBLIGHT_SPEED_1 + RGBLIGHT_SPEED_2) / 2)) {
96 return 1;
97 } else if (rgb_matrix_speed < ((RGBLIGHT_SPEED_2 + RGBLIGHT_SPEED_3) / 2)) {
98 return 2;
99 } else {
100 return 3;
101 }
102}
103
104void raw_hid_receive_kb(uint8_t *data, uint8_t length) {
105 switch (data[0]) {
106 case id_lighting_get_value:
107 if (data[1] == id_qmk_rgblight_effect_speed) {
108 data[2] = speed_to_rgblight(rgb_matrix_get_speed());
109 }
110 break;
111 case id_lighting_set_value:
112 if (data[1] == id_qmk_rgblight_effect_speed) {
113 rgb_matrix_set_speed_noeeprom(speed_from_rgblight(data[2]));
114 }
115 break;
116 }
117}
118
119# endif // defined(VIA_ENABLE) && defined(VIA_CUSTOM_LIGHTING_ENABLE)
120
121#endif
122
123#ifdef ENCODER_ENABLE
124bool encoder_update_kb(uint8_t index, bool clockwise) {
125 if (!encoder_update_user(index, clockwise)) { return false; }
126 if (index == 0) {
127 if (clockwise) {
128 tap_code(KC_VOLU);
129 } else {
130 tap_code(KC_VOLD);
131 }
132 } else if (index == 1) {
133 if (clockwise) {
134 tap_code(KC_PGDN);
135 } else {
136 tap_code(KC_PGUP);
137 }
138 }
139 return false;
140}
141#endif
diff --git a/keyboards/keebio/iris/rev6a/rev6a.h b/keyboards/keebio/iris/rev6a/rev6a.h
new file mode 100644
index 0000000000..d13e24410e
--- /dev/null
+++ b/keyboards/keebio/iris/rev6a/rev6a.h
@@ -0,0 +1,42 @@
1/*
2Copyright 2021 Danny Nguyen <danny@keeb.io>
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
20#include "iris.h"
21#include "quantum.h"
22
23
24#define LAYOUT( \
25 LA1, LA2, LA3, LA4, LA5, LA6, RA6, RA5, RA4, RA3, RA2, RA1, \
26 LB1, LB2, LB3, LB4, LB5, LB6, RB6, RB5, RB4, RB3, RB2, RB1, \
27 LC1, LC2, LC3, LC4, LC5, LC6, RC6, RC5, RC4, RC3, RC2, RC1, \
28 LD1, LD2, LD3, LD4, LD5, LD6, LE6, RE6, RD6, RD5, RD4, RD3, RD2, RD1, \
29 LE3, LE4, LE5, RE5, RE4, RE3 \
30 ) \
31 { \
32 { LA1, LA2, LA3, LA4, LA5, LA6 }, \
33 { LB1, LB2, LB3, LB4, LB5, LB6 }, \
34 { LC1, LC2, LC3, LC4, LC5, LC6 }, \
35 { LD1, LD2, LD3, LD4, LD5, LD6 }, \
36 { KC_NO, KC_NO, LE3, LE4, LE5, LE6 }, \
37 { RA1, RA2, RA3, RA4, RA5, RA6 }, \
38 { RB1, RB2, RB3, RB4, RB5, RB6 }, \
39 { RC1, RC2, RC3, RC4, RC5, RC6 }, \
40 { RD1, RD2, RD3, RD4, RD5, RD6 }, \
41 { KC_NO, KC_NO, RE3, RE4, RE5, RE6 } \
42 }
diff --git a/keyboards/keebio/iris/rev6a/rules.mk b/keyboards/keebio/iris/rev6a/rules.mk
new file mode 100644
index 0000000000..87f19b5fc1
--- /dev/null
+++ b/keyboards/keebio/iris/rev6a/rules.mk
@@ -0,0 +1,24 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = no # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = yes # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15NKRO_ENABLE = no # Enable N-Key Rollover
16BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
17RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
18AUDIO_ENABLE = no # Audio output
19SPLIT_KEYBOARD = yes
20ENCODER_ENABLE = yes
21RGB_MATRIX_ENABLE = yes
22RGB_MATRIX_DRIVER = WS2812
23
24LTO_ENABLE = yes