No description
Find a file
Brice Figureau b61baf4281 Fix #3566 use an hardware timer for software PWM stability (#3615)
With my XD60, I noticed that when typing the backlight was flickering.

The XD60 doesn't have the backlight wired to a hardware PWM pin.
I assumed it was a timing issue in the matrix scan that made the PWM
lit the LED a bit too longer. I verified it because the more keys that
were pressed, the more lighting I observed.

This patch makes the software PWM be called during CPU interruptions.
It works almost like the hardware PWM, except instead of using
the CPU waveform generation, the CPU will fire interruption
when the LEDs need be turned on or off.

Using the same timer system as for hardware PWM, when the counter
will reach OCRxx (the current backlight level), an Output Compare
match interrupt will be fired and we'll turn the LEDs off.
When the counter reaches its maximum value, an overflow interrupt
will be triggered in which we turn the LEDs on.
This way we replicate the hardware backlight PWM duty cycle.

This gives a better time stability of the PWM computation than pure
software PWM, leading to a flicker free backlight.

Since this is reusing the hardware PWM code, software PWM also supports
backlight breathing.

Note that if timer1 is used for audio, backlight will use timer3, and if
timer3 is used for audio backlight will use timer1.
If both timers are used for audio, then this feature is disabled and we
revert to the matrix scan based PWM computation.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>
2019-04-22 08:34:13 -07:00
.github Tweak issue templates (capitalisation mostly) (#5133) 2019-02-14 20:44:27 -08:00
.vscode Xton's first keymap! (#2941) 2018-05-12 08:52:11 -07:00
docs Fix #3566 use an hardware timer for software PWM stability (#3615) 2019-04-22 08:34:13 -07:00
drivers Removed / replaced questionable logos and added licenses file for safe logos 2019-04-20 08:05:10 -07:00
keyboards added info.json for ymd96 (#4982) 2019-04-22 08:28:17 -07:00
layouts RGB Matrix Overhaul (#5372) 2019-04-02 17:24:14 -07:00
lib RGB Matrix Overhaul (#5372) 2019-04-02 17:24:14 -07:00
quantum Fix #3566 use an hardware timer for software PWM stability (#3615) 2019-04-22 08:34:13 -07:00
tests Remove empty action_function() 2019-01-11 18:32:43 -08:00
tmk_core Init RGB Matrix EEPROM 2019-04-19 14:58:08 -07:00
users Xulkal Keymaps 2019-04-16 18:30:54 -07:00
util add -yq flags to actually make it noninteractive 2019-04-19 14:46:19 -07:00
.clang-format convert to unix line-endings [skip ci] 2019-04-18 23:23:52 +00:00
.clang_complete Vim Layout for Ergodox-EZ (mac only) (#2112) 2017-12-11 21:06:05 -05:00
.editorconfig Update our style guide (#5500) 2019-04-18 15:59:51 -07:00
.gitattributes Set eep files to binary mode 2016-08-27 18:37:28 +03:00
.gitignore Add Satisfaction75 to QMK, Enable EEPROM on stm32f072 (#5094) 2019-02-13 08:03:26 -08:00
.gitmodules Update .gitmodules 2017-11-16 15:09:45 -05:00
.travis.yml Travis CI - skip unit tests for documentation changes (#5267) 2019-04-19 13:20:02 -07: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 Teensy ++ 2.0 bootloader support 2018-05-08 20:08:17 -04:00
build_full_test.mk Add SRC and OPT_DEFS when building tests 2017-07-20 10:17:31 -04:00
build_keyboard.mk Change split_common to use RGBLIGHT_SPLIT (#5509) 2019-04-19 15:25:08 -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 Update CODE_OF_CONDUCT.md 2018-08-01 15:20:02 -04:00
common.mk Move Split Common VPATH addition (#4716) 2018-12-31 08:45:44 -08:00
common_features.mk OLED Driver Feature 2019-04-20 08:05:10 -07:00
Dockerfile Revert "Update build instructions and docker file to download submodules" (#5533) 2019-04-10 14:15:51 -07:00
Doxyfile Generate API docs from source code comments (#2491) 2018-03-22 02:50:38 -04:00
doxygen-todo Generate API docs from source code comments (#2491) 2018-03-22 02:50:38 -04: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 Shallow clone submodules. (#5279) 2019-03-08 07:58:40 -08:00
message.mk build size-check enhancement (#5485) 2019-03-27 08:51:56 -07:00
readme.md Add Atreus as an official board. 2018-08-16 12:01:34 -04:00
secrets.tar.enc update building for .hex, secrets moving 2017-08-21 21:57:46 -04:00
shell.nix shell.nix: Packages relocated in upstream cleanup 2018-12-22 15:09:58 -08:00
show_options.mk Clean up debounce a bit (#5255) 2019-03-04 07:44:46 -08:00
testlist.mk Add basic infrastrucure for building full tests 2017-06-18 21:08:23 +03:00
Vagrantfile Align docker and vagrant base images (#4905) 2019-03-17 10:36:59 -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 hosted on Gitbook and GitHub (they are synced). You can request changes by making a fork and pull request, or by clicking the "suggest an edit" link on any page of the docs.

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 Erez Zukerman, the Clueboard by Zach White, and the Atreus by Phil Hagelberg.

Official website

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