aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author18438880 <77926265+18438880@users.noreply.github.com>2021-02-05 13:06:50 +0800
committerGitHub <noreply@github.com>2021-02-04 21:06:50 -0800
commit58f8c7f9c3aa5cfe9ed12c82f1a6ee14f5cc6123 (patch)
treefe5729c6a424810188285122cc95a7512332f6e6
parent1d49076b81379e030a27b2ff96ed2db4b583e003 (diff)
downloadqmk_firmware-58f8c7f9c3aa5cfe9ed12c82f1a6ee14f5cc6123.tar.gz
qmk_firmware-58f8c7f9c3aa5cfe9ed12c82f1a6ee14f5cc6123.zip
[Keyboard] add latin17rgb (#11680)
* Create readme.md * Add files via upload * Create keymap.c * Create keymap.c * Create rules.mk * Update config.h * Update rules.mk * Update keyboards/latin17rgb/keymaps/default/keymap.c * Update keyboards/latin17rgb/keymaps/via/keymap.c * Update keyboards/latin17rgb/latin17rgb.h * Update keyboards/latin17rgb/keymaps/default/keymap.c * Update keyboards/latin17rgb/keymaps/via/keymap.c * Update keyboards/latin17rgb/rules.mk * Update keyboards/latin17rgb/info.json * Delete latin17RGB.json * Update info.json * Update keymap.c * Update keymap.c * Update info.json * Update latin17rgb.h * Update latin17rgb.h * Update keymap.c * Update keymap.c * Update latin17rgb.h * Update keyboards/latin17rgb/readme.md * Update keyboards/latin17rgb/readme.md * Update keyboards/latin17rgb/rules.mk * Update keyboards/latin17rgb/rules.mk * Update keyboards/latin17rgb/info.json * Update keyboards/latin17rgb/rules.mk * Update keyboards/latin17rgb/latin17rgb.h * Update keyboards/latin17rgb/rules.mk * Update keyboards/latin17rgb/readme.md * Update keyboards/latin17rgb/keymaps/default/keymap.c * Update keyboards/latin17rgb/keymaps/via/keymap.c * Update latin17rgb.c * Update latin17rgb.c * Update keyboards/latin17rgb/latin17rgb.c
-rw-r--r--keyboards/latin17rgb/config.h104
-rw-r--r--keyboards/latin17rgb/info.json34
-rw-r--r--keyboards/latin17rgb/keymaps/default/keymap.c34
-rw-r--r--keyboards/latin17rgb/keymaps/via/keymap.c48
-rw-r--r--keyboards/latin17rgb/keymaps/via/rules.mk2
-rw-r--r--keyboards/latin17rgb/latin17rgb.c70
-rw-r--r--keyboards/latin17rgb/latin17rgb.h36
-rw-r--r--keyboards/latin17rgb/readme.md20
-rw-r--r--keyboards/latin17rgb/rules.mk27
9 files changed, 375 insertions, 0 deletions
diff --git a/keyboards/latin17rgb/config.h b/keyboards/latin17rgb/config.h
new file mode 100644
index 000000000..013899f60
--- /dev/null
+++ b/keyboards/latin17rgb/config.h
@@ -0,0 +1,104 @@
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#pragma once
18
19/* USB Device descriptor parameter */
20#include "config_common.h"
21#define VENDOR_ID 0x7C88 // "hw" = haierwangwei2005
22#define PRODUCT_ID 0x7C97 // "lp" = latin17RGB
23#define DEVICE_VER 0x0001
24#define MANUFACTURER 18438880
25#define PRODUCT Latin17RGB
26
27/* key matrix size */
28#define MATRIX_ROWS 5
29#define MATRIX_COLS 4
30
31/*
32 * Keyboard Matrix Assignments
33 *
34 * Change this to how you wired your keyboard
35 * COLS: AVR pins used for columns, left to right
36 * ROWS: AVR pins used for rows, top to bottom
37 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
38 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
39 *
40 */
41#define MATRIX_ROW_PINS {C7, C6, B6, B5, B4 }
42#define MATRIX_COL_PINS {F7, F6, F5, F4}
43#define UNUSED_PINS
44
45/* COL2ROW, ROW2COL*/
46#define DIODE_DIRECTION ROW2COL
47
48/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
49#define DEBOUNCE 3
50
51/* disable these deprecated features by default */
52//#ifndef LINK_TIME_OPTIMIZATION_ENABLE
53//# define NO_ACTION_MACRO
54//# define NO_ACTION_FUNCTION
55//#endif
56
57#ifdef RGB_MATRIX_ENABLE
58# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
59# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
60# define RGB_MATRIX_KEYPRESSES
61# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
62# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
63# define DISABLE_RGB_MATRIX_BAND_SAT
64# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
65# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
66# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
67# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
68# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
69# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
70# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
71# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
72# define DISABLE_RGB_MATRIX_SPLASH
73# define DISABLE_RGB_MATRIX_MULTISPLASH
74# define DISABLE_RGB_MATRIX_SOLID_SPLASH
75# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
76# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
77
78// This is a 7-bit address, that gets left-shifted and bit 0
79// set to 0 for write, 1 for read (as per I2C protocol)
80// The address will vary depending on your wiring:
81// 0b1110100 AD <-> GND
82// 0b1110111 AD <-> VCC
83// 0b1110101 AD <-> SCL
84// 0b1110110 AD <-> SDA
85#define DRIVER_ADDR_1 0b1110100
86#define DRIVER_ADDR_2 0b1110110
87
88#define DRIVER_COUNT 2
89#define DRIVER_1_LED_TOTAL 25
90#define DRIVER_2_LED_TOTAL 24
91#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
92
93#endif
94#define RGB_DI_PIN B7
95#ifdef RGB_DI_PIN
96#define RGBLIGHT_ANIMATIONS
97#define RGBLED_NUM 8
98#define RGBLIGHT_HUE_STEP 5
99#define RGBLIGHT_SAT_STEP 5
100#define RGBLIGHT_VAL_STEP 5
101#define RGBLIGHT_SLEEP
102#endif
103
104
diff --git a/keyboards/latin17rgb/info.json b/keyboards/latin17rgb/info.json
new file mode 100644
index 000000000..d236aea8c
--- /dev/null
+++ b/keyboards/latin17rgb/info.json
@@ -0,0 +1,34 @@
1{
2 "keyboard_name": "latin17rgb",
3 "url": "",
4 "maintainer": "18438880",
5 "width": 5,
6 "height": 4,
7 "layouts": {
8 "LAYOUT_numpad_5x4": {
9 "layout": [
10 {"x":0, "y":0},
11 {"x":1, "y":0},
12 {"x":2, "y":0},
13 {"x":3, "y":0},
14
15 {"x":0, "y":1},
16 {"x":1, "y":1},
17 {"x":2, "y":1},
18
19 {"x":0, "y":2},
20 {"x":1, "y":2},
21 {"x":2, "y":2},
22 {"x":3, "y":1, "h":2},
23
24 {"x":0, "y":3},
25 {"x":1, "y":3},
26 {"x":2, "y":3},
27
28 {"x":0, "y":4, "w":2},
29 {"x":2, "y":4},
30 {"x":3, "y":3, "h":2}
31 ]
32 }
33 }
34}
diff --git a/keyboards/latin17rgb/keymaps/default/keymap.c b/keyboards/latin17rgb/keymaps/default/keymap.c
new file mode 100644
index 000000000..58e01b1a2
--- /dev/null
+++ b/keyboards/latin17rgb/keymaps/default/keymap.c
@@ -0,0 +1,34 @@
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
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_numpad_5x4(
21 KC_NLCK, KC_PSLS, KC_PAST, MO(1),
22 KC_P7, KC_P8, KC_P9,
23 KC_P4, KC_P5, KC_P6, KC_PPLS,
24 KC_P1, KC_P2, KC_P3,
25 KC_P0, KC_PDOT, KC_PENT
26 ),
27 [1] = LAYOUT_numpad_5x4(
28 RGB_TOG, RGB_MOD, KC_PMNS, _______,
29 _______, _______, _______,
30 _______, _______, _______, KC_PGDN,
31 _______, _______, _______,
32 _______, _______, _______
33 ),
34};
diff --git a/keyboards/latin17rgb/keymaps/via/keymap.c b/keyboards/latin17rgb/keymaps/via/keymap.c
new file mode 100644
index 000000000..a73da5eb8
--- /dev/null
+++ b/keyboards/latin17rgb/keymaps/via/keymap.c
@@ -0,0 +1,48 @@
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
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_numpad_5x4(
21 KC_NLCK, KC_PSLS, KC_PAST, MO(1),
22 KC_P7, KC_P8, KC_P9,
23 KC_P4, KC_P5, KC_P6, KC_PPLS,
24 KC_P1, KC_P2, KC_P3,
25 KC_P0, KC_PDOT, KC_PENT
26 ),
27 [1] = LAYOUT_numpad_5x4(
28 RGB_TOG, RGB_MOD, KC_PMNS, _______,
29 _______, _______, _______,
30 _______, _______, _______, KC_PGDN,
31 _______, _______, _______,
32 _______, _______, _______
33 ),
34 [2] = LAYOUT_numpad_5x4(
35 _______, _______, _______, _______,
36 _______, _______, _______,
37 _______, _______, _______, _______,
38 _______, _______, _______,
39 _______, _______, _______
40 ),
41 [3] = LAYOUT_numpad_5x4(
42 _______, _______, _______, _______,
43 _______, _______, _______,
44 _______, _______, _______, _______,
45 _______, _______, _______,
46 _______, _______, _______
47 ),
48};
diff --git a/keyboards/latin17rgb/keymaps/via/rules.mk b/keyboards/latin17rgb/keymaps/via/rules.mk
new file mode 100644
index 000000000..36b7ba9cb
--- /dev/null
+++ b/keyboards/latin17rgb/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
1VIA_ENABLE = yes
2LTO_ENABLE = yes
diff --git a/keyboards/latin17rgb/latin17rgb.c b/keyboards/latin17rgb/latin17rgb.c
new file mode 100644
index 000000000..8d9eaae8a
--- /dev/null
+++ b/keyboards/latin17rgb/latin17rgb.c
@@ -0,0 +1,70 @@
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 "latin17rgb.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 {0, C1_6, C2_6, C3_6},// BL7
34 {0, C1_7, C2_7, C3_7},//BL8
35 {0, C1_8, C2_8, C3_8},// BL9
36 {0, C1_14, C2_14, C3_14},// BL10
37 {0, C1_15, C2_15, C3_15},// BL11
38 {0, C1_16,C2_16,C3_16},// BL12
39 {0, C7_1, C8_1, C9_1},// BL13
40 {0, C9_2, C8_2, C7_2},// BL14
41 {0, C9_3, C8_3, C7_3},//BL15
42 {0, C9_5, C8_5, C7_5},// BL16
43 {0, C9_6, C8_6, C7_6},// BL17
44
45};
46
47led_config_t g_led_config = {
48 {
49 { 0, 1, 2, 3},
50 { 4, 5, 6, 7},
51 { 8, 9, 10, NO_LED},
52 { 11, 12, 13, 14},
53 { 15, 16, NO_LED, NO_LED},
54 },
55 {
56 { 48, 32},{ 48, 48},{ 64, 48},{ 80, 48},
57 { 16, 32},{ 16, 48}, { 32, 48},{ 64, 64},
58 { 80, 16},{ 64, 32},{ 80, 32},
59 {112, 0},{128, 0},{144, 0},{160, 0},
60 {128, 16},{144, 16}
61 },
62 {
63 4, 4, 4, 1,
64 1, 1, 4, 1,
65 1, 4, 4,
66 1, 4, 4, 4,
67 4, 4
68 }
69};
70#endif
diff --git a/keyboards/latin17rgb/latin17rgb.h b/keyboards/latin17rgb/latin17rgb.h
new file mode 100644
index 000000000..f4ed4bf0c
--- /dev/null
+++ b/keyboards/latin17rgb/latin17rgb.h
@@ -0,0 +1,36 @@
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_5x4( \
23 K00, K01, K02, K03, \
24 K10, K11, K12, \
25 K20, K21, K22, K13, \
26 K30, K31, K32, \
27 K40, K41, K33 \
28) { \
29 { K00, K01, K02, K03 }, \
30 { K10, K11, K12, K13 }, \
31 { K20, K21, K22 }, \
32 { K30, K31, K32, K33 }, \
33 { K40, K41 } \
34}
35
36#define LAYOUT_pad LAYOUT_numpad_5x4
diff --git a/keyboards/latin17rgb/readme.md b/keyboards/latin17rgb/readme.md
new file mode 100644
index 000000000..775055f27
--- /dev/null
+++ b/keyboards/latin17rgb/readme.md
@@ -0,0 +1,20 @@
1# Latin17RGB
2
3![Latin17rgb](https://i.imgur.com/UoGWpw9l.jpg)
4
5 RGB PAD use IS31FL3731 IC
6
7* Keyboard Maintainer: [18438880](https://github.com/18438880)
8* Hardware Availability:
9
10Make example for this keyboard (after setting up your build environment):
11
12 make latin17rgb:default
13
14Flashing example for this keyboard:
15
16 make latin17rgb:default:flash
17
18To reset the board into bootloader mode, hold the key at the top left of the keyboard while connecting the USB cable (also erases persistent settings).
19
20See 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/latin17rgb/rules.mk b/keyboards/latin17rgb/rules.mk
new file mode 100644
index 000000000..dd7bab746
--- /dev/null
+++ b/keyboards/latin17rgb/rules.mk
@@ -0,0 +1,27 @@
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 = no # 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
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
24RGB_MATRIX_ENABLE = yes
25RGB_MATRIX_DRIVER = IS31FL3731
26
27LAYOUTS = numpad_5x4