summaryrefslogtreecommitdiff
path: root/tmk_core
AgeCommit message (Collapse)Author
2020-08-08[Bug] Fix Swap Hands bug introduced by OSH (#9968)Drashna Jaelre
Fixes the handling for the oneshot cleanup, so it only cleans up if it is active. It should not cleanup of SHO is off (eg using a normal oneshot key), nor if it's actively pressed or used. Previous behavior BROKE swap hand key.
2020-08-08Enable OLED support for Teensy 3.2/LC (#7591)Joel Challis
* I2C_TIMEOUT is not defined on arm teensy * Work round teensy having different ChibiOS config options * Stash OLED conf files * update comment * update comment * Remove stm32 alias to allow teensy alt mode format code according to conventions [skip ci]
2020-08-08Implemented New MK_COMBINED Functionality (#9557)nathanvercaemert
* implemented new mousekey_combined functionality * minor formatting change to documentation * Update tmk_core/common/mousekey.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update tmk_core/common/mousekey.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update tmk_core/common/mousekey.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update tmk_core/common/mousekey.c Co-authored-by: Ryan <fauxpark@gmail.com> * Update docs/feature_mouse_keys.md Co-authored-by: Nick Brassel <nick@tzarc.org> * Update docs/feature_mouse_keys.md Co-authored-by: Nick Brassel <nick@tzarc.org> * Update docs/feature_mouse_keys.md Co-authored-by: Nick Brassel <nick@tzarc.org> * Update docs/feature_mouse_keys.md Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Nathan Vercaemert <nathan.vercaemert@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Nick Brassel <nick@tzarc.org> format code according to conventions [skip ci]
2020-08-08Add TAP_CODE_DELAY to Mod-Tap (#9422)Sven Grunewaldt
2020-08-08Add movement hook to ps2_mouse (#8805)Manna Harbour
Process mouse movement in the keymap before it is sent to the host. Example uses include filtering noise, adding acceleration, and automatically activating a layer. To use, define the following function in your keymap: void ps2_mouse_moved_user(report_mouse_t *mouse_report);
2020-08-08Fix sharing of mouse button state from mousekeys to ps2_mouse (#9124)Manna Harbour
With this change, when ps2_mouse is disabled, mousekeys works as usual. With ps2_mouse enabled, mousekeys button state is shared with ps2_mouse for clicking, dragging, and scrolling, mousekeys clicks are produced by ps2_mouse only, and mouskeys button state is transferred to mousekeys without generating clicks to enable mousekeys dragging. Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Drashna Jaelre <drashna@live.com>
2020-08-08Fixing MIDI for ARM without NKRO enabled (#9466)AlexOConnorHub
2020-08-08Fix for One Shot Layer not being cleaned up after some actions (#8832)Joshua Diamond
2020-08-08Fix one shot swaphands compiler error when NO_ACTION_ONESHOT is defined (#9296)Tsan-Kuang Lee
* init * add RETRO_TAP; tap anyway after TAP_TERM, if no interruption * RETRO_TAP works for other types of taps * revert to upstream/master * explain this fork in readme * use one readme.md file instaed * fix the error if NO_ACTION_ONESHOT is defined * restore readme.md to upstream master Co-authored-by: Tsan-Kuang Lee <tsan.kuang.lee@gmail.com>
2020-08-08adds support for the atmega328 (#9043)itsnoteasy
Co-authored-by: Ryan <fauxpark@gmail.com>
2020-08-08Move encoder_read to common location (qmk#9003)zvecr
2020-08-08Move dip switch init to back of the init process (#9233)Drashna Jaelre
2020-08-08Fix build when using IGNORE_MOD_TAP_INTERRUPT_PER_KEY. (#9258)Nick Brassel
2020-08-082020 May 30 Breaking Changes Update (#9215)James Young
* Branch point for 2020 May 30 Breaking Change * Migrate `ACTION_LAYER_TOGGLE` to `TG()` (#8954) * Migrate `ACTION_MODS_ONESHOT` to `OSM()` (#8957) * Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (#8958) * Migrate `ACTION_LAYER_MODS` to `LM()` (#8959) * Migrate `ACTION_MODS_TAP_KEY` to `MT()` (#8968) * Convert V-USB usbdrv to a submodule (#8321) * Unify Tap Hold functions and documentation (#8348) * Changing board names to prevent confusion (#8412) * Move the Keyboardio Model01 to a keyboardio/ subdir (#8499) * Move spaceman keyboards (#8830) * Migrate miscellaneous `fn_actions` entries (#8977) * Migrate `ACTION_MODS_KEY` to chained mod keycodes (#8979) * Organizing my keyboards (plaid, tartan, ergoinu) (#8537) * Refactor Lily58 to use split_common (#6260) * Refactor zinc to use split_common (#7114) * Add a message if bin/qmk doesn't work (#9000) * Fix conflicting types for 'tfp_printf' (#8269) * Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (#6480) * Refactor and updates to TKC1800 code (#8472) * Switch to qmk forks for everything (#9019) * audio refactor: replace deprecated PLAY_NOTE_ARRAY (#8484) * Audio enable corrections (2/3) (#8903) * Split HHKB to ANSI and JP layouts and Add VIA support for each (#8582) * Audio enable corrections (Part 4) (#8974) * Fix typo from PR7114 (#9171) * Augment future branch Changelogs (#8978) * Revert "Branch point for 2020 May 30 Breaking Change"
2020-08-08Fix capitalisation of "GitHub" (#9184)Ryan
2020-06-12Added missing shutdown_user() hook (#9180)yulei
* add missing shutdown_user() * use reset_keyboard() from quantum
2020-06-12Allow for overriding RAW endpoint usage page and ID. (#8834)Nick Brassel
* Allow for overriding RAW endpoint usage page and ID. * Move usb_descriptor_common.h. * Docs update.
2020-06-12Fix ChibiOS FPU build logic (#9132)Joel Challis
2020-06-12Disable Mousekey Command interface when Constant speed is enabled (#7017)Drashna Jaelre
2020-06-12CLI: Tune doctor's udev rule checking to match #8750Erovia
2020-06-12V-USB Interface reorder (#9090)yiancar
2020-06-12One shot support for swap hands (#8590)Zsolt Parragi
This commits add the SH_OS keycode, which works similarly to one shot layers: * while pressed, the keyboard is swapped * if no keys were pressed while it was pressed, the next key press is swapped SH_OS also supports chaining with one shot layers: OSL(x) + SH_OS + key interprets the key press on the oneshot layer. The ONESHOT_TIMEOUT setting used by one shot keys and layers is also used by oneshot swap hands. In the above chaining scenario the timeout of the oneshot layer is reset when swap hands is activated. Resolves #2682
2020-06-12Optimization for scanning less layers. (#8311)Alex Ong
* Optimization for scanning less layers. * Rename NUM_LAYERS to MAX_LAYER.
2020-06-12Improve security of avrdude by eliminating the use of well-known names. (#9026)Zach White
* Improve security by eliminating the use of well-known names. * Add an additional $ so the shell expands $TMP1 and $TMP2 Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Joel Challis <git@zvecr.com>
2020-06-12Remove Bluefruit protocol (#9008)Ryan
* Remove Bluefruit protocol * Remove dir from doxygen TODO pile
2020-06-12Initial vusb console support (#8559)Joel Challis
2020-06-12Add some usages needed for ChromeOS hosts (#8996)Joshua Moses Diamond
2020-06-12Provide a mechanism for split keyboards to process key press on both halves ↵Joel Challis
(#9001)
2020-06-12Clean up ATSAM ifdefs (#8808)Ryan
2020-06-12Remove Atmel FLIP from install scripts and documentation (#8822)Ryan
2020-06-12Fix AVR SPI parameter configuration, remove timeouts due to sync protocol. ↵Nick Brassel
(#8775)
2020-06-12Add support for hardware and board initialisation overrides. (#8330)Nick Brassel
* Add support for hardware and board initialisation overrides. * qmk cformat. * Add some documentation. * Docs clarity. * Make early_hardware_init_pre a no-op for now, until migrations occur. * Doco update * Make distinction between keyboard and ChibiOS board in docs * Doc anchors. * Update tmk_core/protocol/chibios/main.c Co-Authored-By: Joel Challis <git@zvecr.com> * Rework bootloader entry to be off by default, allow opting-in. Co-authored-by: Joel Challis <git@zvecr.com>
2020-06-12Add *OPT aliases for *ALT keycodes and macros (#8714)Konstantin Đorđević
2020-06-12Fix bug with layer caching in get_event_keycode (#8693)Drashna Jaelre
* Fix bug with layer caching in get_event_keycode * Improve naming
2020-06-12Various fixes to how timer differences are calculated (#8585)Purdea Andrei
* tmk_core/common: Fixing TIMER_DIFF macro to calculate difference correctly after the timer wraps. Let's go through an example, using the following macro: If the first timer read is 0xe4 and the second one is 0x32, the timer wrapped. If the timer would have had more bits, it's new value would have been 0x132, and the correct difference in time is 0x132 - 0xe4 = 0x4e old code TIMER_DIFF_8(0x32, 0xe4) = 0xff - 0xe4 + 0x32 = 0x4d, which is wrong. new code TIMER_DIFF_8(0x32, 0xe4) = 0xff + 1 - 0xe4 + 0x32 = 0x4e, which is correct. This also gives a chance for a smart compiler to optimize the code using normal integer overflow. For example on AVR, the following C code: uint8_t __attribute__ ((noinline)) test(uint8_t current_timer, uint8_t start_timer) { return TIMER_DIFF_8(current_timer, start_timer); } With the original code, it gets translated to the following list of instructions: 00004c6e <test>: 4c6e: 98 2f mov r25, r24 4c70: 86 1b sub r24, r22 4c72: 96 17 cp r25, r22 4c74: 08 f4 brcc .+2 ; 0x4c78 <test+0xa> 4c76: 81 50 subi r24, 0x01 ; 1 4c78: 08 95 ret But with this commit, it gets translated to a single instruction: 00004c40 <test>: 4c40: 86 1b sub r24, r22 4c42: 08 95 ret This unfortunately doesn't always work so nicely, for example the following C code: int __attribute__ ((noinline)) test(uint8_t current_timer, uint8_t start_timer) { return TIMER_DIFF_8(current_timer, start_timer); } (Note: return type changed to int) With the original code it gets translated to: 00004c6e <test>: 4c6e: 28 2f mov r18, r24 4c70: 30 e0 ldi r19, 0x00 ; 0 4c72: 46 2f mov r20, r22 4c74: 50 e0 ldi r21, 0x00 ; 0 4c76: 86 17 cp r24, r22 4c78: 20 f0 brcs .+8 ; 0x4c82 <test+0x14> 4c7a: c9 01 movw r24, r18 4c7c: 84 1b sub r24, r20 4c7e: 95 0b sbc r25, r21 4c80: 08 95 ret 4c82: c9 01 movw r24, r18 4c84: 84 1b sub r24, r20 4c86: 95 0b sbc r25, r21 4c88: 81 50 subi r24, 0x01 ; 1 4c8a: 9f 4f sbci r25, 0xFF ; 255 4c8c: 08 95 ret Wth this commit it gets translated to: 00004c40 <test>: 4c40: 28 2f mov r18, r24 4c42: 30 e0 ldi r19, 0x00 ; 0 4c44: 46 2f mov r20, r22 4c46: 50 e0 ldi r21, 0x00 ; 0 4c48: 86 17 cp r24, r22 4c4a: 20 f0 brcs .+8 ; 0x4c54 <test+0x14> 4c4c: c9 01 movw r24, r18 4c4e: 84 1b sub r24, r20 4c50: 95 0b sbc r25, r21 4c52: 08 95 ret 4c54: c9 01 movw r24, r18 4c56: 84 1b sub r24, r20 4c58: 95 0b sbc r25, r21 4c5a: 93 95 inc r25 4c5c: 08 95 ret There is not much performance improvement in this case, however at least with this commit it functions correctly. Note: The following commit will improve compiler output for the latter example. * tmk_core/common: Improve code generation for TIMER_DIFF* macros Because of integer promotion the compiler is having a hard time generating efficient code to calculate TIMER_DIFF* macros in some situations. In the below example, the return value is "int", and this is causing the trouble. Example C code: int __attribute__ ((noinline)) test(uint8_t current_timer, uint8_t start_timer) { return TIMER_DIFF_8(current_timer, start_timer); } BEFORE: (with -Os) 00004c40 <test>: 4c40: 28 2f mov r18, r24 4c42: 30 e0 ldi r19, 0x00 ; 0 4c44: 46 2f mov r20, r22 4c46: 50 e0 ldi r21, 0x00 ; 0 4c48: 86 17 cp r24, r22 4c4a: 20 f0 brcs .+8 ; 0x4c54 <test+0x14> 4c4c: c9 01 movw r24, r18 4c4e: 84 1b sub r24, r20 4c50: 95 0b sbc r25, r21 4c52: 08 95 ret 4c54: c9 01 movw r24, r18 4c56: 84 1b sub r24, r20 4c58: 95 0b sbc r25, r21 4c5a: 93 95 inc r25 4c5c: 08 95 ret AFTER: (with -Os) 00004c40 <test>: 4c40: 86 1b sub r24, r22 4c42: 90 e0 ldi r25, 0x00 ; 0 4c44: 08 95 ret Note: the example is showing -Os but improvements can be seen at all optimization levels, including -O0. We never use -O0, but I tested it to make sure that no extra code is generated in that case.OA * quantum/debounce: Fix custom wrapping timers in eager_pr and eager_pk debounce algorithms Please see the below simulated sequence of events: Column A is the 16-bit value returned by read_timer(); Column B is the value returned by custom_wrap_timer_read(); Column C is the original code: (timer_read() % MAX_DEBOUNCE) A, B, C 65530, 19, 30 65531, 20, 31 65532, 21, 32 65533, 22, 33 65534, 23, 34 65535, 24, 35 0 25, 0 1, 26, 1 2, 27, 2 3, 28, 3 4, 29, 4 5, 30, 5 read_timer() wraps about every 1.09 seconds, and so debouncing might fail at these times without this commit. * quantum/debounce/eager_pr and eager_pk: modifications for code readability according to code review. * quantum/debounce/eager_pr and eager_pk: modifications for code readability according to code review. (2)
2020-06-12Add PS2_MOUSE_ROTATE to compensate for device orientation (#8650)Manna Harbour
* Add PS2_MOUSE_ROTATE to compensate for device orientation * fixup! Add PS2_MOUSE_ROTATE to compensate for device orientation * Reformat with IndentPPDirectives: AfterHash as per #6316
2020-06-12Fix compile issues related to NO_ACTION_MACRO/FUNCTION and LTO_ENABLE (#8663)Konstantin Đorđević
* Define NO_ACTION_MACRO/FUNCTION in header instead of makefile when LTO is enabled Currently, boards and keymaps that define NO_ACTION_MACRO/FUNCTION unconditionally will not compile with LTO_ENABLE (#8604). This fixes the issue by moving the definitions from common.mk to action.h, which enables us to check for previous definitions of those macros (this cannot be done in a makefile). * Remove LTO checks in templates Since now NO_ACTION_MACRO/FUNCTION are defined as needed in action.h (which is included by quantum.h), checking for LTO in keyboard and user code is no longer required. * Update LTO_ENABLE docs
2020-06-12spi_master for AVR (#8299)Ryan
* Change _delay_ms/us() to wait_ms/us() * Switch to platform-agnostic GPIO macros * Add AVR spi_master and migrate Adafruit BLE code * Set verbose back to false * Add clock divisor, bit order and SPI mode configuration for init * Add start and stop functions * Move configuration of mode, endianness and speed to `spi_start()` * Some breaks here would be good * Default Adafruit BLE clock divisor to 4 (2MHz on the Feather 32U4) * Remove mode and divisor enums * Add some docs * No hr at EOF * Add links in sidebar
2020-06-12V-USB: Remove some stuff from usbconfig.h that should not be configurable ↵Ryan
(#8656) * V-USB: Remove some stuff from usbconfig.h that should not be configurable * Clean up some ifdefs * And some more * Even more
2020-06-12V-USB remote wakeup (#7627)Drashna Jaelre
* V-USB remote wakeup Backport from tmk/tmk_keyboard@391c979be751eaf113c8f53c36644a6bb6ff12f6 * Change vusb.c remote wake config as per fauxpark's suggestion
2020-06-12Initial support for ATtiny85 (#8632)Joel Challis
* Initial support for ATtiny85 * Update mcu selection
2020-06-12Fix `pgm_read_ptr()` define for ARM (#8658)Ryan
2020-06-12Strip out features to allow minimum firmware sizes (#8645)Joel Challis
2020-06-12Updated V-USB template to allow usbFunctionWriteOut (#8634)yiancar
2020-06-12Miscellaneous cleanups (#8639)Ryan
* Miscellaneous cleanups * Cast NO_PIN
2020-06-12Migrate :program logic to :flash (#8631)Joel Challis
2020-06-12add hid_raw feature to VUSB (#8380)Takuya Urakawa
* rewrite usbhid feature on vusb * Apply suggestions from code review Co-Authored-By: Ryan <fauxpark@gmail.com> * fix typo * fix typo again * Update tmk_core/protocol/vusb/vusb.c Co-Authored-By: Ryan <fauxpark@gmail.com> * clean up defines Co-authored-by: Ryan <fauxpark@gmail.com>
2020-06-12fixed problem with implicit declaration in quantum/rgblight.c (#8406)Casper Weiss Bang
* Update tmk_core/common/progmem.h Co-Authored-By: Ryan <fauxpark@gmail.com> * Update quantum/rgblight.c Co-Authored-By: Ryan <fauxpark@gmail.com> * fixed problem with implicit declaration in quantum/rgblight.c (#8381) Co-authored-by: Ryan <fauxpark@gmail.com>
2020-06-12V-USB: Use structs for USB descriptors (#8572)Ryan
* V-USB: Use structs for USB descriptors * Update usbconfigs * cformat pass
2020-06-12Enable SLEEP_LED on ATmega32A (#8531)Joel Challis
* Port over some AVR backlight logic to SLEEP_LED * Port over some AVR backlight logic to SLEEP_LED - add timer 3 * Port over some AVR backlight logic to SLEEP_LED - clang format * Enable SLEEP_LED within vusb protocol