]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Add Iris Rev. 3
authorDanny Nguyen <danny@keeb.io>
Tue, 9 Oct 2018 02:56:07 +0000 (22:56 -0400)
committerDrashna Jaelre <drashna@live.com>
Mon, 15 Oct 2018 17:56:46 +0000 (10:56 -0700)
keyboards/iris/iris.h
keyboards/iris/rev1/config.h
keyboards/iris/rev1_led/config.h
keyboards/iris/rev2/config.h
keyboards/iris/rev3/config.h [new file with mode: 0644]
keyboards/iris/rev3/rev3.c [new file with mode: 0644]
keyboards/iris/rev3/rev3.h [new file with mode: 0644]
keyboards/iris/rev3/rules.mk [new file with mode: 0644]

index 8d33b6b21788ca11538b3bee4078677cf0da339c..afad9a0d6db858c6ba9487729cb7bc637938d478 100644 (file)
@@ -4,8 +4,10 @@
     #include "rev1.h"
 #elif KEYBOARD_iris_rev1_led
     #include "rev1_led.h"
-#else
+#elif KEYBOARD_iris_rev2
     #include "rev2.h"
+#else
+    #include "rev3.h"
 #endif
 
 #include "quantum.h"
index fd9b2ced39a59c7ada733952cee46281c1a05fdd..cc7f2d8d44557f7d3ca8c3ac88a22cc3ecb7535c 100644 (file)
@@ -65,8 +65,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define RGB_DI_PIN D3
 #define RGBLIGHT_TIMER
 #define RGBLED_NUM 12    // Number of LEDs
-#define ws2812_PORTREG  PORTD
-#define ws2812_DDRREG   DDRD
 
 /*
  * Feature disable options
index 18d783ae7991e45b76fe9a4b43e274cd57a3452a..e9eac2455cf54fd0dc491e27dc895d6b82690b0b 100644 (file)
@@ -65,8 +65,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define RGB_DI_PIN D3
 #define RGBLIGHT_TIMER
 #define RGBLED_NUM 12    // Number of LEDs
-#define ws2812_PORTREG  PORTD
-#define ws2812_DDRREG   DDRD
 
 /*
  * Feature disable options
index 2ea31a1541bec9b44b71fa4efacd9b9f89ea9ad4..368d21c9893d27fac3fc106b4d6108cab7844c7b 100644 (file)
@@ -65,8 +65,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define RGB_DI_PIN D3
 #define RGBLIGHT_TIMER
 #define RGBLED_NUM 12    // Number of LEDs
-#define ws2812_PORTREG  PORTD
-#define ws2812_DDRREG   DDRD
 
 /*
  * Feature disable options
diff --git a/keyboards/iris/rev3/config.h b/keyboards/iris/rev3/config.h
new file mode 100644 (file)
index 0000000..7f68180
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+Copyright 2017 Danny Nguyen <danny@keeb.io>
+
+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 QMK_KEYBOARD_CONFIG_H
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID       0xCEEB
+#define PRODUCT_ID      0x1256
+#define DEVICE_VER      0x0300
+#define MANUFACTURER    Keebio
+#define PRODUCT         Iris Keyboard
+#define DESCRIPTION     Split 50 percent ergonomic keyboard
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 10
+#define MATRIX_COLS 6
+
+// wiring of each half
+#define MATRIX_ROW_PINS { D2, D3, D5, D7, D6 }
+#define MATRIX_COL_PINS { F1, F4, F5, F6, D4, B4 }
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* 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 DEBOUNCING_DELAY 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
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+#define BACKLIGHT_PIN B5
+#define BACKLIGHT_LEVELS 5
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN F7
+#define RGBLIGHT_TIMER
+#define RGBLED_NUM 12    // Number of LEDs
+
+/*
+ * 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/iris/rev3/rev3.c b/keyboards/iris/rev3/rev3.c
new file mode 100644 (file)
index 0000000..d8272db
--- /dev/null
@@ -0,0 +1,42 @@
+#include "rev3.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
+
+void matrix_init_kb(void) {
+
+    // // green led on
+    // DDRD |= (1<<5);
+    // PORTD &= ~(1<<5);
+
+    // // orange led on
+    // DDRB |= (1<<0);
+    // PORTB &= ~(1<<0);
+
+       matrix_init_user();
+};
+
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+// swap-hands action needs a matrix to define the swap
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+    /* Left hand, matrix positions */
+    {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
+    {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
+    {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
+    {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
+    {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
+    /* Right hand, matrix positions */
+    {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
+    {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
+    {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
+    {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
+    {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
+};
+#endif
+
diff --git a/keyboards/iris/rev3/rev3.h b/keyboards/iris/rev3/rev3.h
new file mode 100644 (file)
index 0000000..d44cef9
--- /dev/null
@@ -0,0 +1,35 @@
+#pragma once
+
+#include "iris.h"
+#include "quantum.h"
+
+
+#ifdef USE_I2C
+#include <stddef.h>
+#ifdef __AVR__
+    #include <avr/io.h>
+    #include <avr/interrupt.h>
+#endif
+#endif
+
+//void promicro_bootloader_jmp(bool program);
+
+#define LAYOUT( \
+    L00, L01, L02, L03, L04, L05,           R00, R01, R02, R03, R04, R05, \
+    L10, L11, L12, L13, L14, L15,           R10, R11, R12, R13, R14, R15, \
+    L20, L21, L22, L23, L24, L25,           R20, R21, R22, R23, R24, R25, \
+    L30, L31, L32, L33, L34, L35, LT4, RT4, R30, R31, R32, R33, R34, R35, \
+                        LT1, LT2, LT3, RT3, RT2, RT1 \
+    ) \
+    { \
+        { L00, L01, L02, L03, L04, L05 }, \
+        { L10, L11, L12, L13, L14, L15 }, \
+        { L20, L21, L22, L23, L24, L25 }, \
+        { L30, L31, L32, L33, L34, L35 }, \
+        { KC_NO, KC_NO, LT4, LT1, LT2, LT3 }, \
+        { R05, R04, R03, R02, R01, R00 }, \
+        { R15, R14, R13, R12, R11, R10 }, \
+        { R25, R24, R23, R22, R21, R20 }, \
+        { R35, R34, R33, R32, R31, R30 }, \
+        { KC_NO, KC_NO, RT4, RT1, RT2, RT3 } \
+    }
diff --git a/keyboards/iris/rev3/rules.mk b/keyboards/iris/rev3/rules.mk
new file mode 100644 (file)
index 0000000..d746341
--- /dev/null
@@ -0,0 +1,2 @@
+RGBLIGHT_ENABLE = yes
+BACKLIGHT_ENABLE = yes