Go to file
Sergey Vlasov 627ceebef3
ws2812: Fix number of nops for AVR at 8 MHz (#9559)
* ws2812: Fix number of nops for AVR at 8 MHz

When trying to calculate the number of nops for AVR running at 8 MHz,
the value of `w3` is expected to be negative; however, because `F_CPU`
is defined in tmk_core/avr.mk with the `UL` suffix, the preprocessor
performs its calculations using `unsigned long`, getting a very large
positive number instead of the expected negative number; this then
results in generating code with a huge number of nops.  Fix the broken
calculations by performing a comparison before subtraction, so that the
unsigned number wraparound does not occur.

The keyboard which triggers the problem is `handwired/promethium`; the
buggy code silently compiles, but the resulting timings would be
completely wrong.

* ws2812: Clean up the code after the 8 MHz fix

Remove old code which was unsuccessfully trying to clamp negative w1, w2
and w3 values to 0, and set w1_nops, w2_nops and w3_nops directly.
2021-02-09 08:33:04 +11:00
.github [CI] Auto Formatting - Swap from direct commit to PR (#11229) 2021-02-06 12:55:50 +00:00
.vscode
api_data
bin
docs Rework I2C driver docs (#11658) 2021-02-08 07:45:59 +11:00
drivers ws2812: Fix number of nops for AVR at 8 MHz (#9559) 2021-02-09 08:33:04 +11:00
keyboards Fix RGBLIGHT_LIMIT_VAL typo (#11826) 2021-02-08 20:12:33 +11:00
layouts [Keymap] Update community ortholinear 4x12 keymap: junonum (#11757) 2021-02-07 09:42:25 -08:00
lib Allow flash/compile to accept relative json paths (#11767) 2021-02-07 21:02:51 +00:00
platforms/chibios
quantum Migrate some tmk_core files to quantum (#11791) 2021-02-07 23:16:15 +00:00
tests
tmk_core Migrate some tmk_core files to quantum (#11791) 2021-02-07 23:16:15 +00:00
users [Keyboard] Add my keymap for Mark65 (#11717) 2021-02-07 09:26:39 -08:00
util
.clang-format
.editorconfig
.gitattributes
.gitignore
.gitmodules
.travis.yml
book.json
bootloader.mk
build_full_test.mk
build_json.mk
build_keyboard.mk Add a <FEATURE>_SUPPORTED flag (#9058) 2021-01-30 13:08:58 -08:00
build_layout.mk
build_test.mk
CODE_OF_CONDUCT.md
common_features.mk Migrate some tmk_core files to quantum (#11791) 2021-02-07 23:16:15 +00:00
common.mk
disable_features.mk Add a <FEATURE>_SUPPORTED flag (#9058) 2021-01-30 13:08:58 -08:00
Dockerfile
Doxyfile
doxygen-todo
LICENSE
license_GPLv2.md
license_GPLv3.md
license_Modified_BSD.md
Makefile
message.mk
nose2.cfg
readme.md
requirements-dev.txt
requirements.txt
secrets.tar.enc
setup.cfg
shell.nix
show_options.mk
testlist.mk
Vagrantfile

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.