summaryrefslogtreecommitdiffstats
path: root/quantum/quantum.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Relocate RGB keycode processing (#7508)Joel Challis2019-12-161-0/+4
| | | | | | | | | | | | | | | | | | * 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
* Relocate magic keycode processing (#7512)Joel Challis2019-12-031-0/+4
| | | | | | | | | | | | * Move magic keycode processing to own file * Save some bytes * Update comments * Update define to one thats not already used... * Fix audio
* Send string keycode tweaks (#7471)fauxpark2019-11-251-23/+1
|
* Run clang-format manually to fix recently changed fileszvecr2019-11-171-3/+2
|
* New and improved lock LED callbacks (#7215)fauxpark2019-11-061-0/+2
| | | | | | | | | | * 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-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+2
| | | | | | | | | | | | * 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
* Add Dip Switch as a core feature (#6140)Drashna Jaelre2019-09-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-77/+76
|
* AVR GPIO macro defines more readable (#5937)Takeshi ISHII2019-08-211-8/+7
| | | | | | | | | | | | | | | | | | | | | | * A little easier to read the definition of the GPIO control macro for AVR. No change in build result. * Changed to not use GNU statement expression extension. No change in build result. * Modified split_common/serial.c to use qmk_firmware standard GPIO control macro. No change in build result. * fix PE6 -> E6 * remove some space * add some comment to config_common.h * Changed split_common/serial.c to use a newer version of qmk_firmware standard GPIO control macro.
* Additional changes for Layer State typedef compatibility (#5906)Drashna Jaelre2019-08-211-1/+1
| | | | | | | | | | | | | | | | * 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>
* Sendstring LUT improvements (#5727)fauxpark2019-07-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix parentheses in macros, and in general clean up quantum.h (#5021)Konstantin Đorđević2019-07-091-66/+53
| | | | | | | | | | | | | | | | | | | | | | | | * Fix up GPIO macros * Fix up send string macros `string` arguments must not be parenthesized * Fix up miscellaneous macros * Make indentation uniform (4 spaces) * Make #ifdef vs #if defined usage consistent * Reorder standard includes * Revert indentation changes as per review comments * Revert #if defined(__AVR__) → #ifdef __AVR__ change * Change 2 space indent to 4 spaces on a couple of lines * Replace include guard with #pragma once
* Typedef'ed layer_state_t to uint32_t (#3637)Alex Ong2019-05-171-2/+2
| | | | | | | | | | | | | | | | | | | | * Typedef'ed layer_state_t to uint32_t. This enables future work with layer_state_t to uint8_t for optimization purposes. * Removed accidental xeal60 commit * Revert to egyptian brackets, added sizeof(layer_state_t) so when layer_state_t is redefined it will automagically work. * Add additional typedefs * Add checks for setting layer state * Update tmk_core/common/action_layer.h Co-Authored-By: alex-ong <the.onga@gmail.com> * Revert commit.
* Simple extended space cadet (#5277)XScorpion22019-04-291-0/+4
| | | | | | | | * 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-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+4
|
* Change table namesDrashna Jaelre2019-04-121-1/+1
|
* Clean up some of the codeDrashna Jaelre2019-04-121-0/+1
|
* Fixed tap/down/up handling in dynamic keymap macros (#5363)Drashna Jaelre2019-04-071-0/+4
|\ | | | | | | | | | | * 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-0/+4
| |
* | Custom Tapping Term per key (#5009)Drashna Jaelre2019-04-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Next set of split_common changes (#4974)James Churchill2019-03-121-4/+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
* Haptic feedback generalized - DRV2605 and solenoids (#4939)ishtob2019-02-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial work to add eeprom to haptic feedback and decouple the feedback process from keyboards * Haptic feedback enhancements: on/off toggle working, feedback order working todo: -work on modes switching -get modes switching to save to eeprom * haptic enhancement - eeprom and modes added * Added set and get functions for haptic feedback * initial implementation of solenoids under haptic feedback * changed eeprom to 32 bits to reserve blocks for future features * start documentation of haptic feedback * change keycode per comment from reviewers * typo fixes * added eeprom for solenoid configs * added solenoid and docs * Add/fix default parameters configs, improve docs * more doc cleanup * add in solenoid buzz toggle, clean up doc * some fixes for error in compiling solenoid * fix a chibios specific i2c read function and added one for AVR controllers in DRV2605L.c * fixes for avr side issues * update keymap * fix keymap compile error * fix bugs found during solenoid testing * set pin that is not powered during bootloader * added warning about certain pins on the MCU may trip solenoid during DFU/bootloader
* fix the led_matrix.h naming conflictskullY2019-02-101-1/+1
|
* compiles, but long delay on startup and problemsskullY2019-02-101-1/+5
|
* move `#include "rgb.h"` from quantum.h to quantum.cmtei2019-01-251-3/+0
| | | | I think `quantum.h` should contain only API declarations that `quantum.c` provides externally. `rgb.h` contains function weak definitions. This should not be in `quantum.h`.
* Make `readPin` output a 0 or 1 when using AVR to match ChibiOS's version of ↵Danny Nguyen2018-12-191-1/+1
| | | | `readPin`
* Fix up tap_code functionality (#4609)Drashna Jaelre2018-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add delay in Tap Code to avoid issues I think a few people have reporting issues with it working properly, and it may be a timing issue. The 'register_code' uses this sort of delay in some of the functions, and this is probably why. Adding the 100ms delay should hopefully fix any issues with it. * Make tap_code delay configurable * Update documentation * Bring tap_code16 inline with changes * Fix type for tap_code16 Bad copy-paste job * Just use the value check for the define * Clarify timing in docs Co-Authored-By: drashna <drashna@live.com> * Wordsmithing Co-Authored-By: drashna <drashna@live.com>
* Add standard definitions for ALGR and KC_ALGR (#4389)Konstantin Đorđević2018-12-121-0/+1
| | | | | | | | | | | | | | * Add standard ALGR defition, remove (re)definitions from language files * Use ALGR(kc) consistently in ALTGR(kc) aliases * Non-Nordic keymaps should not use NO_ALGR * Add standard KC_ALGR definition * Update docs with ALGR and KC_ALGR * Update SS_ALGR and ALGR_T aliases
* Add tap_code16 function (#4362)Konstantin Đorđević2018-11-271-2/+3
|
* Add support for Atmega32A to pin declarations and universal matrix (#4015)Jack Humbert2018-11-021-9/+11
| | | | | | | | | | | | | | | | | | * add computed pins from mcu type * update for atmega32a * doc typo * add atmega16 chips, link to references * remove avr include from config * exclude assembler in config.h includes * consolodate options, add 646 * fix typo in pindef
* Add Bootmagic Lite to QMK (#4215)Drashna Jaelre2018-10-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Preliminary additon of bootmagic lite functionality * Cleanup code * Clean up bootmagic code * Add documentation and clean up code * Make 'lite' an option for BOOTMAGIC_ENABLE * Update Templates with note about Bootmagic Lite option * Detect Debounce variable * Make sure debounce is a non-zero number * Capitalize Bootmagic * Capitalize bootmagic * Update wording * Re-add EEPROM reset, by popular demand And add eeprom-less version to drashna userspace for his sanity * Fix spacing * Set BOOTMAGIC_ENABLE to use full/lite/off And default yes to "full" for compatibility * Add Bootmagic lite info to templates * Remove text from makefiles * Cleanup of makefile * mention yes in bootmagic docs * Wordsmitthing the docs * Fix white spaces * Readd default bootmagic setting, because it's necessary
* Adds default value for TAPPING_TERM if Tap Dance is enabled (#2785)Drashna Jaelre2018-10-011-2/+4
| | | | | | * Force require TAPPING_TERM if Tap Dance is enabled * Handle lack of TAPPING_TERM more gracefully
* Update quantum matrix to support both AVR and Chibios ARM (#3968)yiancar2018-09-281-12/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Update quantum matrix to support both AVR and Chibios ARM - Addition of STM32 pin definitions - Created abstruction layer defines to control GPIO (This is a bit pointless for Chibios as we are creating a PAL ontop of a PAL but it is necessary for uniformity with AVR) - Modified matrix.c to use the above functions * minor ifdef fix * Rename of functions and docs - Added documentation. - Renamed functions according to Jack's spec. * Massdrop fix * Update matrix.c * Update quantum.h * Update quantum.h * Update quantum.h * Update internals_gpio_control.md
* Make `PREVENT_STUCK_MODIFIERS` the default (#3107)Joe Wasson2018-09-171-6/+1
| | | | | | | | | | * Remove chording as it is not documented, not used, and needs work. * Make Leader Key an optional feature. * Switch from `PREVENT_STUCK_MODIFIERS` to `STRICT_LAYER_RELEASE` * Remove `#define PREVENT_STUCK_MODIFIERS` from keymaps.
* rgblight.[ch] more configurable (#3582)Takeshi ISHII2018-09-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add temporary test code rgblight-macro-test1.[ch] * rgblight.h : mode auto numberring and auto generate mode name symbol No change in build result. * rgblight.c use RGBLIGHT_MODE_xxx symbols No change in build result. * quantum.c use RGBLIGHT_MODE_xxx symbols No change in build result. * fix build break. when RGB_MATRIX_ENABLE defined * add temporary test code rgblight-macro-test2.[ch] * modify rgblight_mode_eeprom_helper() and rgblight_sethsv_eeprom_helper() * modify rgblight_task() * configurable each effect compile on/off in config.h * update docs/feature_rgblight.md * fix conflict. docs/feature_rgblight.md * remove temporary test code rgblight-macro-test*.[ch] * fix comment typo. * remove old mode number from comment * update docs/feature_rgblight.md about effect mode * Revert "update docs/feature_rgblight.md about effect mode" This reverts commit 43890663fcc9dda1899df7a37d382fc38b1a6d6d. * some change docs/feature_rgblight.md * fix typo * docs/feature_rgblight.md update: revise mode number table
* ISSI31FL3733 driver (#3679)yiancar2018-08-281-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ISSI31FL3733 driver - Addapted IS31 driver for the above driver * fix my branch * ISSI31FL3733 driver - Inclusion of above ISSI led driver * IS31fl3733 driver - Added correct function for control registers * Finalized support for ISSI31fl3733 led driver - Finalized and tested driver. - Modified i2c_master for arm due to declaration mistake. - Fixed spaces/tabs in quantum.h file. - Fixed spaces/tabs in common_features.mk file. - Removed unnecessary includes from rgb_matrix.c file. - Added local definitions for MIN and MAX macros in rgb_matrix.c file. - Adjusted chevron effect. - Added necessary define (RGB_3733_MATRIX_ENABLE) for makefile. - Added necessary C define (ISSI3733) to aid with inclusion of the correct header file. - Added documentation for the new driver. * Driver structure update - Changed rule includes to be more condensed (RGB_MATRIX_ENABLE = IS31FL3731) and (RGB_MATRIX_ENABLE = IS31FL3733) - Updated documentation - Reverted to the use of differently named functions for each driver and selecting the needed ones within rgb_matrix.c * ISSI Drivers refractoring - Moved issi drivers in a dedicated folder - Updated documentation * I2C library fix I released the special pins incorrectly before. It is now fixed.
* Make sure Planck light calls user suspend functions (#3568)Drashna Jaelre2018-08-041-0/+1
| | | | | | * Make sure Planck light calls user suspend functions * Add suspend.h include to quantum.h for kb/user function compatibility
* Keymap: Bocaj Ergodox Updates (#3364)Jacob Jerrell2018-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |