* Improve process_record system
Code based on @colinta's
* Rename and better handle functions
* Fix incorrect function call to process_record_user
* Add documentation for post_process_record
* Add both get_event_keycode and get_record_keycode functions
And add some comments about these functions
* Update code format
* Cleanup merge artifacts
* Add Word Per Minute calculation feature
* Fix copyright info
* Remove header from quantum.c, setup overloadable keycode inclusion for WPM, update docs
* Simplify logic for keycode filtering
* Adding link from summary to wpm_feature info
* Update docs/feature_wpm.md
Typo in function prototype example in docs
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Add WPM transport via i2c
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
* Add support for Bootmagic lite when using SPLIT_HAND_PIN
* Deduplicate bootmagic_lite logic from within via
* Revert location of defaults so that user overrides still work for now
* Tidy up code slightly
* New feature: RGBLIGHT_LAYERS
This feature allows users to define multiple independent layers of lighting
that can be toggled on and off individually, making it easy to use your
RGB lighting to indicate things like active keyboard layer & modifier state.
* Demonstrate built in functions for layer state checking
Also link the video in the docs.
* Follow existing pattern for setting rgblight_status flags
* Eliminate rgblight_is_static_mode since it's not needed
Just check to see if the timer is enabled directly.
* 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>
* rename backlight_soft to match rules.mk
* rename backlight_soft to match rules.mk - update common_features
* Carve out a better location for private driver backlight functionality
* Reduce PROGMEM usage for keycode map
Bit-pack the keycode bool array to gain back a small amount of flash space.
The trade-off is an increase in runtime instructions when running macros.
It does make the code a bit harder to read, as well as maintain.
For configs that use send_string() et al, it saves ~100 bytes.
* Switch to macro and common definition
Rewrite the array declarations so both the unpacked (original) and
packed LUT arrays can use the same value definitions. This is done by
defining a macro that "knows what to do".
This makes the code much easier to read and maintain.
* Fix macro typos and improve perf
Pack the bits in a more efficient order for extraction.
And also fix the copy/paste error in the macro...
* Switch fully to packed LUT
Some minor reformatting.
Compile tested all sendstring_xyz.h to make sure they were converted
properly. Also checked that an unconverted version would generate a
compile error.
* Apply whitespace suggestions from code review
Co-Authored-By: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
* Ensure setPinInput actually sets input high-z
* Fixed _PIN_ADDRESS Macro arguments
as recommended by vomindoraan
* Fixed instances of setInput to use new behavour
* Changed kmac matrix to use input with pullups
* Update keyboards/gh60/revc/revc.h
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Fixed input state for unselect_rows
* fixed merge conflict
* Updated all instances of older uses of setPinInput()
* Fixed naming mistake
Co-authored-by: fauxpark <fauxpark@gmail.com>
- uprintf -> dprintf
- Fix atsam "vendor" eeprom.
- Bump Kinetis K20x to 64 bytes, too.
- Rollback Kinetis to 32 bytes as partitioning can only be done once. Add warning about changing the value.
- Change RAM-backed "fake" EEPROM implementations to match eeconfig's current usage.
- Add 24LC128 by request.
* Run clang-format manually to fix recently changed files
* Run clang-format manually to fix recently changed files - revert template files
* Run clang-format manually to fix recently changed files - format off for ascii_to_keycode_lut
* Enforce definition of `DIODE_DIRECTION` for non-custom matrix boards
* Define diode direction for failing boards
* Matching parentheses
* Put onekey diode directions in top level config
* Define default HSV and speed for RGB matrix.
* Documentation for configuration values RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT and RGB_MATRIX_STARTUP_VAL.
* Document RGB_MATRIX_STARTUP_SPD.
* Preserve the ordering.
* Left-right gradient.
* Update the comment to match the new functionality.
* CPP does integer division so this round is not necessary.
* The x-range is actually 224, update comment and use bit-shifting again.
* Update docs with gradient left-right effect and associated "DISABLE" option.
* Move some common matrix code to a common location
* Refactor some 'custom_matrix_helper' logic to use custom matrix lite
* Fix build for kinesis/stapelberg - abuse of vpath was picking up matrix.c from core when custom matrix was enabled
* Add validation for CUSTOM_MATRIX
* VIA Refactor
* Remove old code
* review changes
* review changes
* Fix cannonkeys/satisfaction75/prototype:via build
* Add via.h to quantum.h
* Move backlight init to after backlight config load
* Merge branch 'master' into via_refactor_pr
* Update user's rules.mk to new way of enabling VIA
* Added id_switch_matrix_state
* Review changes
* Use White channel on RGBW LEDs
Co-authored-by: kwerdenker <sebastian.spindler@gmail.com>
* Manually apply white channel to array
* Move where convert_rgb_to_rgbw is called
* Fix type for rgbw led struct
* Add changes to Ergodox EZ
can revert if deemed necessary
* Revert "Add changes to Ergodox EZ"
This reverts commit aa44db198d40d758ca10470eb94615513592d1dd.
* Revert "Fix type for rgbw led struct"
This reverts commit c5c744cba040201cc0d124400773cf13f8a2cf22.
* Revert "Move where convert_rgb_to_rgbw is called"
This reverts commit cd7f17caf6dd30731c54b3be54490fe4519444f9.
* Revert changes and fix up functions
* Enable white channel for Ergodox EZ as well
* Only run conversion of rgblight is enabled
Co-authored-by: kwerdenker <sebastian.spindler@gmail.com>
* Add rules.mk defaults for f103,f072,f042
* Add rules.mk defaults for f103,f072,f042 - remove comment
* Add rules.mk defaults for f103,f072,f042 - align USE_FPU
* Reset MCU to avoid build issues
* Move essential config values to top and remove ability for override
* Align DFU_SUFFIX_ARGS order with DFU_ARGS
* Add central location for chibios defines
* Add central location for chibios defines - actually add files this time....
* Add Copyright header
* Update include order to resolve i2cv1 build errors
* Move rgb keycode logic to process_keycode
* Fixes for rgb matrix
* Fixes for mxss
* Fix inc/dec logic, add comments
* Fix return RAINBOW_SWIRL logic
* stop external use of rgb helper functions
* merge fix
* Fix 'defined but not used' when all animations are disabled
* Set proper AVR part for USBasp avrdude flashing
* Remove `PROGRAM_CMD` stuff from rules.mk as they should not be needed anymore
* Missed the Plaid readme
* Remove PROGRAM_CMD from Mysterium
* Add shift-to-invert to remaining directional RGB_* keycode pairs
RGB_MODE_FORWARD / RGB_MODE_REVERSE invert their functions when shift is held.
This change adds the same capabilities to the remaining directional RGB_*
keycode pairs. This improves consistency and provides full RGB control in a
keymap containing only one keycode from each pair.
* remove redundant variable
* fix typo
* Fix more typos
Flyspell is on now I swear!
* idea
* progress
* more stuff
* wip
* wip
* last couple of keycodes you can move safely
* Update quantum/quantum.c
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Put back RGB_MODE_BREATHE
* Fix unicode in comments
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Remove separate RGBW implementation for a unified function
* Set White to 0 in RGBW LEDs
This is just to get this working, later, proper brightness can be handled elsewhere.
* Use us instead of nanoseconds(?) since it renders correctly on web
* Remove RGBW function from arm/ws2812.h
* Remove RGBW function from arm/ws2812.c
* Formatting changes
* Add doc info
* Initial ARM bitbang ws2812 driver
* Unify chibios platform to run rgblight_task
* Remove 'avr only' comments from ws2812 docs
* Remove 'avr only' comments from ws2812 docs
* Unify chibios platform to run rgblight_task - review comments
* Remove debug flags from keymap
* Add comments from review
* Add defines for STM32L0XX
* Attempt to get arm ws2812 working on multiple gcc versions
* Convert Dynamic Macro to a Core Feature
This imports the code from Dynamic Macro into the core code, and handles it, as such.
This deprecates the old method but does not remove it, for legacy support. This way, no existing user files need to be touched.
Additionally, this reorganizes the documentation to better reflect the changes.
Also, it adds user hooks to the feature so users can customize the existing functionality.
Based heavily on and closes#2976
* Apply suggestions from code review
Co-Authored-By: fauxpark <fauxpark@gmail.com>
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Cleanup based on feedback
* Add short-form keycodes and document them
- add short-form keycodes to quantum/quantum_keycodes.h
- document the new aliases in docs/feature_dynamic_macros.md
* Add Dynamic Macros section and keycodes to docs/keycodes.md
* Make anti-nesting optional
* Add documentation for DYNAMIC_MACRO_NO_NESTING option
* Fix Merge artifacts
* Fix formatting typo in docs
Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com>
* Remove DYNAMIC_MACRO_RANGE as it's not needed
* Fix includes and layer var type
* Fix edge case when using One Shot Layer with Auto Shift, and it not triggering the cleanup
* Remove junk code (no longer used)
* Replace `(un)register_code` calls with `tap_code` where appropriate
* Fixed up Switch check to be more readable (less verbose)
* Simplified modifier check (if it comes back non-zero, there are mods)
* Add additional function calls for autoshift settings
* Made all variables static, since there are function calls to get their status
* Fixed up documentation
* Re-add special characters that were missed
* formatting pass
* Initial migration of software PWM backlight
* First pass at backlight driver docs
* Correct driver name in docs
* Run backlight_task when using BACKLIGHT_PINS
* Resolve backlight docs TODOs
* Fix held key getting stuck when NKRO is toggled
* Updated file to latest qmk version and added fix to cases MAGIC_UNHOST_NKRO & MAGIC_HOST_NKRO as well.
* Revert merged quantum.c
* Avoid NO_USB_STARTUP_CHECK - Disable USB as checks seem to enable it somehow
* Update quantum/split_common/split_util.c
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Also remove NO_USB_STARTUP_CHECK from vitamins_included/rev1
* Move tmk_core/common/backlight to quantum/backlight
* Add guards to backlight inclusion
* Add guards to backlight inclusion
* Update backlight guards on clueboard/60
* Use full paths to avoid vpath issues
* Use .template file extension for keyboard template files
* Filter out .template files completely before passing to clang-format
* Undo file extension stuff; just ignore quantum/template dir
* remove IT_PIPE duplicate and add IT_GRAD
IT_PIPE was declared 2 times, ones as ° and once as |. I changed the first declaration and called it IT_GRAD. I even fixed the definition because the ° in Italian is obtained with LSFT(IT_AACC)
* rename IT_GRAD to IT_DEGR
* add missing plus_and_minus
* fix missing IT_ACUT definition
* change KC_LALT(KC_LSFT to LALT(LSFT
* Fix alignment
* remove leftover
* fix issue generated with chars while pushing
* fix typo
* fix LCBR and RCBR
* fix euro symbol
* fix RBRC
* change IT_LESS form KC_NUBS to KC_GRAVE
* add IT_TILDE and change IT_GRAV to IT_GRAVE
* add missing legends for accented vowels
* format for readability
* revert to commit befor I edit it
* initial commit
* edited to be easier to compare to _ansi.h
* remove keymap_italian_osx_iso.h and rename with edits keymap_italian_osx_ansi.h to keymap_italian_osx.h
I found out there were no difference at all
* fix missing #endif
* rename quantum/keymap_extras/keymap_italian_osx.h to quantum/keymap_extras/keymap_italian_ansi.h
Now this file is a clone of the keymap_italian.h that appears to be working only for ISO keyboards. It also contains a few improvements for IT_PIPE (defined two times) and IT_ACUT (missing definition). Additionally it redefines LCBR and RCBR to LSFT(IT_LBRC) and LSFT(IT_RBRC)
* rename file
* redefines IT_BKSL and IT_PIPE based on KC_BKSL
* add new osx_iso and osx_ansi version for italian.h and align BKSL to BSLS, fix double definition of PIPE
* made tapdance dual_role general
* updated original dual_role functionality
* added toggling layer example
* Fix dual role and add alias
* Update docs about new layer tap dances
* Fix up based on feedback