No description
Find a file
Takeshi ISHII dbbab40981
Refactor rgblight_reconfig.h (#7773)
* Moved contents of rgblight_reconfig.h to rgblight_post_config.h.

In #3582, rgblight_reconfig.h had to be newly created. Now, the build system of qmk_firmware has a post_cofig feature, so that what was done in rgblight_reconfig.h can now be realized in rgblight_post_config.h.

**This commit does not change the build result.**

Testing script
```shell
  # build on master
  git checkout master
  echo master > /tmp/master_md5.txt

  # RGBLIGHT_ENABLE = no
  make HELIX=verbose helix/rev2:default:clean
  make HELIX=verbose helix/rev2:default
  md5 helix_rev2_default.hex >> /tmp/master_md5.txt

  # RGBLIGHT_ENABLE = yes, with animations
  make HELIX=verbose helix/rev2/back:default:clean
  make HELIX=verbose helix/rev2/back:default
  md5 helix_rev2_back_default.hex >> /tmp/master_md5.txt

  # RGBLIGHT_ENABLE = yes, without animations
  make HELIX=verbose,no_ani helix/rev2/back:default:clean
  make HELIX=verbose,no_ani helix/rev2/back:default
  md5 helix_rev2_back_default.hex >> /tmp/master_md5.txt

  # build on refactor_rgblight_reconfig.h
  git checkout refactor_rgblight_reconfig.h
  echo refactor_rgblight_reconfig.h > /tmp/branch_md5.txt

  # RGBLIGHT_ENABLE = no
  make HELIX=verbose helix/rev2:default:clean
  make HELIX=verbose helix/rev2:default
  md5 helix_rev2_default.hex >> /tmp/branch_md5.txt

  # RGBLIGHT_ENABLE = yes, with animations
  make HELIX=verbose helix/rev2/back:default:clean
  make HELIX=verbose helix/rev2/back:default
  md5 helix_rev2_back_default.hex >> /tmp/branch_md5.txt

  # RGBLIGHT_ENABLE = yes, without animations
  make HELIX=verbose,no_ani helix/rev2/back:default:clean
  make HELIX=verbose,no_ani helix/rev2/back:default
  md5 helix_rev2_back_default.hex >> /tmp/branch_md5.txt

  diff -u /tmp/master_md5.txt /tmp/branch_md5.txt
```

Test result:
```
--- /tmp/master_md5.txt 2020-01-03 15:42:22.000000000 +0900
+++ /tmp/branch_md5.txt 2020-01-03 15:42:42.000000000 +0900
@@ -1,4 +1,4 @@
-master
+refactor_rgblight_reconfig.h
 MD5 (helix_rev2_default.hex) = f360032edd522448366d471d8f4f8181
 MD5 (helix_rev2_back_default.hex) = 0c663acc6cccc44476b3b969ad22a48f
 MD5 (helix_rev2_back_default.hex) = e66b1195ff6d38e6e22c975b8ae42fd3
```

* Expressions that are too long are difficult to read, so wrap them.

* Edit the expression again

* remove `defined(RGBLIGHT_ANIMATIONS)` in `tmk_core/common/*/suspend.c`, `tmk_core/protocol/*/main.c`

move contents of rgblight_reconfig.h to rgblight.h.

The following changes were made to rgblight.h.

```diff
+#ifdef RGBLIGHT_USE_TIMER
 void rgblight_task(void);

 void rgblight_timer_init(void);
 void rgblight_timer_enable(void);
 void rgblight_timer_disable(void);
 void rgblight_timer_toggle(void);
+#else
+#define rgblight_task()
+#define rgblight_timer_init()
+#define rgblight_timer_enable()
+#define rgblight_timer_disable()
+#define rgblight_timer_toggle()
+#endif
```

The following changes were made to tmk_core/common/avr/suspend.c, tmk_core/common/chibios/suspend.c, tmk_core/protocol/chibios/main.c, tmk_core/protocol/lufa/lufa.c, tmk_core/protocol/vusb/main.c.

```diff
-#    ifdef RGBLIGHT_ANIMATIONS
     rgblight_timer_enable();
-#    endif
```
```diff
-#if defined(RGBLIGHT_ANIMATIONS) && defined(RGBLIGHT_ENABLE)
+#if defined(RGBLIGHT_ENABLE)
         rgblight_task();
 #endif
```

* remove 'defined(RGBLIGHT_ANIMATIONS)' in tmk_core/common/keyboard.c

Co-authored-by: Joel Challis <git@zvecr.com>
2020-03-10 01:46:03 -07:00
.github CI: Add workflow for CLI testing (#7357) 2020-02-08 13:43:55 +01:00
.vscode 2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
bin Add pep8-naming to our python linting 2019-12-01 13:40:14 -08:00
docs [Docs] i2c_driver translation to Japanese (#8274) 2020-03-06 18:27:15 -08:00
drivers format code according to conventions [skip ci] 2020-03-07 01:24:47 +00:00
keyboards [Keyboard] Palette1202 (#7736) 2020-03-10 01:38:37 -07:00
layouts [Keymap] Feature/alfrdmalr/keymap update (#8174) 2020-03-03 10:13:42 -08:00
lib Add gcc version detection to qmk doctor (#8338) 2020-03-08 09:21:45 -07:00
quantum Refactor rgblight_reconfig.h (#7773) 2020-03-10 01:46:03 -07:00
tests clang-format changes 2019-08-30 15:01:52 -07:00
tmk_core Refactor rgblight_reconfig.h (#7773) 2020-03-10 01:46:03 -07:00
users [Keyboard] Helix add split common option (#7718) 2020-03-10 01:33:46 -07:00
util Allow for ChibiOS 20.x (master), as well as enabling ChibiOS-Contrib HAL. (#8272) 2020-03-01 11:50:49 +11:00
.clang-format fix indent size 2019-06-11 01:51:40 -07:00
.clang_complete Vim Layout for Ergodox-EZ (mac only) (#2112) 2017-12-11 21:06:05 -05:00
.editorconfig QMK CLI and JSON keymap support (#6176) 2019-07-15 12:14:27 -07:00
.gitattributes Set eep files to binary mode 2016-08-27 18:37:28 +03:00
.gitignore 2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
.gitmodules Track master branches for lib/chibios, lib/chibios-contrib, lib/ugfx. (#8273) 2020-03-01 11:51:38 +11:00
.travis.yml Fix unknown key 'IndentPPDirectives' on CI (#7933) 2020-01-19 13:59:57 -08:00
autocomplete.sh Make arguments redo, subproject elimination (#1784) 2017-10-14 11:32:19 -10:00
book.json adds redirects for docs 2017-08-19 08:31:54 -04:00
bootloader.mk Add LUFA mass storage BOOTLOADER "support" (#7729) 2019-12-29 20:53:23 +00:00
build_full_test.mk Add SRC and OPT_DEFS when building tests 2017-07-20 10:17:31 -04:00
build_json.mk Add JSON keymap to prereq list of C keymap 2019-12-08 15:13:47 -08:00
build_keyboard.mk add 'objs-size' target into tmk_core/avr.mk (#5490) 2019-07-15 22:45:31 -07:00
build_layout.mk Add a mechanism for force building a particular community layout (#5027) 2019-02-14 20:14:26 -08:00
build_test.mk Split common.mk into common.mk and common_features.mk 2017-06-18 21:22:22 +03:00
CODE_OF_CONDUCT.md updates the coc 2019-08-24 12:43:39 -04:00
common.mk Move Split Common VPATH addition (#4716) 2018-12-31 08:45:44 -08:00
common_features.mk Backlight - Carve out a better location for private driver functionality (#8329) 2020-03-07 12:09:49 +00:00
Dockerfile Update docker util script and travis to use new base container 2019-07-14 21:01:38 -07:00
Doxyfile Generate API docs from source code comments (#2491) 2018-03-22 02:50:38 -04:00
doxygen-todo Remove PJRC USB stack 2020-02-08 11:07:43 -08:00
LICENSE add an explicit lisence file for github to pickup 2017-11-13 20:50:54 -05:00
license_GPLv2.md Clarify the quantum license (#1042) 2017-03-28 15:20:36 -07:00
license_GPLv3.md Clarify the quantum license (#1042) 2017-03-28 15:20:36 -07:00
license_Modified_BSD.md Clarify the quantum license (#1042) 2017-03-28 15:20:36 -07:00
Makefile 2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
message.mk Use FIRMWARE_FORMAT for "Checking file size" message (#8121) 2020-02-10 04:19:08 +11:00
nose2.cfg Setup a python test framework 2019-09-07 07:58:41 -07:00
readme.md Breaking Changes documentation fixes 2020-02-29 12:30:38 -08:00
requirements.txt Drop bs4 dependency, update docs, minor improvements 2020-02-15 15:19:03 -08:00
secrets.tar.enc update building for .hex, secrets moving 2017-08-21 21:57:46 -04:00
setup.cfg Add flake8 to our test suite and fix all errors (#7379) 2019-11-20 14:54:18 -08:00
shell.nix Fix up Arm builds with nix-shell. (#8312) 2020-03-07 03:05:51 +11:00
show_options.mk Remove unused LED_BREATHING_TABLE 2020-03-06 22:29:01 -08:00
testlist.mk Add basic infrastrucure for building full tests 2017-06-18 21:08:23 +03:00
Vagrantfile Configure Vagrant to use qmk_base_container (#6194) 2019-07-16 01:20:34 -07:00

Quantum Mechanical Keyboard Firmware

Current Version Build Status Discord Docs Status GitHub contributors GitHub forks

This is a keyboard firmware based on the tmk_keyboard firmware with some useful features for Atmel AVR and ARM controllers, and more specifically, the OLKB product line, the ErgoDox EZ keyboard, and the Clueboard product line.

Documentation

The docs are powered by Docsify and hosted on GitHub. They are also viewable offline; see Previewing the Documentation for more details.

You can request changes by making a fork and opening a pull request, or by clicking the "Edit this page" link at the bottom of any page.

Supported Keyboards

The project also includes community support for lots of other keyboards.

Maintainers

QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, Hasu. The OLKB product firmwares are maintained by Jack Humbert, the Ergodox EZ by ZSA Technology Labs, the Clueboard by Zach White, and the Atreus by Phil Hagelberg.

Official Website

qmk.fm is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK.