summaryrefslogtreecommitdiffstats
path: root/tmk_core
AgeCommit message (Collapse)AuthorFilesLines
2019-02-21Velocikey: Match RGB animation speed to typing speed (#3754)Chris Lewis3-0/+9
* Draft commit of typing speed RGB control * More information in the readme * Support all RGB animation modes (Fixes #1) * Added support for all RGB light modes to use typing speed Except christmas lights because that is seizure-inducing at high speeds! * Introduced a value range specific to each RGB mode Because some modes are a little too much when running at full speed! * Update readme.md * Update readme.md * Re-arrange typing_speed definitions (Fixes #5) (#6) * Re-arrange variable definitions to avoid including quantum.h from rgblight.c * Fix a compilation error when trying to run make test:all * Tweaks to the typing speed decay rate * Renamed to momentum; moved implementation into dedicated files * Groundwork for toggling momentum on/off (currently always on) * Add EEPROM toggle for momentum-matching * Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic * Move momentum decay task out of rgblight_task() * Fix missing momentum.h in lufa.c * Experimental LED support (untested) * Draft commit of typing speed RGB control * More information in the readme * Support all RGB animation modes (Fixes #1) * Added support for all RGB light modes to use typing speed Except christmas lights because that is seizure-inducing at high speeds! * Introduced a value range specific to each RGB mode Because some modes are a little too much when running at full speed! * Update readme.md * Update readme.md * Re-arrange typing_speed definitions (Fixes #5) (#6) * Re-arrange variable definitions to avoid including quantum.h from rgblight.c * Fix a compilation error when trying to run make test:all * Tweaks to the typing speed decay rate * Renamed to momentum; moved implementation into dedicated files * Groundwork for toggling momentum on/off (currently always on) * Add EEPROM toggle for momentum-matching * Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic * Move momentum decay task out of rgblight_task() * Fix missing momentum.h in lufa.c * Added documentation * Renamed feature to velocikey * Reverted readme to original state * Correct the readme title * Updated feature name in the docs * Update EECONFIG name * Add compile-time toggles for velocikey * Update feature documentation * Revert "Merge branch 'led-support' into master" This reverts commit e123ff5febf61639b9a9020748e1c2e2313460ff, reversing changes made to df111a55b9d4929182e16108b1c0ead15b16df97. * Move velocikey EECONFIG definition to depend on VELOCIKEY_ENABLE * Rename decay_task function to decelerate * Apply suggestions from code review Co-Authored-By: chrislewisdev <chris@chrislewisdev.com> * Re-order eeconfig definitions * Apply coding conventions * Apply #ifdef check in lufa.c * Refactored interval time checks into one functionc * Small rename * Fix unused function error for layouts not using all rgb effects * Only update EEPROM if Velocikey is enabled * Incorporate code review feedback * Small adjustment to top-end decay rate * Add Velocikey documentation to table of contents * Bring tetris:default keymap size down by disabling audio
2019-02-18Fixed grep issue in bootloader build target (#3848)Jumail Mundekkat2-8/+17
* Changed use of '\s' in grep to '[ \t]' for portability * Pushed DFU Keyboard.h into a shell script * Fixed execution permissions on make_dfu_header,sh
2019-02-18Change Command keycode defaults to match corresponding Bootmagic codes (#5078)Konstantin Đorđević2-30/+35
* Change Command keycode defaults to match corresponding Bootmagic codes * Make alternate magic key keycodes consistent * Reflect changes from previous commit in tmk_core/common/command.c * Remove unnecessary MAGIC_KEY_* definitions from keymaps compatible with these changes * Swap E and BSPACE for MAGIC_KEY_EEPROM * Add MAGIC_KEY_EEPROM_CLEAR instead of MAGIC_KEY_EEPROM_ALT * Remove BOOTMAGIC_ENABLE checks around EECONFIG stuff * Update Command descriptions
2019-02-17Haptic feedback generalized - DRV2605 and solenoids (#4939)ishtob2-0/+16
* 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
2019-02-15Enable custom chibios sub-platformShihpin Tseng1-2/+6
2019-02-15Debounce refactor / API (#3720)Drashna Jaelre1-15/+2
* Added xeal60 via clone of lets split * Delete removed other keymaps * Basic keymap (no FN). Compiles. * Removed NP_STAR and NP_SLSH. * Removed "debounce_algo = manual" in all keyboards with CUSTOM_MATRIX = yes. * Changed order of rules in TMK. Documented feature. * Fixed missing whitespace in debounce documentation Table wasn't working due to missing newline. * Added bold in a few areas. * DO NOT USE - Removed debounce from TMK. * Remove accidental xeal60 commit * DO NOT USE - debounce successfully compiled. * DO NOT USE Revert back to original API to support split_keyboards. * Working eager_pk * Whitespace cleanup. * Restored debounce.h since there wasnt any real change. * Moved debouncing_time variable to inside #if debounce * Removed check for custom_matrix. We can safely include the debounce file for compilation when custom_matrix is used. * Removed #include "matrix.h" from debounce.h * Bug fix - was using MATRIX_ROWS instead of num_rows * Fixed compilation error with debounce_sym_g * Renamed DEBOUNCE_ALGO to DEBOUNCE_TYPE * Malloc array in debounce_eager_pk, since split keyboards only use MATRIX_ROWS/2. * Fix compile error in debounce_eager_pk * Stricter, leaner DEBOUNCE_TYPE section in common_features.mk. Cleanup debounce_type.mk
2019-02-15Add kb and user level keyboard initialization functions (#3113)Drashna Jaelre6-21/+66
* Add suspend functions * Disable RGB code if it's disabled * Add keyboard_init functions * Change where references so it will compile * Wrong command chained in wake up kb function * Fix non-feature file changes * Add documentation * Re-add matrix init docs * add rgblight code to example * Remove suspend code * Clean up docs * Fix docs * Fix suspend code * more doc fixes * change function to startup_* rather than keyboard_init_ * fix spelling error * fix up docs to finish removing keyboard_init * Use Pre and Post init functions * Update Documenation * Remove changes to my keymap and userspace code * Cleanup * Revert changes to extra files * Forgot a semicolon * Make sure all protocols call keyboard_setup * Cleanup functions * Unset startup_user * Remove changes from division keyboard * Readd startup_user function * Remove all to startup_user * Update docs/custom_quantum_functions.md Co-Authored-By: drashna <drashna@live.com> * Update docs/custom_quantum_functions.md Co-Authored-By: drashna <drashna@live.com> * Add suggestion line * Rebase fixes * Update documentation to be more useful/accurate * Cleanup of documentation * Fix spacing inconsistency * Revert unexpected change to keymap
2019-02-13Add Satisfaction75 to QMK, Enable EEPROM on stm32f072 (#5094)Andrew Kannan3-3/+13
* Add stm32f072 base ck4x4 to handwired * add prints * Save these tries * Save changes again * Working hadron oled * OLEd working but ws2812b still iffy: * save another try * Encoder feature + OLED * RTC code * Implement clock setting mode * Whitespace * Encoder hooked up to working LED PWM code * Add missing files * eeprom changes * Save changes * Move i2c master * Move satisfaction75 under cannonkeys * Set proper default folder * Revert some core changes * Undo paved iris changes * Reorganize code for maintainability and prep for new features * Add starting code for clock OLED mode * Clock set mode finished * Add custom encoder modes * Actually add VIA keymap * Gate to only 072 * fix gate for only 072 * Update header guards and includes * Update i2c selection strategy * Update board.c to handle software reset to DFU
2019-02-13Remove AUTOGEN and fix Travis Compiled Push scripts (#5077)Drashna Jaelre1-10/+3
* Grab HEX and BIN files from autogen And push them to qmk.fm/compiled * Make autogen copy extension agnostic This way, when travis cl scrpit looks for hex files, it will actually grab bin files, and not hex files for ARM boards * Handle the AUTOGEN in :bin target to properly handle edge cases Both the TADA68 and ATSAM boards generate the hex file and then convert it to a bin file. The changes I made does not handle this well, at all. This removes the hex and replaces it with a bin, if a bin is normally generated. * Revert hex target to original copy command * Check hex and bin separately in compile push script Since I don't know how to script this, well * Simplify push to compiled folder * Further simplify compiled push script * Move AUTOGEN parsing to a more sane location to prevent tech debt Thanks to skully! * Remove AUTOGEN completely, as it's not needed This has the benefit of making everything super simple, since we can pull every hex and bin from the root of the qmk_firmware folder, and move that to th compiled folder. This also removes old and unneeded code, and removes some tech debt that has been accrued, without adding more, in theory.
2019-02-11compiles, but long delay on startup and problemsskullY1-1/+1
2019-02-06Remove unnecessary IS_COMMAND definitions from recently added keyboards (#5065)Konstantin Đorđević1-11/+1
2019-02-05Add One Shot Key callbacks (#4697)Thomas Baart2-15/+84
* Added callbacks to one shot modifier changes * Altered signature of callback functions * Reordered the callback methods, shortened brief documentation * Added One Shot Modifier callback documentation * First attempt at unit tests * Revert "First attempt at unit tests" This reverts commit 5ec21a782202c0d74cf21cb852bd319f0c8b4842. * Simplified oneshot function implementations * Made clear_oneshot_locked_mods to be conform action_util.h, adhering to the (void) signature * Made used datatypes for oneshot mods consistently unsigned integers * Corrected callback to call clear callback when clear_oneshot_locked_mods is invoked * Simplified oneshot equals statements * Corrected return type and signature of get and set oneshot locked mods * Consolidated one shot callbacks, added initial layer callback version * Fixed non-updating one shot layer variable after timeout or other clear, added code comments * Added better one shot key docs
2019-02-01Change return type of layer_switch_get_layer() to uint8_t (#5011)fauxpark2-3/+3
* Change return type of layer_switch_get_layer() to uint8_t * Keep loop index signed so we don't wrap around
2019-01-30Moving cannonkeys boards to one place, eeprom fix (#4999)Andrew Kannan1-4/+8
* Move boards to cannonkeys and share resources * Share common files between cannonkey boards * Fix ortho60 keymap * update LED numbers * Add RGB keys to Ortho60 and Ortho48 * Add Backlight control to default layout Ortho60 and 48 * Remove unnecessary ws2812.c SRC from rules.mk
2019-01-29arm_atsam ADC0 factory calibration correctionpatrickmt1-3/+3
Factory calibration data was not being loaded properly for ADC0, which affects the accuracy of 5V readings.
2019-01-29Backlight - New option : BACKLIGHT_CAPS_LOCK (#4769)Rockman181-25/+32
* [BACKLIGHT_CAPS_LOCK_INDICATOR] Use backlight toggling as Caps Lock LED I've implemented this feature because S65-X doesn't have LED indicators and the existing led_set_kb(usb_led) function try to use backlight as indicator but that creates an inconsistency with backlight_config state. - define `BACKLIGHT_CAPS_LOCK_INDICATOR` to enable Caps Lock indicator using backlight (for keyboards without dedicated LED) - Don't turn off LED indicators when suspend because backlight is already turned off. Else led_set(0) will turn back on backlight. - Documentation has been updated * [BACKLIGHT_CAPS_LOCK_INDICATOR] Turn off all LED indicators except Caps Lock if BACKLIGHT_CAPS_LOCK_INDICATOR * [BACKLIGHT_CAPS_LOCK] Rename BACKLIGHT_CAPS_LOCK_INDICATOR * [BACKLIGHT_CAPS_LOCK] Use new IS_LED_ON method
2019-01-29Practice60 RGB and PWM Backlight (#4929)Andrew Kannan1-11/+6
* Update Practice60 to enable RGB via SPI DMA and use PWM backlight breathing * Correct stm32f103c8t6 flash size in eeprom definition * Remove unused files and improve ifdef checks * Update quantum/rgblight.c Co-Authored-By: awkannan <andrew.kannan@klaviyo.com> * Update quantum/rgblight.c Co-Authored-By: awkannan <andrew.kannan@klaviyo.com> * EEPROM implementation fix and updated p60 code * Update define * Remove dead code * Update keymap to remove test key * Update keymap again
2019-01-27Fix Command feature: use get_mods() instead of keyboard_report->mods (#4955)Konstantin Đorđević2-2/+2
* Remove unnecessary IS_COMMAND definition in clueboard/66/rev4 * Replace keyboard_report->mods with get_mods() in IS_COMMAND definitions * Update docs to use get_mods() instead of keyboard_report->mods * Replace keyboard_report->mods with get_mods() in tmk_core/protocol/usb_hid/test For some reason, this occurrence used KB_LSHIFT and KB_RSHIFT, which don't exist * Replace keyboard_report->mods with get_mods() in Massdrop keyboards (as per @patrickmt)
2019-01-27Adds a default value for IS_COMMAND for COMMAND feature (#4301)Drashna Jaelre1-0/+3
* Add default value for IS_COMMAND for COMMAND feature * Cleanup and consistency * Update Templates to reflect change * Fix IS_COMMAND in template * Fix IS_COMMAND define * Use consistent IS_COMMAND block in templates * Remove unnecessary `#undef IS_COMMAND` directives * Fix compile issue on orthodox * Reomve IS_COMMAND option for newer boards * Remove all existing definitions of IS_COMMAND if they use default LSHIFT and RSHIFT setting * Remove a couple of additional IS_COMMAND defines * Remove remaining redundant IS_COMMAND definitions * Remove #undef IS_COMMAND from orthodox:drashna and whitefox:konstantin * Remove multiple empty lines in modified config.h files * Update additional boards * Reomve IS_COMMAND from newer boards * Update Alice keyboard * Remove IS_COMMAND from additional boards Jan 24th edition
2019-01-26Whitespace cleanup.alex-ong2-4/+4
2019-01-26DO NOT USE - Removed debounce from TMK.alex-ong7-276/+4
2019-01-26DO NOT USE Merge branch 'master' into debounce_refactorAlex Ong30-952/+450
Merged, however now there are two debounce.h and debounce.c to mess around with and coalesce. # Conflicts: # quantum/matrix.c
2019-01-26Fix RGBLIGHT_SLEEP function (#4865)Drashna Jaelre1-17/+30
* Only re-enable RGBLIGHT if it was on when going to sleep * Reformat file to follow QMK Standards * Fix check, since this is a loop, whoops Much thanks to @Rockman18 for catching this and posting the additional code!
2019-01-26Circular animation (#4796)Drashna Jaelre2-6/+18
* Add ability to animate arm_atsam led matrix from the center of a circle * Make arm_atsam led matrix circular animation circular rather than obloid * Fix indentation in tmk_core led_matrix.c
2019-01-25Add MOD_MASK_* macros to core code (#4337)Konstantin Đorđević1-0/+16
* Add MOD_MASK_* macros to core code * MOD_MASK_ALL → MOD_MASK_CSAG
2019-01-25Fix oneshot_time wrong type (#3696)Shihpin Tseng1-2/+2
* Fix oneshot_time wrong type * Fix oneshot_time_layer wrong type
2019-01-25Add support for RETRO_TAPPING to LT(layer, kc)lambda_sakura2-1/+10
2019-01-22Always read two bytes from the endpoint if we have two bytes to readfauxpark1-5/+1
When this if statement is false, it will cause the report ID to be read as the LED state. We already know there are two bytes in the endpoint, which is a reasonably good indicator that it contains a report ID, so we should always read both.
2019-01-21Tidy up IS_{,HOST_}LED_{ON,OFF} macros (#4894)Konstantin Đorđević1-11/+6
* Tidy up IS_{,HOST_}LED_{ON,OFF} macros * Tweak LED control docs
2019-01-18Flip definitions of macOS brightness aliasJunya Ogura1-2/+2
Before: KC_BRMU - Brightness Down KC_BRMD - Brightness Up After: KC_BRMU - Brightness Up KC_BRMD - Brightness Down
2019-01-18Defined IS_(HOST_)LED_ON/OFF() and improved LED documentation (#4853)DidierLoiseau1-0/+6
* Defined IS_(HOST_)LED_ON/OFF() and improved LED documentation * Update docs/custom_quantum_functions.md Co-Authored-By: DidierLoiseau <didierloiseau+github@gmail.com> * Update docs/custom_quantum_functions.md Co-Authored-By: DidierLoiseau <didierloiseau+github@gmail.com> * Integrated @drashna and @fauxpark's PR comments - changed all plurals of "LED" to "LEDs" in the file - rewording of the note about host_keyboard_leds() vs. led_set_user() * Update docs/custom_quantum_functions.md Co-Authored-By: DidierLoiseau <didierloiseau+github@gmail.com>
2019-01-18MacOS Brightness Alias (#4836)Jeremy Bernhardt1-0/+4
* Added aliases for OSX brightness * Updated docs for alises * Moved aliases, added docs to Brightness section * Update docs/keycodes.md Co-Authored-By: germ <jeremythegeek@gmail.com> * Update docs/keycodes.md Co-Authored-By: germ <jeremythegeek@gmail.com> * Update keycode.h * Update keycode.h * Update keycodes.md * Update docs/keycodes.md Co-Authored-By: germ <jeremythegeek@gmail.com>
2019-01-17Simplify split_common Code significantly (#4772)James Churchill1-0/+2
* Eliminate separate slave loop Both master and slave run the standard keyboard_task main loop now. * Refactor i2c/serial specific code Simplify some of the preprocessor mess by using common function names. * Fix missing #endif * Move direct pin mapping support from miniaxe to split_common For boards with more pins than sense--sorry, switches. * Reordering and reformatting only * Don't run matrix_scan_quantum on slave side * Clean up the offset/slaveOffset calculations * Cut undebounced matrix size in half * Refactor debouncing * Minor fixups * Split split_common transport and debounce code into their own files Can now be replaced with custom versions per keyboard using CUSTOM_TRANSPORT = yes and CUSTOM_DEBOUNCE = yes * Refactor debounce for non-split keyboards too * Update handwired/xealous to build using new split_common * Fix debounce breaking basic test * Dodgy method to allow a split kb to only include one of i2c/serial SPLIT_TRANSPORT = serial or SPLIT_TRANSPORT = i2c will include only that driver code in the binary. SPLIT_TRANSPORT = custom (or anything else) will include neither, the keyboard must supply it's own code if SPLIT_TRANSPORT is not defined then the original behaviour (include both avr i2c and serial code) is maintained. This could be better but it would require explicitly updating all the existing split keyboards. * Enable LTO to get lets_split/sockets under the line * Add docs for SPLIT_TRANSPORT, CUSTOM_MATRIX, CUSTOM_DEBOUNCE * Remove avr-specific sei() from split matrix_setup Not needed now that slave doesn't have a separate main loop. Both sides (on avr) call sei() in lufa's main() after exiting keyboard_setup(). * Fix QUANTUM_LIB_SRC references and simplify SPLIT_TRANSPORT. * Add comments and fix formatting.
2019-01-17Add documentation and fix formating (#4860)Drashna Jaelre1-156/+145
2019-01-16Add some function comments in action_layer.c (#4858)Nikolaus Wittenstein1-6/+6
2019-01-12Improved fix for __always_inline redefinition bugJames Churchill1-1/+3
Instead of changing based on the version of GCC, check for the presence of the macro instead.
2019-01-12Fix Caps Lock LEDs once and for all (#4824)fauxpark1-9/+12
* Check the size of the SET_REPORT packet If we have two bytes, that probably means the first is a report ID. The 6KRO interface may or may not have one, but the NKRO interface always does, so we need to check this regardless of whether KEYBOARD_SHARED_EP is defined. * Fix indentation
2019-01-09Add missing parentheses to some important macros (#4775)Konstantin Đorđević1-3/+3
* Add missing parentheses to quantum_keycodes macros * Add missing parentheses to progmem macros
2019-01-07Update to arm_atsam wait and timer routinespatrickmt10-115/+55
Microsecond (us) delays are now handled by a busy wait loop according to MCU frequency. This replaces the system counter method which had an overhead of around 12us. TC5 device and supporting routines removed as it was the old us delay counter. wait_ms is now properly a macro to CLK_delay_ms. wait_us is now properly a macro to CLK_delay_us. Removed CLK_get_us as it has no use. All calls to CLK_get_ms() have been replaced by timer_read64() with corrected typing. All calls to CLK_delay_ms() have been replaced by wait_ms(). All calls to CLK_delay_us() have been replaced by wait_us() and timings verified or updated as needed after review on scope. Corrected typing of variables using 64bit ms timer readings if needed.
2019-01-07Fix indentation in tmk_core led_matrix.cIan O'Dea1-9/+9
2019-01-07Make arm_atsam led matrix circular animation circular rather than obloidIan O'Dea2-1/+4
2019-01-07Add ability to animate arm_atsam led matrix from the center of a circleIan O'Dea2-6/+15
2019-01-07Final HS60v2 changes. (#4790)yiancar8-649/+173
* initial commit, this now mostly works - RGB controls work - Dynamic keymap still broken due to eeprom - Via works * STM32 eeprom update - Update EEPROM emulation library to handle 8bit data like AVR. - This library also allows for multiple page pairs resulting in greater EEPROM size flexibility * hs60 changes * HS60 hhkb added * Update keyboards/hs60/v2/config.h Co-Authored-By: yiancar <yiangosyiangou@cytanet.com.cy>
2019-01-05Add underscores to names of brightness control constants in report.h (#4764)Konstantin Đorđević1-4/+4
2019-01-04Merge branch 'master' into debounce_refactorAlex Ong98-487/+19507
# Conflicts: # tmk_core/common/keyboard.c
2018-12-28Keep pressed keys on layer state change (fixes #2053, #2279) (#3905)Konstantin Đorđević3-1/+19
* Keep pressed keys on layer state change * Add doc comment for clear_keyboard_but_mods_and_keys * Keep pressed keys only if PREVENT_STUCK_MODIFIERS is on * Check STRICT_LAYER_RELEASE instead of PREVENT_STUCK_MODIFIERS
2018-12-15Refactor quantum/split_common/i2c.c, quantum/split_common/serial.c (#4522)Takeshi ISHII2-8/+32
* add temporary compile test shell script * Extended support of SKIP_VERSION to make invariant compile results during testing. * build_keyboard.mk, tmk_core/rules.mk: add LIB_SRC, QUANTUM_LIB_SRC support Support compiled object enclosed in library. e.g. ``` LIB_SRC += xxxx.c xxxx.c --> xxxx.o ---> xxxx.a ``` * remove 'ifdef/ifndef USE_I2C' from quantum/split_common/{i2c|serial}.c * add SKIP_DEBUG_INFO into tmk_core/rules.mk When SKIP_DEBUG_INFO=yes is specified, do not use the -g option at compile time. * tmk_core/rules.mk: Library object need -fno-lto * add SKIP_DEBUG_INFO=yes * remove temporary compile test shell script * add '#define SOFT_SERIAL_PIN D0' to keyboards/lets_split/rev?/config.h * quantum/split_common/serial.c: Changed not to use USE_I2C.
2018-12-15Add left/right EEPROM flashing for DFU (#4560)Drashna Jaelre1-1/+30
2018-12-14Fix macro redefinition for GNUC compilers > 6patrickmt1-1/+1
GNUC compilers greater than version 6 already have the macro __always_inline defined. This fix checks GNUC version before defining the macro itself.
2018-12-14Fix up tap_code functionality (#4609)Drashna Jaelre2-1/+13
* 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>