summaryrefslogtreecommitdiffstats
path: root/quantum/quantum.c
Commit message (Collapse)AuthorAgeFilesLines
* Run clang-format manually to fix recently changed files (#7934)Joel Challis2020-01-191-3/+5
| | | | | | | | * 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
* Move rgblight and backlight task to common location (#7733)Joel Challis2020-01-191-5/+1
|
* VIA Configurator Refactor (#7268)Wilba2020-01-031-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* Make the keyboard beep when Audio is enabled and `\a` is encountered in a ↵fauxpark2019-12-251-0/+10
| | | | sendstring
* Relocate RGB keycode processing (#7508)Joel Challis2019-12-161-161/+7
| | | | | | | | | | | | | | | | | | * 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
* Fix breathing toggle when rgb is disabled (#7550)Joel Challis2019-12-061-5/+5
|
* Relocate magic keycode processing (#7512)Joel Challis2019-12-031-154/+3
| | | | | | | | | | | | * Move magic keycode processing to own file * Save some bytes * Update comments * Update define to one thats not already used... * Fix audio
* Add shift-to-invert to remaining directional RGB_* keycode pairs (#7484)Manna Harbour2019-11-281-8/+40
| | | | | | | | | | | | | | | | | * 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!
* Compile out some keycode processing when features are disabled (#7506)Joel Challis2019-11-281-8/+8
|
* clean up quantum.c (#7485)Yan-Fa Li2019-11-271-173/+87
| | | | | | | | | | | | | | | | | | | | * 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
* Run clang-format manually to fix recently changed fileszvecr2019-11-171-1/+1
|
* New and improved lock LED callbacks (#7215)fauxpark2019-11-061-0/+21
| | | | | | | | | | * New and improved lock LED callbacks * Include stdbool * Update documentation * Use full function signatures and add keyboard-level example
* [Core] Convert Dynamic Macro to a Core Feature (#5948)Drashna Jaelre2019-11-041-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Initial migration of software PWM backlight (#6709)Joel Challis2019-11-021-1/+1
| | | | | | | | | | | | * 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 (#6570)just-another-jxliu2019-10-221-0/+3
| | | | | | | | * 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
* Move tmk_core/common/backlight to quantum/backlight (#6710)Joel Challis2019-10-171-2/+4
| | | | | | | | | | | | * 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
* Fix bug in `do_code16()` (#6935)fauxpark2019-10-161-33/+17
| | | | | | * Fix bug in `do_code16()` * Remove qk_ mods functions
* ARM - Initial backlight support (#6487)Joel Challis2019-10-051-509/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move AVR backlight to own file, add borrowed ARM implementation * Tiny fix for backlight custom logic * Remove duplicate board from rebase * Fix f303 onekey example * clang-format * clang-format * Remove backlight keymap debug * Initial pass of ARM backlight docs * Initial pass of ARM backlight docs - resolve todos * fix rules validation logic * Add f072 warning * Add f072 warning * tidy up breathing in backlight keymap * tidy up breathing in backlight keymap * add missing break to backlight keymap
* ARM split - Add bootmagic/magic keycodes for setting handedness (#6545)Joel Challis2019-09-241-1/+7
| | | | | | | | | | * Add docs on bootmagic/magic keycodes for setting handedness * Clang format fixes * Maintain backwards compatibility * Maintain backwards compatibility
* Add support for 328P hardware backlight on B1/B2 (#6776)fauxpark2019-09-201-0/+16
|
* Add Dip Switch as a core feature (#6140)Drashna Jaelre2019-09-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Dip Switches as a core feature * Add documentation for Dip Switch feature * Update Preonic Rev3 to use new feature and remove custom matrix * Apply suggestions from code review Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Remove custom matrix line completely Rather than just disabling it Co-Authored-By: fauxpark <fauxpark@gmail.com> * DIP changes Co-Authored-By: fauxpark <fauxpark@gmail.com> * Use better check for DIP Switch configuration * Add to show features * Add bitmask callback for dip switch * Fix OLKB Boards dip switch config * Update docs to include bitmask example * Fix comments/documentation Co-Authored-By: fauxpark <fauxpark@gmail.com> * Fix issues with docs and use example from @tuzonghua * Fix wording Co-Authored-By: fauxpark <fauxpark@gmail.com> * Fix example to use proper formatting Bad, BAAAAAAD drashna!!! * Handle dip switch initialization better
* clang-format changesskullY2019-08-301-1314/+1181
|
* Fixup Bootmagic code (#6386)Drashna Jaelre2019-08-221-10/+6
|
* Additional changes for Layer State typedef compatibility (#5906)Drashna Jaelre2019-08-211-3/+3
| | | | | | | | | | | | | | | | * Additional changes for Layer State typedef compatibility * Replace biton32 with get_highest_layer in docs * Change additional layer structure code * Fix uGFX reference issue * Remove dynamic_keymap check * Where did all these extra spaces come from Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Added keycodes for swapping and unswapping the Control and OS keys (#6110)Stephen Wanhella2019-08-211-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add MAGIC_SWAP_CONTROL_LGUI and MAGIC_UNSWAP_CONTROL_LGUI keycodes Key codes to swap and unswap the control and windows/cmd keys * Fix issues with pull request #6110 Renamed swap/unswap lctl and lgui key codes, added key codes to swap/unswap rctl and rgui, and moved new bool inside keycode_config.h struct to the end * Move new keycodes to the end of the enum (#6110) * add cases for swapped control and OS keys to mod_config (#6110) * Add new keycodes to feature_bootmagic.md (#6110) * Add R+L swap codes to keep in parity with AG_* codes * Extend Magic range check to include new magic codes * Update audio docs * Combine 2 byte ranges into 1 word for EECONFG Fix names for Keymap config EEPROM * Update docs/feature_bootmagic.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update docs/feature_bootmagic.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update docs/feature_bootmagic.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update docs/feature_bootmagic.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Improve backlight PWM pin support (#6202)fauxpark2019-08-081-98/+141
| | | | | | | | | | | | | | | | * Improve backlight PWM pin support * I accidentally an equals sign * Another typo * Order by pin number * Throw an error if backlight pin is C4 or C5 on 16/32U4 * Use else for clarity * Minor alignment adjustments
* Store backlight breathing state in EEPROM (#6105)fauxpark2019-07-161-2/+10
| | | | | | | | | | | | * Store backlight breathing state in EEPROM * Reduce backlight_config.level from 6 bits to 4 (max 15 "on" levels) * Error out if BACKLIGHT_LEVELS is > 15 * Remove mention of default backlight pin in rules.mk template * Remove pointless comment
* Sendstring LUT improvements (#5727)fauxpark2019-07-151-19/+38
| | | | | | | | | | | | | | | | | | | | | | | | * Align sendstring LUTs to 9 characters wide * Replace 0 with XXXXXXX * Use decimal 128 for LUT size * Align heading comments * Add ASCII table comments * Add missing AltGr LUTs and adjust keycode LUTs accordingly * Use pragma once * Correct a couple more keycodes * Capitalise "BÉPO" * Also clean up the default tables * Tidy up Belgian and Norman LUTs
* Remove lock LED example in quantum.c (#5636)fauxpark2019-07-151-17/+0
| | | | | | | | * Use GPIO helper defines in backlighting * While I'm here, fix up the lock LED example too * Remove the example altogether, it's already documented
* Fix breathing always on for soft PWM (#5983)fauxpark2019-06-191-7/+10
| | | | | | | | | | * Fix breathing always on for soft PWM * Remove reference to hardware PWM pins in BACKLIGHT_BREATHING description Now, breathing will only be unsupported when Timers 1 and 3 are both used by Audio * Document BACKLIGHT_ON_STATE and its purpose
* Fix backlight breathing on C6 (#6102)fauxpark2019-06-171-19/+29
| | | | | | | | | | * Fix backlight breathing on C6 * Account for ATmega32A's single TIMSK register (MT40) * Document hardware PWM on D4 for ATmega32A * Add C6 and D4 to BACKLIGHT_PIN description
* Make DEBUG keycode disable as well as enable (#5898)fauxpark2019-05-191-1/+5
| | | | | | * Make DEBUG keycode disable as well as enable * print() can always be used regardless of debug_enable state
* Cleanup/rgb matrix (#5811)XScorpion22019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | * 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 <drashna@live.com> * Adding parenthesizes to DRIVER_LED_TOTAL where necessary * Updated docs * added notes about parentheses
* [Keyboard] Sol keyboard conversion to split common (#5773)XScorpion22019-05-061-18/+5
| | | | | | | | | | | | | | | | | | | | | | * Split common conversion * Updated serial and encoder pins * Fixing default folder until r2 * Fixing oled driver on slave split common * Fixing keymap compile errors * Fixing oled inactivity timer on slave split common * Hoisted oled driver task, init, & activity to keyboard.c * Update keyboards/sol/config.h Co-Authored-By: XScorpion2 <rcalt2vt@gmail.com> * Remove TAPPING_FORCE_HOLD
* Simple extended space cadet (#5277)XScorpion22019-04-291-120/+3
| | | | | | | | * Simplifying and Extending Space Cadet to work on Ctrl and Alt keys * PR Review feedback * Reverting back to keycodes
* Fix #3566 use an hardware timer for software PWM stability (#3615)Brice Figureau2019-04-221-43/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* OLED Driver FeatureRyan Caltabiano2019-04-201-0/+13
|
* Use auto output for Adafruit BLE (#4131)Mike Roberts2019-04-191-0/+3
| | | | | | | | * use auto for adafruit ble * spacing * switch ifdef name
* Change table namesDrashna Jaelre2019-04-121-4/+4
|
* Cleanup codeDrashna Jaelre2019-04-121-13/+3
|
* Make send_char multilined for readaabilityDrashna Jaelre2019-04-121-8/+20
| | | | So future us' will thaank us
* Clean up some of the codeDrashna Jaelre2019-04-121-3/+2
|
* Add AltGr/RALT support to Send StringDrashna Jaelre2019-04-121-9/+34
|
* [Keyboard] Refactor jj40 to current standards (#5574)zvecr2019-04-081-0/+7
| | | | | | | | | | * Refactor jj40 in line with current ps2avrgb template * Disable bootmagic lite as it seems to not work on atmega32a/bootloadHID * Add backlight pwm bodge till #4324 lands * Increase planck keymap compatibility
* Fixed tap/down/up handling in dynamic keymap macros (#5363)Drashna Jaelre2019-04-071-6/+6
|\ | | | | | | | | | | * Fixed tap/down/up handling in dynamic keymap macros * Added SS_TAP_CODE, SS_DOWN_CODE, SS_UP_CODE
| * Added SS_TAP_CODE, SS_DOWN_CODE, SS_UP_CODEWilba65822019-03-301-6/+6
| |
* | Custom Tapping Term per key (#5009)Drashna Jaelre2019-04-051-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add customizable tapping terms * Add Documentation * Fix function * Fixes * It's not a pointer * Add debugging output * Update documentation to be at least vaguely accurate * Use `get_tapping_term(tapping_key.event)` instead `e` doesn't include column and row information, properly. It registers as 255, regardless of the actual keypress. However `tapping_key.event` actually gives the correct column and row information. It appears be the correct structure to use. In fact, it looks like the issue is that `e` is actually the "TICK" structure, as defined in keyboard.h * Use variable tapping term value rather than define * Silly drashna - tapping_key.event, not event * add get_event_keycode() function * Fix typo Co-Authored-By: drashna <drashna@live.com> * Remove post_process_record_quantum since it's the wrong PR * Update quantum/quantum.c Co-Authored-By: drashna <drashna@live.com> * Better handle ifdef statement for permissive hold Since we can't be sure that tapping term is actually 500 * Update quantum.c comments based on feedback * Clean up get_tapping_term function Clean up function so that users don't need to call the event function, and instead only check the keycode * Add ability to run functionality on and off * Make ifdef's more compact
* | RGB Matrix Overhaul (#5372)XScorpion22019-04-021-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * RGB Matrix overhaul Breakout of animations to separate files Integration of optimized int based math lib Overhaul of rgb_matrix.c and animations for performance * Updating effect function api for future extensions * Combined the keypresses || keyreleases define checks into a single define so I stop forgetting it where necessary * Moving define RGB_MATRIX_KEYREACTIVE_ENABLED earlier in the include chain
* | Next set of split_common changes (#4974)James Churchill2019-03-121-30/+0
|/ | | | | | | | | | | | | | | | * Update split_common to use standard i2c drivers * Eliminate RGB_DIRTY/BACKLIT_DIRTY * Fix avr i2c_master error handling * Fix i2c_slave addressing * Remove unneeded timeout on i2c_stop() * Fix RGB I2C transfers * Remove incorrect comment
* Velocikey: Match RGB animation speed to typing speed (#3754)Chris Lewis2019-02-211-1/