summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol
Commit message (Collapse)AuthorAgeFilesLines
* Fixup housekeeping from being invoked twice per loop. (#12933)Nick Brassel2021-05-184-6/+6
|
* eeprom driver: Refactor where eeprom driver initialisation (and EEPROM ↵Purdea Andrei2021-04-251-13/+0
| | | | emulation initialisation) occurs to make it non-target-specific. (#12671)
* Merge remote-tracking branch 'origin/master' into developQMK Bot2021-04-251-2/+2
|\
| * Format code according to conventions (#12681)github-actions[bot]2021-04-251-2/+2
| | | | | | Co-authored-by: QMK Bot <hello@qmk.fm>
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-04-253-21/+33
|\|
| * Fix how USB queue overflow is handled in chibios. (#12576)Purdea Andrei2021-04-253-21/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix how USB queue overflow is handled in chibios. This commit reverts PR 12472 (commit c823fe2d3f23ed090e36ce39beed4c448298bd2f), and it implements the original intent of the commit in a better way. The original intent of the above mentioned commit was to not deadlock the keyboard when console is enabled, and hid_listen is not started. The above mentioned commit had a few drawbacks: 1) When a lot of data was printed to the console, the queue would get full, and drop data, even if hid_listen was running. (For example having matrix debug enabled just didn't work right at all) 2) I believe the function in which this was implemented is used by all other USB endpoints, so with the above change, overflow, and data loss could happen in other important functions of QMK as well. This commit implements deadlock prevention in a slightly similar way to how it's done on AVR. There is an additional static local variable, that memorizes whether the console has timeouted before. If we are in the timeouted=false state, then we send the character normally with a 5ms timeout. If it does time out, then hid_listen is likely not running, and future characters should not be sent with a timeout, but those characters should still be sent if there is space in the queue. The difference between the AVR implementation and this one is that the AVR implementation checks the queue state directly, but this implementation instead attempts to write the character with a zero timeout. If it fails, then we remain in the timeouted=true state, if it succeeds, then hid_listen started removing data from the queue, so we can go out of the timeouted=true state. * Added comment explaining the timeouted logic to console flow control. * Console flow control: refactor chibios flowcontrol code to make it more readable, and rename the timeouted variable to timed_out on both chibios and lufa. Changed comments to says timed_out is an approximation of listener_disconnected, to make it clear that it's not the same thing * fix typo
* | Apply the "NO_LIMITED_CONTROLLER_CONNECT" fix to atmega16u2 (#12482)Purdea Andrei2021-04-191-2/+2
| | | | | | Co-authored-by: Ryan <fauxpark@gmail.com>
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-04-101-11/+11
|\|
| * Format code according to conventions (#12540)github-actions[bot]2021-04-101-11/+11
| | | | | | Co-authored-by: QMK Bot <hello@qmk.fm>
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-04-101-1/+13
|\|
| * ChibiOS USB driver: prevent deadlock with CONSOLE_ENABLE = yes (#12472)Michael Stapelberg2021-04-101-1/+13
| | | | | | | | | | | | | | | | | | Before this commit, attaching an ARM-based (i.e. ChibiOS-based) keyboard that uses CONSOLE_ENABLE = yes and produces debug messages would deadlock the keyboard unless one was running hid_listen. With this commit, dead-locking writes to the queue are detected and prevented. fixes #5631
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-03-251-1/+1
|\|
| * Move `API_SYSEX_MAX_SIZE` out of `config_common.h` (#12302)Ryan2021-03-251-1/+1
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-03-182-4/+4
|\|
| * [CI] Format code according to conventions (#12277)github-actions[bot]2021-03-182-4/+4
| | | | | | Co-authored-by: QMK Bot <hello@qmk.fm>
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-03-182-20/+26
|\|
| * XT converter cleanup (#12264)Ryan2021-03-182-20/+26
| |
* | Refactor of USB code within split_common (#11890)Joel Challis2021-02-286-0/+82
|/ | | | | | | | | | | * Initial refactor of usb code within split_common * Add headers * Correct disable condition * Format * Align func name
* Format code according to conventions (#12046)github-actions[bot]2021-02-271-2/+2
| | | Co-authored-by: QMK Bot <hello@qmk.fm>
* Fix build for attiny85-based boards. (#12044)Nick Brassel2021-02-281-0/+2
|
* Format code according to conventions (#12024)github-actions[bot]2021-02-262-42/+42
| | | Co-authored-by: QMK Bot <hello@qmk.fm>
* [BUG] Massdrop develop rgb fix (#12022)Nick Brassel2021-02-262-5/+9
| | | | | | | * Allow for disabling RGB_MATRIX on Massdrop boards. * Fixup init sequence. * Make some functions static as they've got very generic names.
* Merge remote-tracking branch 'upstream/master' into developfauxpark2021-02-252-17/+40
|\
| * V-USB suspend refactor (#11891)Ryan2021-02-252-17/+40
| |
* | Output selection: Remove "USB and BT" option (#11940)Ryan2021-02-202-30/+5
| |
* | Format code according to conventions (#11905)github-actions[bot]2021-02-152-2/+1
| | | | | | Co-authored-by: QMK Bot <hello@qmk.fm>
* | Refactor platform logic within print.h (#11863)Joel Challis2021-02-143-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove GCC check from debug * Remove platform logic from common.mk * Refactor platform logic within print.h * restore debug.c format * headers * Rename function pointer type * review comments * Update tmk_core/common/printf.c Co-authored-by: Nick Brassel <nick@tzarc.org> * Format Co-authored-by: Nick Brassel <nick@tzarc.org>
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-02-071-1/+1
|\|
| * Migrate some tmk_core files to quantum (#11791)Joel Challis2021-02-071-1/+1
| | | | | | | | | | * Migrate some tmk_core files to quantum * Fix build errors
* | Remove legacy print backward compatiblitly (#11805)Joel Challis2021-02-062-5/+5
| | | | | | | | | | | | | | * Remove legacy print backward compatiblitly * Remove legacy print backward compatiblitly - core * revert comment changes
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-02-061-4/+4
|\|
| * Manual formatting fix for serial_uart.c (#11806)Ryan2021-02-061-4/+4
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-02-052-1/+26
|\|
| * Serial refactor (#11521)Ryan2021-02-062-1/+26
| |
* | Address wake from sleep instability (#11450)Joshua Diamond2021-02-022-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * resolve race condition between suspend and wake in LUFA * avoid multiple calls to suspend_power_down() / suspend_wakeup_init() * Remove duplicate suspend_power_down_kb() call * pause on wakeup to wait for USB state to settle * need the repeated suspend_power_down() (that's where the sleep is) * more efficient implementation * fine tune the pause after sending wakeup * speculative chibios version of pause-after-wake * make wakeup delay configurable, and adjust value * better location for wakeup delay
* | Decouple USB events from the USB interrupt handler. (#10437)Nick Brassel2021-02-013-9/+80
| |
* | Add support for 8 buttons to mouse report (#10807)Drashna Jaelre2021-01-282-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for 8 buttons to mouse report This includes support for 8 buttons in mousekeys. However, this does move the keys around due to the fact that the last mousekey keycode is already 0xFF, so any past that would not work with register_code and the like, breaking them for tap hold keys, encoders, and other features. * Update mouse key docs * Add changes based on feedback * Fix VUSB report size comment Because drashna red gud * Fix typo in action.c * Fix IS_MOUSE_BUTTON check * Change start range for mousekeys so that the end is 0xFF properly * condense mousekeys check
* | Remove duplicated housekeeping in arm_atsam (#11672)Gentoli2021-01-241-3/+0
| |
* | Merge remote-tracking branch 'upstream/master' into developfauxpark2021-01-154-33/+27
|\|
| * Adafruit BLE cleanups (#11556)Ryan2021-01-153-32/+26
| |
| * arm_atsam: temporarily lower raw HID endpoint/report size (#11554)Ryan2021-01-151-1/+1
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-01-112-40/+104
|\|
| * Add support for shared EP on V-USB boards (#11103)Ryan2021-01-112-40/+104
| |
* | Merge remote-tracking branch 'upstream/master' into developfauxpark2021-01-013-11/+11
|\|
| * Manually run formatting CI process (#11375)Joel Challis2021-01-013-11/+11
| |
* | Update ADB impelemtation in TMK Core (#11168)siggie08152020-12-292-85/+229
| | | | | | | | | | | | | | | | | | * Update ADB impelmentation in tmk_core to recent version. Pcked from tmk_keyboard repository revision: 48d696443857512d45f9a7329e0dd0a76345860f * Restore convenient ADB functions used in QMK port. * Do cformat.
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2020-12-271-1/+0
|\|
| * Ensure single newline at EOF for core files (#11310)Ryan2020-12-281-1/+0
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2020-12-2621-104/+46
|\|
| * Change include guards in tmk_core/ and drivers/ to pragma once (#11240)Ryan2020-12-2621-104/+46
| |