aboutsummaryrefslogtreecommitdiff
path: root/keyboards/ramonimbao
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-11-19 17:51:36 +0000
committerQMK Bot <hello@qmk.fm>2021-11-19 17:51:36 +0000
commit070ef07a34ac74b8a077fd7b0689c4cbb345eb85 (patch)
tree72f79a457cf5afd69ef43295de83cf76586b25a2 /keyboards/ramonimbao
parent8011cbcc5030b27c8a1a3193bd9fcca08511bae8 (diff)
parent5c3afe3e6bc40ecda2770a61d8110bfa9b0dd39b (diff)
downloadqmk_firmware-070ef07a34ac74b8a077fd7b0689c4cbb345eb85.tar.gz
qmk_firmware-070ef07a34ac74b8a077fd7b0689c4cbb345eb85.zip
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/ramonimbao')
-rw-r--r--keyboards/ramonimbao/tkl_ff/keymaps/default/keymap.c39
-rw-r--r--keyboards/ramonimbao/tkl_ff/keymaps/iso/keymap.c39
-rw-r--r--keyboards/ramonimbao/tkl_ff/keymaps/via/keymap.c39
-rw-r--r--keyboards/ramonimbao/tkl_ff/readme.md2
-rw-r--r--keyboards/ramonimbao/tkl_ff/v2/config.h52
-rw-r--r--keyboards/ramonimbao/tkl_ff/v2/rules.mk1
-rw-r--r--keyboards/ramonimbao/tkl_ff/v2/v2.c17
-rw-r--r--keyboards/ramonimbao/tkl_ff/v2/v2.h18
8 files changed, 206 insertions, 1 deletions
diff --git a/keyboards/ramonimbao/tkl_ff/keymaps/default/keymap.c b/keyboards/ramonimbao/tkl_ff/keymaps/default/keymap.c
index 1d8b938fd..e44b56e55 100644
--- a/keyboards/ramonimbao/tkl_ff/keymaps/default/keymap.c
+++ b/keyboards/ramonimbao/tkl_ff/keymaps/default/keymap.c
@@ -25,3 +25,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT 25 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
26 ) 26 )
27}; 27};
28
29#ifdef RGBLIGHT_ENABLE
30const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS(
31 {0, 1, HSV_OFF},
32 {1, 1, HSV_OFF}
33);
34
35const rgblight_segment_t PROGMEM ll_cl[] = RGBLIGHT_LAYER_SEGMENTS(
36 {1, 1, HSV_OFF}
37);
38
39const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS(
40 {0, 1, HSV_OFF}
41);
42
43const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl);
44
45void keyboard_post_init_kb(void) {
46 rgblight_layers = rgb_layers;
47
48 keyboard_post_init_user();
49}
50
51bool led_update_kb(led_t led_state) {
52 bool res = led_update_user(led_state);
53
54 if (res) {
55 uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock;
56 for (uint8_t i=0; i<3; i++) {
57 rgblight_set_layer_state(i, false);
58 }
59 if (lock_bits < 3) {
60 rgblight_set_layer_state(lock_bits, true);
61 }
62 }
63
64 return res;
65}
66#endif
diff --git a/keyboards/ramonimbao/tkl_ff/keymaps/iso/keymap.c b/keyboards/ramonimbao/tkl_ff/keymaps/iso/keymap.c
index 2729e390d..17997828d 100644
--- a/keyboards/ramonimbao/tkl_ff/keymaps/iso/keymap.c
+++ b/keyboards/ramonimbao/tkl_ff/keymaps/iso/keymap.c
@@ -25,3 +25,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT 25 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
26 ) 26 )
27}; 27};
28
29#ifdef RGBLIGHT_ENABLE
30const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS(
31 {0, 1, HSV_OFF},
32 {1, 1, HSV_OFF}
33);
34
35const rgblight_segment_t PROGMEM ll_cl[] = RGBLIGHT_LAYER_SEGMENTS(
36 {1, 1, HSV_OFF}
37);
38
39const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS(
40 {0, 1, HSV_OFF}
41);
42
43const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl);
44
45void keyboard_post_init_kb(void) {
46 rgblight_layers = rgb_layers;
47
48 keyboard_post_init_user();
49}
50
51bool led_update_kb(led_t led_state) {
52 bool res = led_update_user(led_state);
53
54 if (res) {
55 uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock;
56 for (uint8_t i=0; i<3; i++) {
57 rgblight_set_layer_state(i, false);
58 }
59 if (lock_bits < 3) {
60 rgblight_set_layer_state(lock_bits, true);
61 }
62 }
63
64 return res;
65}
66#endif
diff --git a/keyboards/ramonimbao/tkl_ff/keymaps/via/keymap.c b/keyboards/ramonimbao/tkl_ff/keymaps/via/keymap.c
index d46f3aade..298b7a1fa 100644
--- a/keyboards/ramonimbao/tkl_ff/keymaps/via/keymap.c
+++ b/keyboards/ramonimbao/tkl_ff/keymaps/via/keymap.c
@@ -49,3 +49,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
49 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 49 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
50 ) 50 )
51}; 51};
52
53#ifdef RGBLIGHT_ENABLE
54const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS(
55 {0, 1, HSV_OFF},
56 {1, 1, HSV_OFF}
57);
58
59const rgblight_segment_t PROGMEM ll_cl[] = RGBLIGHT_LAYER_SEGMENTS(
60 {1, 1, HSV_OFF}
61);
62
63const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS(
64 {0, 1, HSV_OFF}
65);
66
67const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl);
68
69void keyboard_post_init_kb(void) {
70 rgblight_layers = rgb_layers;
71
72 keyboard_post_init_user();
73}
74
75bool led_update_kb(led_t led_state) {
76 bool res = led_update_user(led_state);
77
78 if (res) {
79 uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock;
80 for (uint8_t i=0; i<3; i++) {
81 rgblight_set_layer_state(i, false);
82 }
83 if (lock_bits < 3) {
84 rgblight_set_layer_state(lock_bits, true);
85 }
86 }
87
88 return res;
89}
90#endif
diff --git a/keyboards/ramonimbao/tkl_ff/readme.md b/keyboards/ramonimbao/tkl_ff/readme.md
index 06a64210b..ffc11f585 100644
--- a/keyboards/ramonimbao/tkl_ff/readme.md
+++ b/keyboards/ramonimbao/tkl_ff/readme.md
@@ -2,7 +2,7 @@
2 2
3![TKL-FF](https://i.imgur.com/GJCo3F5l.png) 3![TKL-FF](https://i.imgur.com/GJCo3F5l.png)
4 4
5A TKL PCB made for the Geonworks Frog keyboard that supports both F12 and F13. 5A TKL PCB made for the Geonworks Frog keyboard that supports both F12 and F13. V2 simply adds RGB indicator LEDs.
6 6
7* Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao) 7* Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao)
8* Hardware Supported: ATmega32u4 8* Hardware Supported: ATmega32u4
diff --git a/keyboards/ramonimbao/tkl_ff/v2/config.h b/keyboards/ramonimbao/tkl_ff/v2/config.h
new file mode 100644
index 000000000..a35d1bc59
--- /dev/null
+++ b/keyboards/ramonimbao/tkl_ff/v2/config.h
@@ -0,0 +1,52 @@
1/* Copyright 2021 Ramon Imbao
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 "config_common.h"
19
20#undef PRODUCT_ID
21#define PRODUCT_ID 0x10FF
22
23#define RGBLIGHT_LAYERS
24#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
25
26#define RGB_DI_PIN E2
27#ifdef RGB_DI_PIN
28# define RGBLED_NUM 26
29# define RGBLIGHT_HUE_STEP 32
30# define RGBLIGHT_SAT_STEP 32
31# define RGBLIGHT_VAL_STEP 32
32//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
33//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
34/*== all animations enable ==*/
35// # define RGBLIGHT_ANIMATIONS
36/*== or choose animations ==*/
37# define RGBLIGHT_EFFECT_BREATHING
38# define RGBLIGHT_EFFECT_RAINBOW_MOOD
39# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
40//# define RGBLIGHT_EFFECT_SNAKE
41//# define RGBLIGHT_EFFECT_KNIGHT
42# define RGBLIGHT_EFFECT_CHRISTMAS
43# define RGBLIGHT_EFFECT_STATIC_GRADIENT
44# define RGBLIGHT_EFFECT_RGB_TEST
45# define RGBLIGHT_EFFECT_ALTERNATING
46/*== customize breathing effect ==*/
47/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
48//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
49/*==== use exp() and sin() ====*/
50//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
51//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
52#endif
diff --git a/keyboards/ramonimbao/tkl_ff/v2/rules.mk b/keyboards/ramonimbao/tkl_ff/v2/rules.mk
new file mode 100644
index 000000000..84ef473c0
--- /dev/null
+++ b/keyboards/ramonimbao/tkl_ff/v2/rules.mk
@@ -0,0 +1 @@
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
diff --git a/keyboards/ramonimbao/tkl_ff/v2/v2.c b/keyboards/ramonimbao/tkl_ff/v2/v2.c
new file mode 100644
index 000000000..de5f32e3c
--- /dev/null
+++ b/keyboards/ramonimbao/tkl_ff/v2/v2.c
@@ -0,0 +1,17 @@
1/* Copyright 2021 Ramon Imbao
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 "v2.h"
diff --git a/keyboards/ramonimbao/tkl_ff/v2/v2.h b/keyboards/ramonimbao/tkl_ff/v2/v2.h
new file mode 100644
index 000000000..7c4566def
--- /dev/null
+++ b/keyboards/ramonimbao/tkl_ff/v2/v2.h
@@ -0,0 +1,18 @@
1/* Copyright 2021 Ramon Imbao
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"