Compare commits

...
10 Commits
Author SHA1 Message Date
zvecr d53cbd2dc6 Update run command now that the install script is unattended, fix mount point for Debian (#5847) 2019-05-11 17:55:12 -07:00
stanrc85 5c4707eafc [Keymap] Minor keymap updates (#5850)
* Move layer toggle key for one handed operation

* Add print screen keycode

* Cleaning up some tab/space formatting
2019-05-11 17:51:37 -07:00
XScorpion2 819364ea23 Fix for Solid Reactive mode bug (#5846)
derp, forgot to remove the pragma once
2019-05-11 12:31:31 -07:00
William Chang b9c38cfec8 Add vim arrow keybindings to layer 1, update readme. (#5842) 2019-05-11 10:14:42 -07:00
d591ab6263 feat: add kbd67v2 support (#5777)
* feat: add kbd67v2 support

* update cr

* Update keyboards/kbdfans/kbd67/rev2/config.h

Co-Authored-By: Vorror <[email protected]>

* Update keyboards/kbdfans/kbd67/rev2/config.h

Co-Authored-By: Vorror <[email protected]>

* Update keyboards/kbdfans/kbd67/rev2/rev2.c

Co-Authored-By: Vorror <[email protected]>

* Update keyboards/kbdfans/kbd67/rev2/rules.mk

Co-Authored-By: MechMerlin <[email protected]>

* Update keyboards/kbdfans/kbd67/rev2/readme.md

Co-Authored-By: MechMerlin <[email protected]>
2019-05-11 09:24:49 -07:00
ymzcdg 7871a465d3 translate docs into Mandarin Chinese (#5807)
* translate newbs.md into Madarin Chinese

translate newbs.md into Madarin Chinese

* translate docs into Mandarin Chinese

translate getting_started_github.md into Mandarin Chinese

* translate getting_started_getting_help.md into Mandarin Chinese

translate getting_started_getting_help.md into Mandarin Chinese

* contributing.md to Chinese

Personify QMK as a girl named Q酱 . It can make more developer read this document and contribute QMK.

* getting_started_introduction.md to Chinese

getting_started_introduction.md to Chinese

* faq.md to Chinese

faq.md to Chinese

* crlf2lf getting_started_introduction.md

ending line fix getting_started_introduction.md

* crlf2lf contributing.md

crlf2lf contributing.md
2019-05-11 09:22:16 -07:00
XScorpion2 fd23a0e909 RGB Matrix Effects: Cycle Out to In & Cycle Out to In Dual (#5812) 2019-05-10 19:56:16 -07:00
XScorpion2andDrashna Jaelre 62ba66d618 Cleanup/rgb matrix (#5811)
* clean up rgb matrix extern usage

Moved rgb matrix boiler plate into macros

Rebased onto typing heatmap pr

* Fixing the reversed frame buffer access in digital rain

* Fixing digital rain & typing heatmap if keyreactive effects are not enabled

* Apply suggestions from code review

Co-Authored-By: Drashna Jaelre <[email protected]>

* Adding parenthesizes to DRIVER_LED_TOTAL where necessary

* Updated docs

* added notes about parentheses
2019-05-10 16:55:02 -07:00
Yan-Fa Li febaf9dec4 [Docs] RGB Animation documentation on reducing memory footprint (#5813)
* Improve Animation docs with example

 - example to reduce flash footprint of animations using RGBLIGHT_EFFECT_ defines

* Re-order the effects list

* Update docs/feature_rgblight.md

Co-Authored-By: yanfali <[email protected]>

* Update docs/feature_rgblight.md

Co-Authored-By: yanfali <[email protected]>

* Update docs/feature_rgblight.md

Co-Authored-By: yanfali <[email protected]>

* Introduce line breaks

* Add title for animation speed section

* Organize Animation Defines Into Groups

* Use the RGB EFFECT recommended by mtei in docs

 - has the most modes, and STATIC_LIGHT can't really be disabled.

* Use more accurate titles for effects and animation

 - accidentally put a toggle in settings
2019-05-10 09:50:52 -07:00
Andrew Kannan 6464dfc91d [Keyboard] Satisfaction75 i2c fix and VIA layout (#5798) 2019-05-09 22:53:36 -07:00
77 changed files with 1170 additions and 526 deletions

No files matched your search

Vendored
+3 -1
View File
@@ -8,6 +8,8 @@ Vagrant.configure(2) do |config|
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit # VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
config.vm.box = "generic/debian9" config.vm.box = "generic/debian9"
config.vm.synced_folder '.', '/vagrant'
# This section allows you to customize the Virtualbox VM # This section allows you to customize the Virtualbox VM
# settings, ie showing the GUI or upping the memory # settings, ie showing the GUI or upping the memory
# or cores if desired # or cores if desired
@@ -64,7 +66,7 @@ Vagrant.configure(2) do |config|
# If this causes issues you can run a 'vagrant destroy' and then # If this causes issues you can run a 'vagrant destroy' and then
# add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working # add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working
# non-updated box and then attempt to troubleshoot or open a Github issue # non-updated box and then attempt to troubleshoot or open a Github issue
config.vm.provision "shell", inline: "/bin/sh -c 'yes | /vagrant/util/qmk_install.sh'", run: "always" config.vm.provision "shell", inline: "/vagrant/util/qmk_install.sh", run: "always"
config.vm.post_up_message = <<-EOT config.vm.post_up_message = <<-EOT
+7 -1
View File
@@ -30,9 +30,11 @@ Configure the hardware via your `config.h`:
#define DRIVER_COUNT 2 #define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 25 #define DRIVER_1_LED_TOTAL 25
#define DRIVER_2_LED_TOTAL 24 #define DRIVER_2_LED_TOTAL 24
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
``` ```
!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
Define these arrays listing all the LEDs in your `<keyboard>.c`: Define these arrays listing all the LEDs in your `<keyboard>.c`:
@@ -195,6 +197,8 @@ enum rgb_matrix_effects {
RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient
RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right
RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
RGB_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in
RGB_MATRIX_CYCLE_OUT_IN_DUAL, // Full dual gradients scrolling out to in
RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right
RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard
@@ -234,6 +238,8 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | |`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` |
|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | |`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` |
|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | |`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` |
|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN` |Disables `RGB_MATRIX_CYCLE_OUT_IN` |
|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Disables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` |
|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` | |`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |
|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | |`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | |`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
+44 -20
View File
@@ -37,9 +37,9 @@ QMK uses [Hue, Saturation, and Value](https://en.wikipedia.org/wiki/HSL_and_HSV)
<img src="gitbook/images/color-wheel.svg" alt="HSV Color Wheel" width="250"/> <img src="gitbook/images/color-wheel.svg" alt="HSV Color Wheel" width="250"/>
Changing the **Hue** cycles around the circle. Changing the **Hue** cycles around the circle.<br>
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color. Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.<br>
Changing the **Value** sets the overall brightness. Changing the **Value** sets the overall brightness.<br>
## Keycodes ## Keycodes
@@ -77,8 +77,7 @@ Your RGB lighting can be configured by placing these `#define`s in your `config.
|`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep| |`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep|
|`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added| |`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added|
## Animations ## Effects and Animations
Not only can this lighting be whatever color you want, Not only can this lighting be whatever color you want,
if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a number of animation modes at your disposal: if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a number of animation modes at your disposal:
@@ -100,29 +99,54 @@ Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstrat
Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol. Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol.
The following options can be used to tweak the various animations: ### Effect and Animation Toggles
Use these defines to add or remove animations from the firmware. When you are running low on flash space, it can be helpful to disable animations you are not using.
|Define |Default |Description |
|------------------------------------|-------------|-------------------------------------------------------------------------------------|
|`RGBLIGHT_ANIMATIONS` |*Not defined*|Enable all additional animation modes. |
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|Enable alternating animation mode. |
|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|Enable breathing animation mode. |
|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|Enable christmas animation mode. |
|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|Enable knight animation mode. |
|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|Enable rainbow mood animation mode. |
|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|Enable rainbow swirl animation mode. |
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|Enable RGB test animation mode. |
|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|Enable snake animation mode. |
|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|Enable static gradient mode. |
### Effect and Animation Settings
The following options are used to tweak the various animations:
|Define |Default |Description | |Define |Default |Description |
|------------------------------------|-------------|-------------------------------------------------------------------------------------| |------------------------------------|-------------|-------------------------------------------------------------------------------------|
|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|If defined, enable breathing animation mode. |
|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|If defined, enable rainbow mood animation mode. |
|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|If defined, enable rainbow swirl animation mode. |
|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|If defined, enable snake animation mode. |
|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|If defined, enable knight animation mode. |
|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|If defined, enable christmas animation mode. |
|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|If defined, enable static gradient mode. |
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|If defined, enable RGB test animation mode. |
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|If defined, enable alternating animation mode. |
|`RGBLIGHT_ANIMATIONS` |*Not defined*|If defined, enables all additional animation modes |
|`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 | |`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 | |`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 |
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds| |`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds|
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation | |`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls | |`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls |
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
### Example Usage to Reduce Memory Footprint
1. Remove `RGBLIGHT_ANIMATIONS` from `config.h`.
1. Selectively add the animations you want to enable. The following would enable two animations and save about 4KiB:
```diff
#undef RGBLED_NUM
-#define RGBLIGHT_ANIMATIONS
+#define RGBLIGHT_EFFECT_STATIC_GRADIENT
+#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLED_NUM 12
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
```
### Animation Speed
You can also modify the speeds that the different modes animate at: You can also modify the speeds that the different modes animate at:
+205
View File
@@ -0,0 +1,205 @@
# 如何做贡献
👍🎉 首先感谢各位百忙之中抽空阅读本文档,并为我们无私奉献。给您点赞啦! 🎉👍
第三方的帮助让Q酱成长了许多呢,Q酱也从你们那学到了不少新东西。Q酱希望每一个想帮助我的人都能很方便的做出有用的贡献。在这里我给摩拳擦掌的你们写了一点引导,让你们的代码在不对我做重大改动的情况下都能成功的被采纳哦。
* [项目概况](#项目概况)
* [代码规范](#代码规范)
* [一般教程](#一般教程)
* [行为守则对于我来说有何意义?](#行为守则对于我来说有何意义?)
## 这文章巨长无比不想读啊! 我就想问个问题而已!
您要是想问关于Q酱的问题的话可以在[OLKB Subreddit](https://reddit.com/r/olkb)或者是[Discord](https://discord.gg/Uq7gcHh)随意问。
请记住:
* 维护Q酱的小可爱有的时候可能会有点忙,不能及时回答您的问题,耐心等等,他们都是很nice的人呀。
* 维护Q酱的人都是很无私的善良的人。无论是贡献代码还是回答问题,都是义务的。有时见到他们努力回答各种问题,解决各种BUG,Q酱也是很心疼的。
* 您可以看看下面的教程,可以让您的问题浅显易懂,更容易回答:
* https://opensource.com/life/16/10/how-ask-technical-questions
* http://www.catb.org/esr/faqs/smart-questions.html
# 项目概况
Q酱很大一部分是用C语言组成的,不过有一小部分特性是C++的。怎么说呢,都是我的一部分,两个我都爱。Q酱一般是在键盘上的嵌入式处理器那里工作的,尤其与AVR([LUFA](http://www.fourwalledcubicle.com/LUFA.php))和ARM ([ChibiOS](http://www.chibios.com))两小哥哥搭配,干活不累,嘻嘻。如果您精通Arduino的话您会发现很多熟悉的概念,但也有点不爽,因为您以前的经验可能没法用来帮助Q酱。
<!-- 需要修正: 这里放些学习C语言的资源。另外感谢修正的小可爱。谢谢您了。-->
# Q酱,我在哪能帮助你嘞?
您要是有问题的话可以 [提出一个issue](https://github.com/qmk/qmk_firmware/issues) 或 [在Discord上交流一下](https://discord.gg/Uq7gcHh).
# Q酱,我如何帮助你?
您以前是否没为开源贡献过代码,而又想知道帮助Q酱是怎么一回事? 稍安勿躁,咱给您总结一下!
0. 先注册一个 [GitHub](https://github.com) 账户。
1. 做好一个你要贡献的布局,那就要 [找一个你想解决的问题](https://github.com/qmk/qmk_firmware/issues),或者 [找一个你想添加的特性](https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature)。
2. 把关联着问题的仓库分叉(fork)到你的仓库。这样你在`你的GitHub用户名/qmk_firmware`就有一个仓库备份啦。
3. 使用 `git clone https://github.com/此处添GitHub用户名/此处添仓库名.git`这个命令把仓库同步到你的电脑中。
4. 您要是想开发一个新特性的话可以先创建一个issue和Q酱的维护者讨论一下您要做什么。
5. 使用`git checkout -b 此处写分支名字(别用汉字)`命令来创建一个分支(branch)用于开发。
6. 对要解决的问题或要添加的特性进行适当的更改。
7. 使用 `git add 把改变的文件的目录写这里` 可以添加改变的文件内容到git用于管理工程状态的索引(快照)里。
8. 使用 `git commit -m "这里写修改的相关信息"` 来描述你做出了什么修改。
9. 使用 `git push origin 此处写分支名字`来把你的更改同步到GitHub库里(反正不是打篮球那个库里)。
10. 提交一个[QMK 固件的pull request](https://github.com/qmk/qmk_firmware/pull/new/master)。
11. 给你的pull request拟一个标题,包括简短的描述和问题或错误代码。比如, 你可以起一个这样的"Added more log outputting to resolve #4352"(最好用英语,毕竟Q酱的中文也不是那么的溜,有可能会看不懂中文)。
12. 在描述(description)里面写你做了哪些更改,你的代码里还存在什么问题, 或者你想问维护的小可爱们的问题。你的your pull request有点小问题无伤大雅(本来也没有完美的代码嘛), 维护的小可爱们会竭尽全力帮您改进的!
13. 维护人员审查代码可能需要一些时间。
14. 维护人员会通知您要更改什么地方,然后您就按照建议改一改。
15. 预祝您合并成功!
# 代码规范
其实也没有什么特别严格的规范啦,但是俗话说的好:没有规矩,不成方圆。您可以看一下您的要改动的代码周围的画风,然后保持队形。如果你感觉周围都不知道是什么牛鬼蛇神的话就看看下面的建议:
* 我们用肆(4)个空格来缩进(软件中也可以设置到Tab键)
* 我们使用改良的1TBS(允许单行样式)
* 左大括号: 在开放性语句块那行的末尾
* 右大括号: 和开放性语句块第一个字母对齐
* Else If: 将右大括号放在行的开头,下一个左大括号放在同一行的结尾
* 可选大括号: 可选大括号是必选的
* 应该这样: if (condition) { return false; }
* 不应该这样: if (condition) return false;
* 建议使用C语言风格的注释: `/* */`
* 把注释想象成一个描述特征的故事
* 充分使用注释来描述你为何这样修改
* 有些公认的东西就不要写到注释里面了
* 如果你不知道注释是否多余,看下面
* 一般不要主动换行,主动换行的话每行不要超过76列
* 要把 `#pragma once` 放到头文件的开始哦,抛弃老土的(`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)吧
* 下面两种预处理命令都可以用: `#ifdef DEFINED` 还有 `#if defined(DEFINED)`
* 以上那句对处女座不是很友好哈,处女座的朋友们就别纠结了,直接 `#if defined(DEFINED)` 。
* 还有就是选好一种风格就一直用,一直用一直爽,不要朝三暮四, 除非你要变化到多重条件的 `#if`。
* `#` 和 `if`要挨在一起哦,再让本空格在中间冒充电灯泡本空格会生气的。
* 以下是缩进规则:
* 首先考虑可读性,强迫症的朋友们总想要保持代码的高一致性,这样可不好。
* 保证文件已有风格不变。如果代码本来就是杂糅风格,那就见机行事,让你的修改更有意义些。
* 其实你也可以在缩进的时候看看周围其他代码,然后范水模山,预处理命令可以有自己的缩进风格。
可以参照下面:
```c
/* foo 的 Enums*/
enum foo_state {
FOO_BAR,
FOO_BAZ,
};
/* 有返回值的情况 */
int foo(void) {
if (some_condition) {
return FOO_BAR;
} else {
return -1;
}
}
```
# Clang-format的自动格式化
[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) 是LLVM的一部分,可以帮你自动格式化代码。我们给你准备好了一个适用于以上规范的配置文件,会帮你调整缩进和换行,你只需要写好括号就好。有了它,你再也不用担心调整代码格式太耗时,没有时间陪伴自己(虚构)的另一半了。
使用[LLVM 完整安装](http://llvm.org/builds/)可以在Windows上安装clang-format, Ubuntu用户要用`sudo apt install clang-format`。
命令行的朋友们, 加上 `-style=file`选项就会自动在QMK的根目录寻找.clang-format配置文件了。
VSCode用户, 标准的 C/C++ 插件就支持clang-format, 或者可以用[独立扩展](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat)也行。
有些东西(比如LAYOUT宏) 会被clang-format打乱,所以那些文件就别用clang-format了,这里就教您一个小窍门,在`// clang-format off` 和 `//clang-format on`之间装上会被搞乱的代码就好了。
# 一般教程
你可以给Q酱的不同部分添砖加瓦,但也要用不同的方法严谨检查。不论你修改哪里最好还是看看下边。
* 将PR(pull request)分成一个个的逻辑单元。 比如,不要一次将两个新特性PR出去。要添加的特性排好队,一个一个来。
* 提交之前看一眼,`git diff --check`的空格一定要写对了
* 确定你的代码能通过编译
* 布局: 确定`make keyboard:your_new_keymap` 不返回错误
* 键盘: 确定 `make keyboard:all` 不返回错误
* 核心代码: 确定 `make all` 不返回错误
* 提交的信息尽量明确。第一行写点简短介绍(每行不多于70个英文字母), 第二行空着,第三行和后面就要写些必要的细节了。最好用英文写,比如:
```
Adjust the fronzlebop for the kerpleplork
The kerpleplork was intermittently failing with error code 23. The root cause was the fronzlebop setting, which causes the kerpleplork to activate every N iterations.
Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure.
```
## 文档
想帮助Q酱当然是先看文档最简单了。找到这个文档哪里错了然后改正它对于你来说超级简单! 我们也对有写文档能力的人求贤若渴,如果你是对的人[点这个](#Q酱,我在哪能帮助你嘞?)!
文档呢,都静静的放在`qmk_firmware/docs` 目录里, 也或者您想为网页做贡献的话也是可以的哦。
在文档中附代码案例时, 先观察文档其他地方的命名规范。比如, 把enums的名字都改成像`my_layers`或者`my_keycodes`来防止名字不一致的enums被当作特务枪毙:
```c
enum my_layers {
_FIRST_LAYER,
_SECOND_LAYER
};
enum my_keycodes {
FIRST_LAYER = SAFE_RANGE,
SECOND_LAYER
};
```
## 布局
大多数QMK新手都从创建一个自己的布局开始。我们尽力保证布局规范宽松 (毕竟布局是个性的体现) 不过建议遵守以下准则,这样可以让别人更好理解你的代码
* 用 [模板](documentation_templates.md)写个`readme.md`。
* 所有的布局PR都会被squash, 如果你想知道你的提交是怎么被squash的那你就自己来吧
* 不要把新特性和布局一起PR。可以分别PR他们
* 布局文件夹就不要放`Makefile`了,这个操作都过时啦
* 更新文件头部的copyrights(看`%YOUR_NAME%`那)
## 键盘
QMK的最终归宿是键盘。有些键盘是社区维护的,有一些是制作这些键盘的人维护的。`readme.md`会告诉你是谁维护了这个键盘,如果你对某个键盘有疑问,可以 [创建一个Issue](https://github.com/qmk/qmk_firmware/issues) 来问一问维护者。
我们建议你按下面的来操作:
* 用[模板](documentation_templates.md)写`readme.md`。
* 提交数量尽量合理,不然我们可就要把你的PR给squash了。
* 不要把新特性和新键盘一起PR。可以分别PR他们
* 用父文件夹的名字命名 `.c`/`.h`文件, 比如`/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
* 键盘文件夹就不要放`Makefile`了,这个操作都过时啦
* 更新文件头部的copyrights(看`%YOUR_NAME%`那)
## Quantum/TMK 核心
在您废寝忘食地开发Q酱新特性或者帮Q酱驱虫之前,一定要确保你的工作是有意义的。看看[了解QMK](understanding_qmk.md)你会对Q酱有更深的了解,这个文档将带你领略QMK的程序流程。现在你应该和维护团对谈谈来了解实现你想法的最佳方法了。一下渠道都可以:
* [在Discord交流](https://discord.gg/Uq7gcHh)
* [建立一个Issue](https://github.com/qmk/qmk_firmware/issues/new)
新特性和BUG的修复影响所有键盘。开发组也在翻修QMK。所以,在实施重大返修之前一定要讨论一下。如果你在没有事先与维护团队沟通的情况下提交了一个PR,而且你的选择与维护团队的计划方向不符,那你可能要面临大改了。
修复BUG或者开发新特性之前看看这个:
* **默认不启用** - QMK运行的芯片多数内存有限,所以首要考虑的还应该是布局不要被破坏,于是特性默认是不启用的。你喜欢什么特性的话就打开它,如果你觉得有些特性应该默认开启或者你能帮助缩减代码,那就联系维护组吧。
* **提交之前在本地编译** - 这个简直就是家喻户晓了,但是也确实需要编译啊! 我们的Travis系统会发现一切问题,但是自己编译一下可要比在线等快多了。
* **注意版本和芯片平台** - 有那么几个键盘有支持不同配置甚至是不同芯片的版本。试着写一个能AVR和ARM两个平台运行的特性,或者在不支持的平台自动禁用。
* **解释你的新特性** - 在`docs/`写个文档, 你可以创建新文档或者写到现有文档中。如果你不把它记录下来,其他人就无法从你的努力中获益。
也可以看看以下建议:
* 提交数量尽量合理,不然我们可就要把你的PR给squash了。
* 不要把新特性、布局和键盘一起PR。可以分别PR他们。
* 给你的特性写[单元测试](unit_testing.md)。
* 你编辑的文件风格要一致,如果风格不明确或者是混搭风的,你就要先看看[代码规范](#代码规范)确认情况。
## 重构
为了保持QMK脉络清晰,Q酱打算深入规划重构一下自己,然后让合作者进行修改。如果你有重构的思路或建议[创建一个issue](https://github.com/qmk/qmk_firmware/issues), Q酱很乐意讨论一下怎么改进一下。
# 行为守则对于我来说有何意义?
我们的[行为守则](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) 是说明您有责任尊重和礼貌地对待项目中的每个人,无论他们的身份如何。 如果你是我们行为准则所描述的不当行为的受害者,我们将站在你这边,并按照行为准则对施暴者进行适当谴责。
+6
View File
@@ -0,0 +1,6 @@
# 常见问题
* [一般问题](faq_general.md)
* [构建和编译QMK](faq_build.md)
* [QMK调试和故障排除](faq_debug.md)
* [布局问题](faq_keymap.md)
@@ -0,0 +1,15 @@
# 获得帮助
有很多方法来获得关于QMK的帮助.
## 实时聊天
你可以在我们的主要[Discord服务器](https://discord.gg/Uq7gcHh)找到QMK的开发者和用户。有很多讨论固件的不同频道, 工具箱(Toolbox), 硬件,配置工具(configurator).
## OLKB Subreddit
QMK的官方论坛是[/r/olkb](https://reddit.com/r/olkb) 在[reddit.com](https://reddit.com)上.
## Github的Issue
你可以在GitHub上 [提出issue](https://github.com/qmk/qmk_firmware/issues).当您的问题需要长期讨论或调试时,这尤其方便。
+59
View File
@@ -0,0 +1,59 @@
# 如何在QMK中使用Github
Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK.
?> 本教程假设您已安装GitHub,并且您喜欢使用命令行工作。
首先 [Github上的QMK页面](https://github.com/qmk/qmk_firmware), 您能看到右上方有个按钮写着"Fork":
![从Github上分叉](http://i.imgur.com/8Toomz4.jpg)
如果你是某组织成员,你将需要选择分叉到哪个账户。一般情况下, 你是想要分叉到你的私人账户下。当你完成分叉 (有时需要等一会), 点击"Clone or Download" 按钮:
!从Github下载](http://i.imgur.com/N1NYcSz.jpg)
你要选择 "HTTPS", 然后选择链接复制:
![HTTPS链接](http://i.imgur.com/eGO0ohO.jpg)
然后,在命令行输入`git clone `,然后粘贴你的链接:
```
user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git
Cloning into 'qmk_firmware'...
remote: Counting objects: 46625, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done.
Resolving deltas: 100% (29362/29362), done.
Checking out files: 100% (2799/2799), done.
```
现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样:
```
user@computer:~$ git add .
user@computer:~$ git commit -m "adding my keymap"
[master cccb1608] adding my keymap
1 file changed, 1 insertion(+)
create mode 100644 keyboards/planck/keymaps/mine/keymap.c
user@computer:~$ git push
Counting objects: 1, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1/1), done.
Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done.
Total 1 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local objects.
To https://github.com/whoeveryouare/qmk_firmware.git
+ 20043e64...7da94ac5 master -> master
```
现在你的改动已经在你Github上的分支中了 - 如果你回到这 (`https://github.com/你的GitHub账户名/qmk_firmware`) ,你可以点击下方所示按钮创建 "New Pull Request":
![新的 Pull Request](http://i.imgur.com/DxMHpJ8.jpg)
现在你可以看到你所做的一切 - 如果看起来不错, 就可以点击 "Create Pull Request"定稿了:
![创建Pull Request](http://i.imgur.com/Ojydlaj.jpg)
提交后,我们会开跟你说你的改动,要求您进行更改, 并最终接受您的更改!感谢您为QMK做的贡献 :)
+23
View File
@@ -0,0 +1,23 @@
# QMK菜鸟教程
QMK是为你机械硬盘设计的的一个强大的开源固件。使用QMK可以很简单的让你的定制键盘变得强大。看完这篇文章,无论你是菜鸟还是大佬,都可以顺利的使用QMK来定制键盘。
你是否为不知道你的键盘能不能运行QMK而苦恼? 如果你的机械键盘是你自己做的,那么这把键盘一般可以运行QMK。我们提供了[一大堆自制键盘](http://qmk.fm/keyboards/), 所以即便你的键盘不能运行QMK你也很容易能找到满足你需求的键盘。
## 概览
这个教程有7个主要部分:
* [新手上路](newbs_getting_started.md)
* [用命令行构建你的第一个固件](newbs_building_firmware.md)
* [用在线界面构建你的第一个固件](newbs_building_firmware_configurator.md)
* [刷新固件](newbs_flashing.md)
* [测试和调试](newbs_testing_debugging.md)
* [Git最佳实践](newbs_best_practices.md)
* [其他学习资源](newbs_learn_more_resources.md)
这份教程旨在帮助没有固件构建经验的人,也是根据该目的做出选择和建议。这些程序有很多替代方法,大部分替代我们都支持。如果你对完成一个任务有疑问,可以[向我们寻求帮助](getting_started_getting_help.md).
## 其他资源
* [Thomas Baart的 QMK基础博客](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – 这是一个用户创建的博客,涵盖了为新手准备的使用QMK的基础知识。
+4 -4
View File
@@ -28,9 +28,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,-----------------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | Mute | Prev | Next | * | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* | | | | | | | | | | | Vol- | Vol+ | Play/Pause | * | | | | | | | Left| Down| Up |Right| | | Play/Pause |
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
* | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET| * | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET|
* |-----------------------------------------------------------------------------------------+ * |-----------------------------------------------------------------------------------------+
@@ -40,8 +40,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_directional( LAYOUT_directional(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL,
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, _______, KC_MRWD, KC_MFFD, _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_MUTE, KC__VOLDOWN, KC__VOLUP, KC_MRWD, KC_MFFD,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC__VOLDOWN, KC__VOLUP, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______,
KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET,
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END
), ),
+3 -2
View File
@@ -11,6 +11,7 @@ Settings:
* `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down * `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down
* RESET is available as `Fn`+ ` ESC` * RESET is available as `Fn`+ ` ESC`
* Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus! * Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus!
* vim-style arrow key bindings H J K L in layer 1
### Initial Installation ### Initial Installation
@@ -59,9 +60,9 @@ FN Layer
,-----------------------------------------------------------------------------------------. ,-----------------------------------------------------------------------------------------.
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|-----------------------------------------------------------------------------------------+ |-----------------------------------------------------------------------------------------+
| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Prev | Next | | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next |
|-----------------------------------------------------------------------------------------+ |-----------------------------------------------------------------------------------------+
| | | | | | | | | | | Vol- | Vol+ | Play/Pause | | | | | | | | Left| Down| Up |Right| | | Play/Pause |
|-----------------------------------------------------------------------------------------+ |-----------------------------------------------------------------------------------------+
| | | | | | | | |Scr- |Scr+ | | PG_UP |RESET| | | | | | | | | |Scr- |Scr+ | | PG_UP |RESET|
|-----------------------------------------------------------------------------------------+ |-----------------------------------------------------------------------------------------+
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern bool g_suspend_state;
#define _LAYER0 0 #define _LAYER0 0
#define _LAYER1 1 #define _LAYER1 1
#define _LAYER2 2 #define _LAYER2 2
@@ -32,7 +31,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern bool g_suspend_state;
#define _LAYER0 0 #define _LAYER0 0
#define _LAYER1 1 #define _LAYER1 1
#define _LAYER2 2 #define _LAYER2 2
@@ -53,7 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern bool g_suspend_state;
#define _LAYER0 0 #define _LAYER0 0
#define _LAYER1 1 #define _LAYER1 1
#define _LAYER2 2 #define _LAYER2 2
@@ -38,7 +37,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
}; };
extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern bool g_suspend_state;
#define _LAYER0 0 #define _LAYER0 0
#define _LAYER1 1 #define _LAYER1 1
#define _LAYER2 2 #define _LAYER2 2
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern bool g_suspend_state;
#define _LAYER0 0 #define _LAYER0 0
#define _LAYER1 1 #define _LAYER1 1
#define _LAYER2 2 #define _LAYER2 2
@@ -39,7 +38,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern bool g_suspend_state;
#define _LAYER0 0 #define _LAYER0 0
#define _LAYER1 1 #define _LAYER1 1
#define _LAYER2 2 #define _LAYER2 2
@@ -39,7 +38,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS), KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS),
}; };
extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern bool g_suspend_state;
#define _LAYER0 0 #define _LAYER0 0
#define _LAYER1 1 #define _LAYER1 1
#define _LAYER2 2 #define _LAYER2 2
@@ -38,7 +37,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
}; };
extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
@@ -1,6 +1,5 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern bool g_suspend_state;
enum dz60rgb_layers { enum dz60rgb_layers {
_QWERTY, _QWERTY,
@@ -26,7 +25,6 @@ enum dz60rgb_keycodes {
#define _V_V_V_ KC_TRNS #define _V_V_V_ KC_TRNS
#define LT_CAPS LT(_NAV, KC_CAPS) #define LT_CAPS LT(_NAV, KC_CAPS)
#define LT_DEL LT(_RGB, KC_DEL) #define LT_DEL LT(_RGB, KC_DEL)
extern rgb_config_t rgb_matrix_config;
extern bool autoshift_enabled; extern bool autoshift_enabled;
#define MT_SLSH RSFT_T(KC_SLSH) #define MT_SLSH RSFT_T(KC_SLSH)
#define MT_APP RALT_T(KC_APP) #define MT_APP RALT_T(KC_APP)
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern bool g_suspend_state;
#define _LAYER0 0 #define _LAYER0 0
#define _LAYER1 1 #define _LAYER1 1
#define _LAYER2 2 #define _LAYER2 2
@@ -50,8 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
extern led_config_t g_led_config; void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue ); rgb_matrix_set_color( i, red, green, blue );
+1 -1
View File
@@ -26,4 +26,4 @@
#define DRIVER_COUNT 2 #define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 35 #define DRIVER_1_LED_TOTAL 35
#define DRIVER_2_LED_TOTAL 33 #define DRIVER_2_LED_TOTAL 33
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern bool g_suspend_state;
#define _LAYER0 0 #define _LAYER0 0
#define _LAYER1 1 #define _LAYER1 1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+1 -1
View File
@@ -107,7 +107,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DRIVER_COUNT 2 #define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 24 #define DRIVER_1_LED_TOTAL 24
#define DRIVER_2_LED_TOTAL 24 #define DRIVER_2_LED_TOTAL 24
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF // #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */ /* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
+1 -1
View File
@@ -134,4 +134,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DRIVER_2_LED_TOTAL 32 #define DRIVER_2_LED_TOTAL 32
#endif #endif
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+24 -24
View File
@@ -17,33 +17,33 @@
#include "stanrc85.h" #include "stanrc85.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_ansi( [0] = LAYOUT_60_ansi(
TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL), KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL),
[1] = LAYOUT_60_ansi( [1] = LAYOUT_60_ansi(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL),
[2] = LAYOUT_60_ansi( [2] = LAYOUT_60_ansi(
KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
_______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, KC_INS, _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS,
KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
_______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______), _______, _______, _______, _______, _______, _______, _______, _______),
[3] = LAYOUT_60_ansi( [3] = LAYOUT_60_ansi(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST,
_______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET, _______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET,
TG(1), EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE, _______, EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______) _______, _______, _______, _______, _______, _______, _______, TG(1))
}; };
// Backlight specific keys: // Backlight specific keys:
+4 -4
View File
@@ -1,9 +1,9 @@
# project specific files # project specific files
SRC = keyboards/zeal60/zeal60.c \ SRC = keyboards/zeal60/zeal60.c \
keyboards/zeal60/rgb_backlight.c \ keyboards/zeal60/rgb_backlight.c \
drivers/issi/is31fl3733.c \ drivers/issi/is31fl3733.c \
quantum/color.c \ quantum/color.c \
drivers/arm/i2c_master.c drivers/arm/i2c_master.c
## chip/board settings ## chip/board settings
# the next two should match the directories in # the next two should match the directories in
+64
View File
@@ -0,0 +1,64 @@
/*
Copyright 2019 Vorror
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 "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER KBDFans
#define PRODUCT KBD67v2
#define DESCRIPTION 65% Keyboard
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 16
#define MATRIX_ROW_PINS { B7, D0, F0, F1, F4 }
#define MATRIX_COL_PINS { B0, B1, B2, B3, D1, D2, D3, D6, D7, B4, B6, C6, C7, F7, F6, F5 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
#define BACKLIGHT_PIN B5
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 3
#endif
/* 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
#define RGB_DI_PIN E2
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 18
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_LIMIT_VAL 240
#endif
+16
View File
@@ -0,0 +1,16 @@
{
"keyboard_name": "kbd67v2",
"url": "",
"maintainer": "qmk",
"width": 16,
"height": 5,
"layouts": {
"LAYOUT_all": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
},
"LAYOUT_65_ansi": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
}
}
}
@@ -0,0 +1,19 @@
/* Copyright 2018 MechMerlin
*
* 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
// place overrides here
@@ -0,0 +1,99 @@
/* Copyright 2018 'mechmerlin'
*
* 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/>.
*/
#include QMK_KEYBOARD_H
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
QMKBEST = SAFE_RANGE,
QMKURL
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap (Base Layer) Default Layer
* ,----------------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home|
* |----------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp|
* |----------------------------------------------------------------|
* |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn|
* |----------------------------------------------------------------|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End |
* |----------------------------------------------------------------|
* |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig |
* `----------------------------------------------------------------'
*/
[0] = LAYOUT_65_ansi(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, \
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap Fn Layer
* ,----------------------------------------------------------------.
* |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins |
* |----------------------------------------------------------------|
* |Caps | |Up | | | | | |PSc|SLk|Pau|Up | | | |
* |----------------------------------------------------------------|
* | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | |
* |----------------------------------------------------------------|
* | | | | | | | | |End|PDn|Dow| |PUp| |
* |----------------------------------------------------------------|
* | | | | | | | |Hom|PDn|End |
* `----------------------------------------------------------------'
*/
[1] = LAYOUT_65_ansi(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,KC_INS, \
KC_CAPS,_______, KC_UP,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP,_______, _______,_______, \
_______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,_______,_______,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT, _______,_______, \
_______,_______,_______,_______,_______,_______,_______,_______, KC_END,KC_PGDN,KC_DOWN, _______,KC_PGUP,_______, \
_______, _______, _______, _______, _______,_______,_______,KC_HOME,KC_PGDN, KC_END),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QMKBEST:
if (record->event.pressed) {
// when keycode QMKBEST is pressed
SEND_STRING("QMK is the best thing ever!");
} else {
// when keycode QMKBEST is released
}
break;
case QMKURL:
if (record->event.pressed) {
// when keycode QMKURL is pressed
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
} else {
// when keycode QMKURL is released
}
break;
}
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}
@@ -0,0 +1 @@
# The default keymap for kbd67
@@ -0,0 +1,17 @@
/* Copyright 2019 Daisuke Kobayashi
*
* 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
@@ -0,0 +1,61 @@
/* Copyright 2019 Daisuke Kobayashi
*
* 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/>.
*/
#include QMK_KEYBOARD_H
#include "keymap_jp.h"
#define RGB_RMO RGB_RMOD
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap (Base Layer) Default Layer
* ,----------------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^| \|BS |Del |
* |----------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Ent |PgUp|
* |------------------------------------------------------. |----|
* |H/Z | A| S| D| F| G| H| J| K| L| ;| :| ]| |PgDn|
* |----------------------------------------------------------------|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PScr|
* |----------------------------------------------------------------|
* |Ctrl|Win |Alt | Space |Fn | Space |Alt |Ctrl| |Lef|Dow|Rig |
* `------------------------------------------------' `------------'
*/
[0] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, KC_JYEN, KC_BSPC, KC_DELT, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, JP_RBRC, KC_PGUP, \
KC_ZKHK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, KC_PGDN, \
KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PSCR, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap Fn Layer
* ,----------------------------------------------------------------.
* |Rst| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |Ins |
* |----------------------------------------------------------------|
* | |M- |M+ |RGB|H- |H+ | | |Prt|SLk|Pau| | | | |
* |------------------------------------------------------. |----|
* |Caps |Vo-|Vo+|Mut|S- |S+ | *| /|Hom|PUp| | | | | |
* |----------------------------------------------------------------|
* | |BL-|BL+|BL |V- |V+ | +| -|End|PDn| _| |PUp| |
* |----------------------------------------------------------------|
* | | | | Muhenkan | | Henkan |Kana|Menu| |Hom|PDn|End |
* `------------------------------------------------' `------------'
*/
[1] = LAYOUT_all(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,_______,KC_INS, \
_______, RGB_RMO,RGB_MOD,RGB_TOG,RGB_HUD,RGB_HUI,XXXXXXX,XXXXXXX,KC_PSCR,KC_SLCK,KC_PAUS,XXXXXXX,XXXXXXX,XXXXXXX, _______, \
KC_CAPS, KC_VOLD,KC_VOLU,KC_MUTE,RGB_SAD,RGB_SAI,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,XXXXXXX,XXXXXXX, KC_PENT, _______, \
_______,_______,BL_DEC, BL_INC, BL_TOGG,RGB_VAD,RGB_VAI,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,JP_UNDS,_______, KC_PGUP,_______, \
_______,_______,_______, KC_MHEN, _______, KC_HENK, KC_KANA,KC_APP, _______,KC_HOME,KC_PGDN,KC_END),
};
@@ -0,0 +1,7 @@
# Koba's keymap for KBD67
![keyboard-layout](https://user-images.githubusercontent.com/1042121/54736578-244ffe80-4bef-11e9-9882-37611b4efdf4.png)
- JIS layout.
- Fn layer is arranged like HHKB.
- 3 splitted space bar. (Space-Fn-Space)
+13
View File
@@ -0,0 +1,13 @@
# KBD67 rev2
65% pcb with blocker. Revision 2 (Manufactured after 05/01/19).
Keyboard Maintainer: [Vorror](https://github.com/vorror)
Hardware Supported: KBD67v2 PCB (Sometimes sold under the name "KBD65")
Hardware Availability: KBDFans [Keyboard Kit](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit), [PCB](https://kbdfans.cn/collections/65/products/kbd65-65-custom-mechanical-keyboard-pcb)
Make example for this keyboard (after setting up your build environment):
make kbdfans/kbd67/rev2:default
See 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).
+42
View File
@@ -0,0 +1,42 @@
/* Copyright 2019 Vorror
*
* 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/>.
*/
#include "rev2.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
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);
}
+57
View File
@@ -0,0 +1,57 @@
/* Copyright 2018 MechMerlin
*
* 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 "quantum.h"
/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT_all( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \
K40, K41, K43, K44, K46, K48, K4A, K4B, K4C, K4D, K4E, K4F \
) \
{ \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \
{ K40, K41, KC_NO, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \
}
#define LAYOUT_65_ansi( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \
K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E, K4F \
) \
{ \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \
{ K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \
}
+82
View File
@@ -0,0 +1,82 @@
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# atmega32a bootloadHID
BOOTLOADER = atmel-dfu
# If you don't know the bootloader type, then you can specify the
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
LAYOUTS = 65_ansi
@@ -1,5 +1,4 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
extern bool g_suspend_state;
enum ctrl_layers { enum ctrl_layers {
_QWERTY, _QWERTY,
@@ -31,7 +30,6 @@ enum ctrl_keycodes {
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
#define LT_CAPS LT(_NAV, KC_CAPS) #define LT_CAPS LT(_NAV, KC_CAPS)
#define _V_V_V_ KC_TRNS #define _V_V_V_ KC_TRNS
extern rgb_config_t rgb_matrix_config;
extern bool autoshift_enabled; extern bool autoshift_enabled;
-4
View File
@@ -224,10 +224,6 @@ bool music_mask_user(uint16_t keycode) {
} }
} }
#ifdef RGB_MATRIX_ENABLE
extern led_config_t g_led_config;
#endif
void rgb_matrix_indicators_user(void) { void rgb_matrix_indicators_user(void) {
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
switch (biton32(layer_state)) { switch (biton32(layer_state)) {
+1 -1
View File
@@ -39,7 +39,7 @@
#define DRIVER_COUNT 2 #define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 25 #define DRIVER_1_LED_TOTAL 25
#define DRIVER_2_LED_TOTAL 24 #define DRIVER_2_LED_TOTAL 24
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#endif #endif
-1
View File
@@ -92,7 +92,6 @@ static void render_logo(void) {
oled_write_P(sol_logo, false); oled_write_P(sol_logo, false);
} }
extern rgb_config_t rgb_matrix_config;
static void render_status(void) { static void render_status(void) {
// Render to mode icon // Render to mode icon
@@ -17,33 +17,33 @@
#include "stanrc85.h" #include "stanrc85.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_ansi( [0] = LAYOUT_60_ansi(
TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL), KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL),
[1] = LAYOUT_60_ansi( [1] = LAYOUT_60_ansi(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL),
[2] = LAYOUT_60_ansi( [2] = LAYOUT_60_ansi(
KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
_______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, KC_INS, _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS,
KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
_______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______), _______, _______, _______, _______, _______, _______, _______, _______),
[3] = LAYOUT_60_ansi( [3] = LAYOUT_60_ansi(
_______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______) _______, _______, _______, _______, _______, _______, _______, TG(1))
}; };
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
@@ -24,10 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define UC(x) KC_NO # define UC(x) KC_NO
#endif #endif
#ifdef RGB_MATRIX_ENABLE
extern bool g_suspend_state;
extern rgb_config_t rgb_matrix_config;
#endif
extern userspace_config_t userspace_config; extern userspace_config_t userspace_config;
enum more_custom_keycodes { enum more_custom_keycodes {
@@ -403,7 +399,6 @@ void suspend_wakeup_init_keymap(void) {
rgb_matrix_set_suspend_state(false); rgb_matrix_set_suspend_state(false);
} }
extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
@@ -17,10 +17,6 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#include "drashna.h" #include "drashna.h"
#ifdef RGB_MATRIX_ENABLE
extern bool g_suspend_state;
extern rgb_config_t rgb_matrix_config;
#endif
#ifdef RGBLIGHT_ENABLE #ifdef RGBLIGHT_ENABLE
extern rgblight_config_t rgblight_config; extern rgblight_config_t rgblight_config;
#endif #endif
@@ -184,7 +180,6 @@ void suspend_wakeup_init_keymap(void) {
rgb_matrix_set_suspend_state(false); rgb_matrix_set_suspend_state(false);
} }
extern led_config_t g_led_config;
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
for (int i = 0; i < DRIVER_LED_TOTAL; i++) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
+1 -1
View File
@@ -258,7 +258,7 @@ bool process_record_quantum(keyrecord_t *record) {
#ifdef HAPTIC_ENABLE #ifdef HAPTIC_ENABLE
process_haptic(keycode, record) && process_haptic(keycode, record) &&
#endif //HAPTIC_ENABLE #endif //HAPTIC_ENABLE
#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_KEYREACTIVE_ENABLED) #if defined(RGB_MATRIX_ENABLE)
process_rgb_matrix(keycode, record) && process_rgb_matrix(keycode, record) &&
#endif #endif
process_record_kb(keycode, record) && process_record_kb(keycode, record) &&
+24 -172
View File
@@ -26,41 +26,23 @@
#include "lib/lib8tion/lib8tion.h" #include "lib/lib8tion/lib8tion.h"
#include "rgb_matrix_animations/solid_color_anim.h" // ------------------------------------------
#include "rgb_matrix_animations/alpha_mods_anim.h" // -----Begin rgb effect includes macros-----
#include "rgb_matrix_animations/dual_beacon_anim.h" #define RGB_MATRIX_EFFECT(name)
#include "rgb_matrix_animations/gradient_up_down_anim.h" #define RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#include "rgb_matrix_animations/raindrops_anim.h"
#include "rgb_matrix_animations/cycle_all_anim.h"
#include "rgb_matrix_animations/cycle_left_right_anim.h"
#include "rgb_matrix_animations/cycle_up_down_anim.h"
#include "rgb_matrix_animations/rainbow_beacon_anim.h"
#include "rgb_matrix_animations/rainbow_pinwheels_anim.h"
#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h"
#include "rgb_matrix_animations/jellybean_raindrops_anim.h"
#include "rgb_matrix_animations/typing_heatmap_anim.h"
#include "rgb_matrix_animations/digital_rain_anim.h"
#include "rgb_matrix_animations/solid_reactive_simple_anim.h"
#include "rgb_matrix_animations/solid_reactive_anim.h"
#include "rgb_matrix_animations/solid_reactive_wide.h"
#include "rgb_matrix_animations/solid_reactive_cross.h"
#include "rgb_matrix_animations/solid_reactive_nexus.h"
#include "rgb_matrix_animations/splash_anim.h"
#include "rgb_matrix_animations/solid_splash_anim.h"
#include "rgb_matrix_animations/breathing_anim.h"
#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER) #include "rgb_matrix_animations/rgb_matrix_effects.inc"
#define RGB_MATRIX_CUSTOM_EFFECT_IMPLS #ifdef RGB_MATRIX_CUSTOM_KB
#define RGB_MATRIX_EFFECT(name, ...) #include "rgb_matrix_kb.inc"
#ifdef RGB_MATRIX_CUSTOM_KB
#include "rgb_matrix_kb.inc"
#endif
#ifdef RGB_MATRIX_CUSTOM_USER
#include "rgb_matrix_user.inc"
#endif
#undef RGB_MATRIX_EFFECT
#undef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif #endif
#ifdef RGB_MATRIX_CUSTOM_USER
#include "rgb_matrix_user.inc"
#endif
#undef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#undef RGB_MATRIX_EFFECT
// -----End rgb effect includes macros-------
// ------------------------------------------
#ifndef RGB_DISABLE_AFTER_TIMEOUT #ifndef RGB_DISABLE_AFTER_TIMEOUT
#define RGB_DISABLE_AFTER_TIMEOUT 0 #define RGB_DISABLE_AFTER_TIMEOUT 0
@@ -106,7 +88,6 @@
bool g_suspend_state = false; bool g_suspend_state = false;
extern led_config_t g_led_config;
rgb_config_t rgb_matrix_config; rgb_config_t rgb_matrix_config;
rgb_counters_t g_rgb_counters; rgb_counters_t g_rgb_counters;
@@ -319,145 +300,14 @@ static void rgb_task_render(uint8_t effect) {
rendering = rgb_matrix_none(&rgb_effect_params); rendering = rgb_matrix_none(&rgb_effect_params);
break; break;
case RGB_MATRIX_SOLID_COLOR: // ---------------------------------------------
rendering = rgb_matrix_solid_color(&rgb_effect_params); // Max 1ms Avg 0ms // -----Begin rgb effect switch case macros-----
#define RGB_MATRIX_EFFECT(name, ...) \
case RGB_MATRIX_##name: \
rendering = name(&rgb_effect_params); \
break; break;
#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS #include "rgb_matrix_animations/rgb_matrix_effects.inc"
case RGB_MATRIX_ALPHAS_MODS: #undef RGB_MATRIX_EFFECT
rendering = rgb_matrix_alphas_mods(&rgb_effect_params); // Max 2ms Avg 1ms
break;
#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS
#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
case RGB_MATRIX_GRADIENT_UP_DOWN:
rendering = rgb_matrix_gradient_up_down(&rgb_effect_params); // Max 4ms Avg 3ms
break;
#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#ifndef DISABLE_RGB_MATRIX_BREATHING
case RGB_MATRIX_BREATHING:
rendering = rgb_matrix_breathing(&rgb_effect_params); // Max 1ms Avg 0ms
break;
#endif // DISABLE_RGB_MATRIX_BREATHING
#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
case RGB_MATRIX_CYCLE_ALL:
rendering = rgb_matrix_cycle_all(&rgb_effect_params); // Max 4ms Avg 3ms
break;
#endif // DISABLE_RGB_MATRIX_CYCLE_ALL
#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
case RGB_MATRIX_CYCLE_LEFT_RIGHT:
rendering = rgb_matrix_cycle_left_right(&rgb_effect_params); // Max 4ms Avg 3ms
break;
#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
case RGB_MATRIX_CYCLE_UP_DOWN:
rendering = rgb_matrix_cycle_up_down(&rgb_effect_params); // Max 4ms Avg 3ms
break;
#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
case RGB_MATRIX_RAINBOW_MOVING_CHEVRON:
rendering = rgb_matrix_rainbow_moving_chevron(&rgb_effect_params); // Max 4ms Avg 3ms
break;
#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
case RGB_MATRIX_DUAL_BEACON:
rendering = rgb_matrix_dual_beacon(&rgb_effect_params); // Max 4ms Avg 3ms
break;
#endif // DISABLE_RGB_MATRIX_DUAL_BEACON
#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
case RGB_MATRIX_RAINBOW_BEACON:
rendering = rgb_matrix_rainbow_beacon(&rgb_effect_params); // Max 4ms Avg 3ms
break;
#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON
#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
case RGB_MATRIX_RAINBOW_PINWHEELS:
rendering = rgb_matrix_rainbow_pinwheels(&rgb_effect_params); // Max 4ms Avg 3ms
break;
#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
#ifndef DISABLE_RGB_MATRIX_RAINDROPS
case RGB_MATRIX_RAINDROPS:
rendering = rgb_matrix_raindrops(&rgb_effect_params); // Max 1ms Avg 0ms
break;
#endif // DISABLE_RGB_MATRIX_RAINDROPS
#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
case RGB_MATRIX_JELLYBEAN_RAINDROPS:
rendering = rgb_matrix_jellybean_raindrops(&rgb_effect_params); // Max 1ms Avg 0ms
break;
#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
#ifndef DISABLE_RGB_MATRIX_TYPING_HEATMAP
case RGB_MATRIX_TYPING_HEATMAP:
rendering = rgb_matrix_typing_heatmap(&rgb_effect_params); // Max 4ms Avg 3ms
break;
#endif // DISABLE_RGB_MATRIX_TYPING_HEATMAP
#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN
case RGB_MATRIX_DIGITAL_RAIN:
rendering = rgb_matrix_digital_rain(&rgb_effect_params); // Max 9ms Avg 8ms | this is expensive, fix it
break;
#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN
#endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
case RGB_MATRIX_SOLID_REACTIVE_SIMPLE:
rendering = rgb_matrix_solid_reactive_simple(&rgb_effect_params);// Max 4ms Avg 3ms
break;
#endif
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE
case RGB_MATRIX_SOLID_REACTIVE:
rendering = rgb_matrix_solid_reactive(&rgb_effect_params); // Max 4ms Avg 3ms
break;
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
case RGB_MATRIX_SOLID_REACTIVE_WIDE:
rendering = rgb_matrix_solid_reactive_wide(&rgb_effect_params); // Max ?? ms Avg ?? ms
break;
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
case RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE:
rendering = rgb_matrix_solid_reactive_multiwide(&rgb_effect_params); // Max ?? ms Avg ?? ms
break;
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
case RGB_MATRIX_SOLID_REACTIVE_CROSS:
rendering = rgb_matrix_solid_reactive_cross(&rgb_effect_params); // Max ?? ms Avg ?? ms
break;
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
case RGB_MATRIX_SOLID_REACTIVE_MULTICROSS:
rendering = rgb_matrix_solid_reactive_multicross(&rgb_effect_params); // Max ?? ms Avg ?? ms
break;
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
case RGB_MATRIX_SOLID_REACTIVE_NEXUS:
rendering = rgb_matrix_solid_reactive_nexus(&rgb_effect_params); // Max ?? ms Avg ?? ms
break;
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
case RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS:
rendering = rgb_matrix_solid_reactive_multinexus(&rgb_effect_params); // Max ?? ms Avg ?? ms
break;
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#ifndef DISABLE_RGB_MATRIX_SPLASH
case RGB_MATRIX_SPLASH:
rendering = rgb_matrix_splash(&rgb_effect_params); // Max 5ms Avg 3ms
break;
#endif // DISABLE_RGB_MATRIX_SPLASH
#ifndef DISABLE_RGB_MATRIX_MULTISPLASH
case RGB_MATRIX_MULTISPLASH:
rendering = rgb_matrix_multisplash(&rgb_effect_params); // Max 10ms Avg 5ms
break;
#endif // DISABLE_RGB_MATRIX_MULTISPLASH
#ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH
case RGB_MATRIX_SOLID_SPLASH:
rendering = rgb_matrix_solid_splash(&rgb_effect_params); // Max 5ms Avg 3ms
break;
#endif // DISABLE_RGB_MATRIX_SOLID_SPLASH
#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
case RGB_MATRIX_SOLID_MULTISPLASH:
rendering = rgb_matrix_solid_multisplash(&rgb_effect_params); // Max 10ms Avg 5ms
break;
#endif // DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER) #if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
#define RGB_MATRIX_EFFECT(name, ...) \ #define RGB_MATRIX_EFFECT(name, ...) \
@@ -472,6 +322,8 @@ static void rgb_task_render(uint8_t effect) {
#endif #endif
#undef RGB_MATRIX_EFFECT #undef RGB_MATRIX_EFFECT
#endif #endif
// -----End rgb effect switch case macros-------
// ---------------------------------------------
// Factory default magic value // Factory default magic value
case UINT8_MAX: { case UINT8_MAX: {
+20 -83
View File
@@ -64,89 +64,12 @@ typedef struct
enum rgb_matrix_effects { enum rgb_matrix_effects {
RGB_MATRIX_NONE = 0, RGB_MATRIX_NONE = 0,
RGB_MATRIX_SOLID_COLOR = 1,
#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS // --------------------------------------
RGB_MATRIX_ALPHAS_MODS, // -----Begin rgb effect enum macros-----
#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS #define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_##name,
#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #include "rgb_matrix_animations/rgb_matrix_effects.inc"
RGB_MATRIX_GRADIENT_UP_DOWN, #undef RGB_MATRIX_EFFECT
#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#ifndef DISABLE_RGB_MATRIX_BREATHING
RGB_MATRIX_BREATHING,
#endif // DISABLE_RGB_MATRIX_BREATHING
#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
RGB_MATRIX_CYCLE_ALL,
#endif // DISABLE_RGB_MATRIX_CYCLE_ALL
#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
RGB_MATRIX_CYCLE_LEFT_RIGHT,
#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
RGB_MATRIX_CYCLE_UP_DOWN,
#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
RGB_MATRIX_RAINBOW_MOVING_CHEVRON,
#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
RGB_MATRIX_DUAL_BEACON,
#endif // DISABLE_RGB_MATRIX_DUAL_BEACON
#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
RGB_MATRIX_RAINBOW_BEACON,
#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON
#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
RGB_MATRIX_RAINBOW_PINWHEELS,
#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
#ifndef DISABLE_RGB_MATRIX_RAINDROPS
RGB_MATRIX_RAINDROPS,
#endif // DISABLE_RGB_MATRIX_RAINDROPS
#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
RGB_MATRIX_JELLYBEAN_RAINDROPS,
#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
#ifndef DISABLE_RGB_MATRIX_TYPING_HEATMAP
RGB_MATRIX_TYPING_HEATMAP,
#endif // DISABLE_RGB_MATRIX_TYPING_HEATMAP
#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN
RGB_MATRIX_DIGITAL_RAIN,
#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN
#endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
RGB_MATRIX_SOLID_REACTIVE_SIMPLE,
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE
RGB_MATRIX_SOLID_REACTIVE,
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
RGB_MATRIX_SOLID_REACTIVE_WIDE,
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE,
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
RGB_MATRIX_SOLID_REACTIVE_CROSS,
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
RGB_MATRIX_SOLID_REACTIVE_MULTICROSS,
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
RGB_MATRIX_SOLID_REACTIVE_NEXUS,
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS,
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#ifndef DISABLE_RGB_MATRIX_SPLASH
RGB_MATRIX_SPLASH,
#endif // DISABLE_RGB_MATRIX_SPLASH
#ifndef DISABLE_RGB_MATRIX_MULTISPLASH
RGB_MATRIX_MULTISPLASH,
#endif // DISABLE_RGB_MATRIX_MULTISPLASH
#ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH
RGB_MATRIX_SOLID_SPLASH,
#endif // DISABLE_RGB_MATRIX_SOLID_SPLASH
#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
RGB_MATRIX_SOLID_MULTISPLASH,
#endif // DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER) #if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER)
#define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_CUSTOM_##name, #define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_CUSTOM_##name,
@@ -158,6 +81,8 @@ enum rgb_matrix_effects {
#endif #endif
#undef RGB_MATRIX_EFFECT #undef RGB_MATRIX_EFFECT
#endif #endif
// --------------------------------------
// -----End rgb effect enum macros-------
RGB_MATRIX_EFFECT_MAX RGB_MATRIX_EFFECT_MAX
}; };
@@ -257,4 +182,16 @@ typedef struct {
extern const rgb_matrix_driver_t rgb_matrix_driver; extern const rgb_matrix_driver_t rgb_matrix_driver;
extern rgb_config_t rgb_matrix_config;
extern bool g_suspend_state;
extern rgb_counters_t g_rgb_counters;
extern led_config_t g_led_config;
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
extern last_hit_t g_last_hit_tracker;
#endif
#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
extern uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS];
#endif
#endif #endif
@@ -1,11 +1,9 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS #ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS
RGB_MATRIX_EFFECT(ALPHAS_MODS)
extern led_config_t g_led_config; #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern rgb_config_t rgb_matrix_config;
// alphas = color1, mods = color2 // alphas = color1, mods = color2
bool rgb_matrix_alphas_mods(effect_params_t* params) { bool ALPHAS_MODS(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val };
@@ -24,4 +22,5 @@ bool rgb_matrix_alphas_mods(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS #endif // DISABLE_RGB_MATRIX_ALPHAS_MODS
@@ -1,10 +1,8 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_BREATHING #ifndef DISABLE_RGB_MATRIX_BREATHING
RGB_MATRIX_EFFECT(BREATHING)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern rgb_counters_t g_rgb_counters; bool BREATHING(effect_params_t* params) {
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_breathing(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 8); uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 8);
@@ -18,4 +16,5 @@ bool rgb_matrix_breathing(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_BREATHING #endif // DISABLE_RGB_MATRIX_BREATHING
@@ -1,11 +1,8 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL #ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
RGB_MATRIX_EFFECT(CYCLE_ALL)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern rgb_counters_t g_rgb_counters; bool CYCLE_ALL(effect_params_t* params) {
extern led_config_t g_led_config;
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_cycle_all(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
@@ -18,4 +15,5 @@ bool rgb_matrix_cycle_all(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_CYCLE_ALL #endif // DISABLE_RGB_MATRIX_CYCLE_ALL
@@ -1,11 +1,8 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT #ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
RGB_MATRIX_EFFECT(CYCLE_LEFT_RIGHT)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern rgb_counters_t g_rgb_counters; bool CYCLE_LEFT_RIGHT(effect_params_t* params) {
extern led_config_t g_led_config;
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_cycle_left_right(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
@@ -19,4 +16,5 @@ bool rgb_matrix_cycle_left_right(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT #endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
@@ -0,0 +1,23 @@
#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN
RGB_MATRIX_EFFECT(CYCLE_OUT_IN)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
bool CYCLE_OUT_IN(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
int16_t dx = g_led_config.point[i].x - 112;
int16_t dy = g_led_config.point[i].y - 32;
uint8_t dist = sqrt16(dx * dx + dy * dy);
hsv.h = 3 * dist / 2 + time;
RGB rgb = hsv_to_rgb(hsv);
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
return led_max < DRIVER_LED_TOTAL;
}
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN
@@ -0,0 +1,23 @@
#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
RGB_MATRIX_EFFECT(CYCLE_OUT_IN_DUAL)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
bool CYCLE_OUT_IN_DUAL(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
for (uint8_t i = led_min; i < led_max; i++) {
RGB_MATRIX_TEST_LED_FLAGS();
int16_t dx = 56 - abs8(g_led_config.point[i].x - 112);
int16_t dy = g_led_config.point[i].y - 32;
uint8_t dist = sqrt16(dx * dx + dy * dy);
hsv.h = 3 * dist + time;
RGB rgb = hsv_to_rgb(hsv);
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
return led_max < DRIVER_LED_TOTAL;
}
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
@@ -1,11 +1,8 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN #ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
RGB_MATRIX_EFFECT(CYCLE_UP_DOWN)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern rgb_counters_t g_rgb_counters; bool CYCLE_UP_DOWN(effect_params_t* params) {
extern led_config_t g_led_config;
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_cycle_up_down(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
@@ -19,4 +16,5 @@ bool rgb_matrix_cycle_up_down(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN #endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
@@ -1,14 +1,13 @@
#pragma once
#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN) #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN)
RGB_MATRIX_EFFECT(DIGITAL_RAIN)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#ifndef RGB_DIGITAL_RAIN_DROPS #ifndef RGB_DIGITAL_RAIN_DROPS
// lower the number for denser effect/wider keyboard // lower the number for denser effect/wider keyboard
#define RGB_DIGITAL_RAIN_DROPS 24 #define RGB_DIGITAL_RAIN_DROPS 24
#endif #endif
extern uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; bool DIGITAL_RAIN(effect_params_t* params) {
bool rgb_matrix_digital_rain(effect_params_t* params) {
// algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain // algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain
const uint8_t drop_ticks = 28; const uint8_t drop_ticks = 28;
const uint8_t pure_green_intensity = 0xd0; const uint8_t pure_green_intensity = 0xd0;
@@ -19,7 +18,7 @@ bool rgb_matrix_digital_rain(effect_params_t* params) {
if (params->init) { if (params->init) {
rgb_matrix_set_color_all(0, 0, 0); rgb_matrix_set_color_all(0, 0, 0);
memset(rgb_frame_buffer, 0, sizeof rgb_frame_buffer); memset(rgb_frame_buffer, 0, sizeof(rgb_frame_buffer));
drop = 0; drop = 0;
} }
@@ -28,11 +27,11 @@ bool rgb_matrix_digital_rain(effect_params_t* params) {
if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) { if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) {
// top row, pixels have just fallen and we're // top row, pixels have just fallen and we're
// making a new rain drop in this column // making a new rain drop in this column
rgb_frame_buffer[col][row] = max_intensity; rgb_frame_buffer[row][col] = max_intensity;
} }
else if (rgb_frame_buffer[col][row] > 0 && rgb_frame_buffer[col][row] < max_intensity) { else if (rgb_frame_buffer[row][col] > 0 && rgb_frame_buffer[row][col] < max_intensity) {
// neither fully bright nor dark, decay it // neither fully bright nor dark, decay it
rgb_frame_buffer[col][row]--; rgb_frame_buffer[row][col]--;
} }
// set the pixel colour // set the pixel colour
uint8_t led[LED_HITS_TO_REMEMBER]; uint8_t led[LED_HITS_TO_REMEMBER];
@@ -40,12 +39,12 @@ bool rgb_matrix_digital_rain(effect_params_t* params) {
// TODO: multiple leds are supported mapped to the same row/column // TODO: multiple leds are supported mapped to the same row/column
if (led_count > 0) { if (led_count > 0) {
if (rgb_frame_buffer[col][row] > pure_green_intensity) { if (rgb_frame_buffer[row][col] > pure_green_intensity) {
const uint8_t boost = (uint8_t) ((uint16_t) max_brightness_boost * (rgb_frame_buffer[col][row] - pure_green_intensity) / (max_intensity - pure_green_intensity)); const uint8_t boost = (uint8_t) ((uint16_t) max_brightness_boost * (rgb_frame_buffer[row][col] - pure_green_intensity) / (max_intensity - pure_green_intensity));
rgb_matrix_set_color(led[0], boost, max_intensity, boost); rgb_matrix_set_color(led[0], boost, max_intensity, boost);
} }
else { else {
const uint8_t green = (uint8_t) ((uint16_t) max_intensity * rgb_frame_buffer[col][row] / pure_green_intensity); const uint8_t green = (uint8_t) ((uint16_t) max_intensity * rgb_frame_buffer[row][col] / pure_green_intensity);
rgb_matrix_set_color(led[0], 0, green, 0); rgb_matrix_set_color(led[0], 0, green, 0);
} }
} }
@@ -58,15 +57,15 @@ bool rgb_matrix_digital_rain(effect_params_t* params) {
for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) { for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) {
for (uint8_t col = 0; col < MATRIX_COLS; col++) { for (uint8_t col = 0; col < MATRIX_COLS; col++) {
// if ths is on the bottom row and bright allow decay // if ths is on the bottom row and bright allow decay
if (row == MATRIX_ROWS - 1 && rgb_frame_buffer[col][row] == max_intensity) { if (row == MATRIX_ROWS - 1 && rgb_frame_buffer[row][col] == max_intensity) {
rgb_frame_buffer[col][row]--; rgb_frame_buffer[row][col]--;
} }
// check if the pixel above is bright // check if the pixel above is bright
if (rgb_frame_buffer[col][row - 1] == max_intensity) { if (rgb_frame_buffer[row - 1][col] == max_intensity) {
// allow old bright pixel to decay // allow old bright pixel to decay
rgb_frame_buffer[col][row - 1]--; rgb_frame_buffer[row - 1][col]--;
// make this pixel bright // make this pixel bright
rgb_frame_buffer[col][row] = max_intensity; rgb_frame_buffer[row][col] = max_intensity;
} }
} }
} }
@@ -74,4 +73,5 @@ bool rgb_matrix_digital_rain(effect_params_t* params) {
return false; return false;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN) #endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN)
@@ -1,11 +1,8 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON #ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
RGB_MATRIX_EFFECT(DUAL_BEACON)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern rgb_counters_t g_rgb_counters; bool DUAL_BEACON(effect_params_t* params) {
extern led_config_t g_led_config;
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_dual_beacon(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
@@ -21,4 +18,5 @@ bool rgb_matrix_dual_beacon(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_DUAL_BEACON #endif // DISABLE_RGB_MATRIX_DUAL_BEACON
@@ -1,10 +1,8 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
RGB_MATRIX_EFFECT(GRADIENT_UP_DOWN)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern led_config_t g_led_config; bool GRADIENT_UP_DOWN(effect_params_t* params) {
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_gradient_up_down(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
@@ -19,4 +17,6 @@ bool rgb_matrix_gradient_up_down(effect_params_t* params) {
} }
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
@@ -1,9 +1,6 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS #ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS)
extern rgb_counters_t g_rgb_counters; #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern led_config_t g_led_config;
extern rgb_config_t rgb_matrix_config;
static void jellybean_raindrops_set_color(int i, effect_params_t* params) { static void jellybean_raindrops_set_color(int i, effect_params_t* params) {
if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
@@ -12,7 +9,7 @@ static void jellybean_raindrops_set_color(int i, effect_params_t* params) {
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
} }
bool rgb_matrix_jellybean_raindrops(effect_params_t* params) { bool JELLYBEAN_RAINDROPS(effect_params_t* params) {
if (!params->init) { if (!params->init) {
// Change one LED every tick, make sure speed is not 0 // Change one LED every tick, make sure speed is not 0
if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) { if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) {
@@ -28,4 +25,5 @@ bool rgb_matrix_jellybean_raindrops(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS #endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
@@ -1,11 +1,8 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON #ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
RGB_MATRIX_EFFECT(RAINBOW_BEACON)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern rgb_counters_t g_rgb_counters; bool RAINBOW_BEACON(effect_params_t* params) {
extern led_config_t g_led_config;
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_rainbow_beacon(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
@@ -21,4 +18,5 @@ bool rgb_matrix_rainbow_beacon(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON #endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON
@@ -1,11 +1,8 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON #ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
RGB_MATRIX_EFFECT(RAINBOW_MOVING_CHEVRON)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern rgb_counters_t g_rgb_counters; bool RAINBOW_MOVING_CHEVRON(effect_params_t* params) {
extern led_config_t g_led_config;
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
@@ -19,4 +16,5 @@ bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON #endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
@@ -1,11 +1,8 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS #ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
RGB_MATRIX_EFFECT(PINWHEELS)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern rgb_counters_t g_rgb_counters; bool PINWHEELS(effect_params_t* params) {
extern led_config_t g_led_config;
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val };
@@ -21,4 +18,5 @@ bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS #endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
@@ -1,10 +1,6 @@
#pragma once
#ifndef DISABLE_RGB_MATRIX_RAINDROPS #ifndef DISABLE_RGB_MATRIX_RAINDROPS
#include "rgb_matrix_types.h" RGB_MATRIX_EFFECT(RAINDROPS)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern rgb_counters_t g_rgb_counters;
extern led_config_t g_led_config;
extern rgb_config_t rgb_matrix_config;
static void raindrops_set_color(int i, effect_params_t* params) { static void raindrops_set_color(int i, effect_params_t* params) {
if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
@@ -23,7 +19,7 @@ static void raindrops_set_color(int i, effect_params_t* params) {
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
} }
bool rgb_matrix_raindrops(effect_params_t* params) { bool RAINDROPS(effect_params_t* params) {
if (!params->init) { if (!params->init) {
// Change one LED every tick, make sure speed is not 0 // Change one LED every tick, make sure speed is not 0
if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) { if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) {
@@ -39,4 +35,5 @@ bool rgb_matrix_raindrops(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_RAINDROPS #endif // DISABLE_RGB_MATRIX_RAINDROPS
@@ -0,0 +1,25 @@
// Add your new core rgb matrix effect here, order determins enum order, requires "rgb_matrix_animations/ directory
#include "rgb_matrix_animations/solid_color_anim.h"
#include "rgb_matrix_animations/alpha_mods_anim.h"
#include "rgb_matrix_animations/gradient_up_down_anim.h"
#include "rgb_matrix_animations/breathing_anim.h"
#include "rgb_matrix_animations/cycle_all_anim.h"
#include "rgb_matrix_animations/cycle_left_right_anim.h"
#include "rgb_matrix_animations/cycle_up_down_anim.h"
#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h"
#include "rgb_matrix_animations/cycle_out_in_anim.h"
#include "rgb_matrix_animations/cycle_out_in_dual_anim.h"
#include "rgb_matrix_animations/dual_beacon_anim.h"
#include "rgb_matrix_animations/rainbow_beacon_anim.h"
#include "rgb_matrix_animations/rainbow_pinwheels_anim.h"
#include "rgb_matrix_animations/raindrops_anim.h"
#include "rgb_matrix_animations/jellybean_raindrops_anim.h"
#include "rgb_matrix_animations/typing_heatmap_anim.h"
#include "rgb_matrix_animations/digital_rain_anim.h"
#include "rgb_matrix_animations/solid_reactive_simple_anim.h"
#include "rgb_matrix_animations/solid_reactive_anim.h"
#include "rgb_matrix_animations/solid_reactive_wide.h"
#include "rgb_matrix_animations/solid_reactive_cross.h"
#include "rgb_matrix_animations/solid_reactive_nexus.h"
#include "rgb_matrix_animations/splash_anim.h"
#include "rgb_matrix_animations/solid_splash_anim.h"
@@ -1,9 +1,7 @@
#pragma once RGB_MATRIX_EFFECT(SOLID_COLOR)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern led_config_t g_led_config; bool SOLID_COLOR(effect_params_t* params) {
extern rgb_config_t rgb_matrix_config;
bool rgb_matrix_solid_color(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val };
@@ -14,3 +12,5 @@ bool rgb_matrix_solid_color(effect_params_t* params) {
} }
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
@@ -1,12 +1,9 @@
#pragma once #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED)
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE
RGB_MATRIX_EFFECT(SOLID_REACTIVE)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern led_config_t g_led_config; bool SOLID_REACTIVE(effect_params_t* params) {
extern rgb_config_t rgb_matrix_config;
extern last_hit_t g_last_hit_tracker;
bool rgb_matrix_solid_reactive(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { rgb_matrix_config.hue, 255, rgb_matrix_config.val }; HSV hsv = { rgb_matrix_config.hue, 255, rgb_matrix_config.val };
@@ -32,5 +29,6 @@ bool rgb_matrix_solid_reactive(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) #endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
@@ -1,10 +1,15 @@
#pragma once
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS)
extern led_config_t g_led_config; #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
extern rgb_config_t rgb_matrix_config; RGB_MATRIX_EFFECT(SOLID_REACTIVE_CROSS)
extern last_hit_t g_last_hit_tracker; #endif
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS)
#endif
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
static bool rgb_matrix_solid_reactive_multicross_range(uint8_t start, effect_params_t* params) { static bool rgb_matrix_solid_reactive_multicross_range(uint8_t start, effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
@@ -38,13 +43,14 @@ static bool rgb_matrix_solid_reactive_multicross_range(uint8_t start, effect_par
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
bool rgb_matrix_solid_reactive_multicross(effect_params_t* params) { bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) {
return rgb_matrix_solid_reactive_multicross_range(0, params); return rgb_matrix_solid_reactive_multicross_range(0, params);
} }
bool rgb_matrix_solid_reactive_cross(effect_params_t* params) { bool SOLID_REACTIVE_CROSS(effect_params_t* params) {
return rgb_matrix_solid_reactive_multicross_range(qsub8(g_last_hit_tracker.count, 1), params); return rgb_matrix_solid_reactive_multicross_range(qsub8(g_last_hit_tracker.count, 1), params);
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) #endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS)
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED #endif // RGB_MATRIX_KEYREACTIVE_ENABLED
@@ -1,10 +1,15 @@
#pragma once
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS)
extern led_config_t g_led_config; #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
extern rgb_config_t rgb_matrix_config; RGB_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS)
extern last_hit_t g_last_hit_tracker; #endif
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS)
#endif
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
static bool rgb_matrix_solid_reactive_multinexus_range(uint8_t start, effect_params_t* params) { static bool rgb_matrix_solid_reactive_multinexus_range(uint8_t start, effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
@@ -36,13 +41,14 @@ static bool rgb_matrix_solid_reactive_multinexus_range(uint8_t start, effect_par
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
bool rgb_matrix_solid_reactive_multinexus(effect_params_t* params) { bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) {
return rgb_matrix_solid_reactive_multinexus_range(0, params); return rgb_matrix_solid_reactive_multinexus_range(0, params);
} }
bool rgb_matrix_solid_reactive_nexus(effect_params_t* params) { bool SOLID_REACTIVE_NEXUS(effect_params_t* params) {
return rgb_matrix_solid_reactive_multinexus_range(qsub8(g_last_hit_tracker.count, 1), params); return rgb_matrix_solid_reactive_multinexus_range(qsub8(g_last_hit_tracker.count, 1), params);
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) #endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS)
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED #endif // RGB_MATRIX_KEYREACTIVE_ENABLED
@@ -1,12 +1,9 @@
#pragma once
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern led_config_t g_led_config; bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) {
extern rgb_config_t rgb_matrix_config;
extern last_hit_t g_last_hit_tracker;
bool rgb_matrix_solid_reactive_simple(effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 };
@@ -31,5 +28,6 @@ bool rgb_matrix_solid_reactive_simple(effect_params_t* params) {
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE #endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED #endif // RGB_MATRIX_KEYREACTIVE_ENABLED
@@ -1,10 +1,15 @@
#pragma once
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE)
extern led_config_t g_led_config; #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
extern rgb_config_t rgb_matrix_config; RGB_MATRIX_EFFECT(SOLID_REACTIVE_WIDE)
extern last_hit_t g_last_hit_tracker; #endif
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE)
#endif
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
static bool rgb_matrix_solid_reactive_multiwide_range(uint8_t start, effect_params_t* params) { static bool rgb_matrix_solid_reactive_multiwide_range(uint8_t start, effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
@@ -30,13 +35,14 @@ static bool rgb_matrix_solid_reactive_multiwide_range(uint8_t start, effect_para
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
bool rgb_matrix_solid_reactive_multiwide(effect_params_t* params) { bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) {
return rgb_matrix_solid_reactive_multiwide_range(0, params); return rgb_matrix_solid_reactive_multiwide_range(0, params);
} }
bool rgb_matrix_solid_reactive_wide(effect_params_t* params) { bool SOLID_REACTIVE_WIDE(effect_params_t* params) {
return rgb_matrix_solid_reactive_multiwide_range(qsub8(g_last_hit_tracker.count, 1), params); return rgb_matrix_solid_reactive_multiwide_range(qsub8(g_last_hit_tracker.count, 1), params);
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) #endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE)
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED #endif // RGB_MATRIX_KEYREACTIVE_ENABLED
@@ -1,10 +1,15 @@
#pragma once
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH) #if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH)
extern led_config_t g_led_config; #ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH
extern rgb_config_t rgb_matrix_config; RGB_MATRIX_EFFECT(SOLID_SPLASH)
extern last_hit_t g_last_hit_tracker; #endif
#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
RGB_MATRIX_EFFECT(SOLID_MULTISPLASH)
#endif
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
static bool rgb_matrix_solid_multisplash_range(uint8_t start, effect_params_t* params) { static bool rgb_matrix_solid_multisplash_range(uint8_t start, effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
@@ -30,13 +35,14 @@ static bool rgb_matrix_solid_multisplash_range(uint8_t start, effect_params_t* p
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
bool rgb_matrix_solid_multisplash(effect_params_t* params) { bool SOLID_MULTISPLASH(effect_params_t* params) {
return rgb_matrix_solid_multisplash_range(0, params); return rgb_matrix_solid_multisplash_range(0, params);
} }
bool rgb_matrix_solid_splash(effect_params_t* params) { bool SOLID_SPLASH(effect_params_t* params) {
return rgb_matrix_solid_multisplash_range(qsub8(g_last_hit_tracker.count, 1), params); return rgb_matrix_solid_multisplash_range(qsub8(g_last_hit_tracker.count, 1), params);
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // !defined(DISABLE_RGB_MATRIX_SPLASH) && !defined(DISABLE_RGB_MATRIX_MULTISPLASH) #endif // !defined(DISABLE_RGB_MATRIX_SPLASH) && !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED #endif // RGB_MATRIX_KEYREACTIVE_ENABLED
+13 -6
View File
@@ -1,10 +1,16 @@
#pragma once
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
#if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) #if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
extern led_config_t g_led_config; #ifndef DISABLE_RGB_MATRIX_SPLASH
extern rgb_config_t rgb_matrix_config; RGB_MATRIX_EFFECT(SPLASH)
extern last_hit_t g_last_hit_tracker; #endif
#ifndef DISABLE_RGB_MATRIX_MULTISPLASH
RGB_MATRIX_EFFECT(MULTISPLASH)
#endif
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
static bool rgb_matrix_multisplash_range(uint8_t start, effect_params_t* params) { static bool rgb_matrix_multisplash_range(uint8_t start, effect_params_t* params) {
RGB_MATRIX_USE_LIMITS(led_min, led_max); RGB_MATRIX_USE_LIMITS(led_min, led_max);
@@ -32,13 +38,14 @@ static bool rgb_matrix_multisplash_range(uint8_t start, effect_params_t* params)
return led_max < DRIVER_LED_TOTAL; return led_max < DRIVER_LED_TOTAL;
} }
bool rgb_matrix_multisplash(effect_params_t* params) { bool MULTISPLASH(effect_params_t* params) {
return rgb_matrix_multisplash_range(0, params); return rgb_matrix_multisplash_range(0, params);
} }
bool rgb_matrix_splash(effect_params_t* params) { bool SPLASH(effect_params_t* params) {
return rgb_matrix_multisplash_range(qsub8(g_last_hit_tracker.count, 1), params); return rgb_matrix_multisplash_range(qsub8(g_last_hit_tracker.count, 1), params);
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) #endif // !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH)
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED #endif // RGB_MATRIX_KEYREACTIVE_ENABLED
@@ -1,8 +1,6 @@
#pragma once
#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP)
RGB_MATRIX_EFFECT(TYPING_HEATMAP)
extern rgb_config_t rgb_matrix_config; #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
extern uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS];
void process_rgb_matrix_typing_heatmap(keyrecord_t *record) { void process_rgb_matrix_typing_heatmap(keyrecord_t *record) {
uint8_t row = record->event.key.row; uint8_t row = record->event.key.row;
@@ -35,7 +33,7 @@ void process_rgb_matrix_typing_heatmap(keyrecord_t *record) {
} }
} }
bool rgb_matrix_typing_heatmap(effect_params_t* params) { bool TYPING_HEATMAP(effect_params_t* params) {
// Modified version of RGB_MATRIX_USE_LIMITS to work off of matrix row / col size // Modified version of RGB_MATRIX_USE_LIMITS to work off of matrix row / col size
uint8_t led_min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; uint8_t led_min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter;
uint8_t led_max = led_min + RGB_MATRIX_LED_PROCESS_LIMIT; uint8_t led_max = led_min + RGB_MATRIX_LED_PROCESS_LIMIT;
@@ -72,4 +70,5 @@ bool rgb_matrix_typing_heatmap(effect_params_t* params) {
return led_max < sizeof(rgb_frame_buffer); return led_max < sizeof(rgb_frame_buffer);
} }
#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) #endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP)
-3
View File
@@ -27,8 +27,6 @@ led_instruction_t led_instructions[] = { { .end = 1 } };
static void led_matrix_massdrop_config_override(int i); static void led_matrix_massdrop_config_override(int i);
#endif // USE_MASSDROP_CONFIGURATOR #endif // USE_MASSDROP_CONFIGURATOR
extern rgb_config_t rgb_matrix_config;
extern rgb_counters_t g_rgb_counters;
void SERCOM1_0_Handler( void ) void SERCOM1_0_Handler( void )
{ {
@@ -431,7 +429,6 @@ static void led_run_pattern(led_setup_t *f, float* ro, float* go, float* bo, flo
} }
} }
extern led_config_t g_led_config;
static void led_matrix_massdrop_config_override(int i) static void led_matrix_massdrop_config_override(int i)
{ {
float ro = 0; float ro = 0;
-2
View File
@@ -5,8 +5,6 @@
#if defined(RGBLIGHT_ENABLE) #if defined(RGBLIGHT_ENABLE)
extern rgblight_config_t rgblight_config; extern rgblight_config_t rgblight_config;
bool has_initialized; bool has_initialized;
#elif defined(RGB_MATRIX_ENABLE)
extern rgb_config_t rgb_matrix_config;
#endif #endif
#ifdef RGBLIGHT_ENABLE #ifdef RGBLIGHT_ENABLE
+1 -1
View File
@@ -5,7 +5,7 @@ void matrix_init_user(void) {
}; };
uint32_t layer_state_set_user(uint32_t state) { uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) { switch (biton32(state)) {
case 0: case 0:
rgblight_setrgb (0xFF, 0x00, 0x00); rgblight_setrgb (0xFF, 0x00, 0x00);
break; break;
+2 -2
View File
@@ -45,8 +45,8 @@ void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) {
} }
qk_tap_dance_action_t tap_dance_actions[] = { qk_tap_dance_action_t tap_dance_actions[] = {
[TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK),
[TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV), [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV),
[TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctl_copy_finished, ctl_copy_reset) [TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctl_copy_finished, ctl_copy_reset)
}; };
+1 -1
View File
@@ -20,7 +20,7 @@
#define TD_TCTL TD(TD_RCTL) #define TD_TCTL TD(TD_RCTL)
enum cust_keys { enum cust_keys {
KC_MAKE = SAFE_RANGE, KC_MAKE = SAFE_RANGE,
KC_RDP KC_RDP
}; };