aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author18438880 <77926265+18438880@users.noreply.github.com>2021-06-24 10:46:03 +0800
committerGitHub <noreply@github.com>2021-06-24 12:46:03 +1000
commitfc06c143b1cd937a97e3f7a4e71d655907eb6bb3 (patch)
tree5c2fa2fea6489cd482f14cf7a2b1baaf40defabc
parent344b1b439576ef1648f9ef4c8728409d902c4fb6 (diff)
downloadqmk_firmware-fc06c143b1cd937a97e3f7a4e71d655907eb6bb3.tar.gz
qmk_firmware-fc06c143b1cd937a97e3f7a4e71d655907eb6bb3.zip
Latin6rgb use IS31FL3731 IC (#11819)
* Create config.h * Add files via upload * Create keymap.c * Create keymap.c * Create rules.mk * Update readme.md * Update keyboards/latin6rgb/rules.mk Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/latin6rgb/rules.mk Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keymap.c * Update keymap.c * Update config.h * Update config.h Co-authored-by: Drashna Jaelre <drashna@live.com>
-rw-r--r--keyboards/latin6rgb/config.h106
-rw-r--r--keyboards/latin6rgb/info.json19
-rw-r--r--keyboards/latin6rgb/keymaps/default/keymap.c28
-rw-r--r--keyboards/latin6rgb/keymaps/via/keymap.c28
-rw-r--r--keyboards/latin6rgb/keymaps/via/rules.mk2
-rw-r--r--keyboards/latin6rgb/latin6rgb.c49
-rw-r--r--keyboards/latin6rgb/latin6rgb.h30
-rw-r--r--keyboards/latin6rgb/readme.md14
-rw-r--r--keyboards/latin6rgb/rules.mk29
9 files changed, 305 insertions, 0 deletions
diff --git a/keyboards/latin6rgb/config.h b/keyboards/latin6rgb/config.h
new file mode 100644
index 000000000..4052fdc99
--- /dev/null
+++ b/keyboards/latin6rgb/config.h
@@ -0,0 +1,106 @@
1/* Copyright 2021 18438880
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17
18#pragma once
19
20/* USB Device descriptor parameter */
21#include "config_common.h"
22#define VENDOR_ID 0x7C88 // "hw" = haierwangwei
23#define PRODUCT_ID 0x7C96 // "lp" = latin6RGB
24#define DEVICE_VER 0x0001
25#define MANUFACTURER 18438880
26#define PRODUCT Latin6rgb
27
28/* key matrix size */
29#define MATRIX_ROWS 2
30#define MATRIX_COLS 3
31
32/*
33 * Keyboard Matrix Assignments
34 *
35 * Change this to how you wired your keyboard
36 * COLS: AVR pins used for columns, left to right
37 * ROWS: AVR pins used for rows, top to bottom
38 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
39 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
40 *
41 */
42#define MATRIX_ROW_PINS {C7, C6 }
43#define MATRIX_COL_PINS {F7, F6, F5}
44#define UNUSED_PINS
45
46/* COL2ROW, ROW2COL*/
47#define DIODE_DIRECTION ROW2COL
48
49/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
50#define DEBOUNCE 3
51
52/* disable these deprecated features by default */
53//#ifndef LINK_TIME_OPTIMIZATION_ENABLE
54//# define NO_ACTION_MACRO
55//# define NO_ACTION_FUNCTION
56//#endif
57
58#ifdef RGB_MATRIX_ENABLE
59# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
60# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
61# define RGB_MATRIX_KEYPRESSES
62# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
63# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
64# define DISABLE_RGB_MATRIX_BAND_SAT
65# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
66# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
67# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
68# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
69# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
70# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
71# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
72# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
73# define DISABLE_RGB_MATRIX_SPLASH
74# define DISABLE_RGB_MATRIX_MULTISPLASH
75# define DISABLE_RGB_MATRIX_SOLID_SPLASH
76# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
77# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
78
79// This is a 7-bit address, that gets left-shifted and bit 0
80// set to 0 for write, 1 for read (as per I2C protocol)
81// The address will vary depending on your wiring:
82// 0b1110100 AD <-> GND
83// 0b1110111 AD <-> VCC
84// 0b1110101 AD <-> SCL
85// 0b1110110 AD <-> SDA
86#define DRIVER_ADDR_1 0b1110100
87//#define DRIVER_ADDR_2 0b1110110
88
89#define DRIVER_COUNT 1
90#define DRIVER_1_LED_TOTAL 6
91//#define DRIVER_1_LED_TOTAL 25
92//#define DRIVER_2_LED_TOTAL 24
93//#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
94#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
95#endif
96//#define RGB_DI_PIN B7
97//#ifdef RGB_DI_PIN
98//#define RGBLIGHT_ANIMATIONS
99//#define RGBLED_NUM 8
100//#define RGBLIGHT_HUE_STEP 5
101//#define RGBLIGHT_SAT_STEP 5
102//#define RGBLIGHT_VAL_STEP 5
103//#define RGBLIGHT_SLEEP
104//#endif
105
106#define B7_AUDIO
diff --git a/keyboards/latin6rgb/info.json b/keyboards/latin6rgb/info.json
new file mode 100644
index 000000000..f22149215
--- /dev/null
+++ b/keyboards/latin6rgb/info.json
@@ -0,0 +1,19 @@
1{
2 "keyboard_name": "latin6rgb",
3 "url": "",
4 "maintainer": "18438880",
5 "width": 2,
6 "height": 3,
7 "layouts": {
8 "LAYOUT_numpad_2x3": {
9 "layout": [
10 {"x":0, "y":0},
11 {"x":1, "y":0},
12 {"x":2, "y":0},
13 {"x":0, "y":1},
14 {"x":1, "y":1},
15 {"x":2, "y":1}
16 ]
17 }
18 }
19}
diff --git a/keyboards/latin6rgb/keymaps/default/keymap.c b/keyboards/latin6rgb/keymaps/default/keymap.c
new file mode 100644
index 000000000..90b96751e
--- /dev/null
+++ b/keyboards/latin6rgb/keymaps/default/keymap.c
@@ -0,0 +1,28 @@
1/* Copyright 2021 18438880
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT_numpad_2x3(
20 KC_P4, KC_P5, MO(1),
21 KC_P1, KC_P2, KC_P3),
22 [1] = LAYOUT_numpad_2x3(
23 RGB_TOG, RGB_MOD, MO(1),
24 AU_ON, AU_OFF, MI_ON),
25 [2] = LAYOUT_numpad_2x3(
26 KC_P4, KC_P5, MO(1),
27 KC_P1, KC_P2, KC_P3),
28};
diff --git a/keyboards/latin6rgb/keymaps/via/keymap.c b/keyboards/latin6rgb/keymaps/via/keymap.c
new file mode 100644
index 000000000..90b96751e
--- /dev/null
+++ b/keyboards/latin6rgb/keymaps/via/keymap.c
@@ -0,0 +1,28 @@
1/* Copyright 2021 18438880
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT_numpad_2x3(
20 KC_P4, KC_P5, MO(1),
21 KC_P1, KC_P2, KC_P3),
22 [1] = LAYOUT_numpad_2x3(
23 RGB_TOG, RGB_MOD, MO(1),
24 AU_ON, AU_OFF, MI_ON),
25 [2] = LAYOUT_numpad_2x3(
26 KC_P4, KC_P5, MO(1),
27 KC_P1, KC_P2, KC_P3),
28};
diff --git a/keyboards/latin6rgb/keymaps/via/rules.mk b/keyboards/latin6rgb/keymaps/via/rules.mk
new file mode 100644
index 000000000..36b7ba9cb
--- /dev/null
+++ b/keyboards/latin6rgb/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
1VIA_ENABLE = yes
2LTO_ENABLE = yes
diff --git a/keyboards/latin6rgb/latin6rgb.c b/keyboards/latin6rgb/latin6rgb.c
new file mode 100644
index 000000000..76b39c86b
--- /dev/null
+++ b/keyboards/latin6rgb/latin6rgb.c
@@ -0,0 +1,49 @@
1/* Copyright 2021 18438880
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "latin6rgb.h"
17
18#ifdef RGB_MATRIX_ENABLE
19
20const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
21/* Refer to IS31 manual for these locations
22 * driver
23 * | R location
24 * | | G location
25 * | | | B location
26 * | | | | */
27 {0, C1_3, C2_3, C3_3},// BL1
28 {0, C1_4, C2_4, C3_4},// BL2
29 {0, C1_5, C2_5, C3_5},// BL3
30 {0, C1_11, C2_11, C3_11},// BL4
31 {0, C1_12, C2_12, C3_12},// BL5
32 {0, C1_13, C2_13, C3_13},// BL6
33};
34
35led_config_t g_led_config = {
36 {
37 { 0, 1, 2},
38 { 3, 4, 5},
39 },
40 {
41 { 48, 32},{ 48, 48},{ 64, 48},
42 { 80, 16},{ 64, 32},{ 80, 32}
43 },
44 {
45 4, 4, 4,
46 1, 1, 4
47 }
48};
49#endif
diff --git a/keyboards/latin6rgb/latin6rgb.h b/keyboards/latin6rgb/latin6rgb.h
new file mode 100644
index 000000000..6feae9493
--- /dev/null
+++ b/keyboards/latin6rgb/latin6rgb.h
@@ -0,0 +1,30 @@
1 /* Copyright 2021 18438880
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include "quantum.h"
19
20#define XXX KC_NO
21
22#define LAYOUT_numpad_2x3( \
23 K00, K01, K02,\
24 K10, K11, K12 \
25) { \
26 { K00, K01, K02 }, \
27 { K10, K11, K12 } \
28}
29
30#define LAYOUT_pad numpad_2x3
diff --git a/keyboards/latin6rgb/readme.md b/keyboards/latin6rgb/readme.md
new file mode 100644
index 000000000..5338f1625
--- /dev/null
+++ b/keyboards/latin6rgb/readme.md
@@ -0,0 +1,14 @@
1# Latin6RGB
2
3![Latin6rgb](https://github.com/18438880/Latin6RGB/blob/main/6RGB%20(1).png)
4
5 6 Key RGB PAD use IS31FL3731 IC
6
7* Keyboard Maintainer: [18438880](https://github.com/18438880)
8* Hardware Availability: https://github.com/18438880/Latin6RGB/blob/main/6RGB%20(1).png
9
10Make example for this keyboard (after setting up your build environment):
11
12 make latin6rgb:default
13
14See 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).
diff --git a/keyboards/latin6rgb/rules.mk b/keyboards/latin6rgb/rules.mk
new file mode 100644
index 000000000..4a162d97b
--- /dev/null
+++ b/keyboards/latin6rgb/rules.mk
@@ -0,0 +1,29 @@
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 = lite # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = yes # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = no # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21
22BLUETOOTH_ENABLE = no # Enable Bluetooth
23AUDIO_ENABLE = no # Audio output
24
25NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
26RGB_MATRIX_ENABLE = yes
27RGB_MATRIX_DRIVER = IS31FL3731
28
29RGB_MATRIX_SUPPORTED = yes