summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol
Commit message (Collapse)AuthorAgeFilesLines
* Format code according to conventions (#12681)github-actions[bot]2021-04-251-2/+2
| | | Co-authored-by: QMK Bot <hello@qmk.fm>
* 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
* Format code according to conventions (#12540)github-actions[bot]2021-04-101-11/+11
| | | Co-authored-by: QMK Bot <hello@qmk.fm>
* 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
* Move `API_SYSEX_MAX_SIZE` out of `config_common.h` (#12302)Ryan2021-03-251-1/+1
|
* [CI] Format code according to conventions (#12277)github-actions[bot]2021-03-182-4/+4
| | | Co-authored-by: QMK Bot <hello@qmk.fm>
* XT converter cleanup (#12264)Ryan2021-03-182-20/+26
|
* 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
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2020-12-221-3/+2
|\|
| * V-USB: Fix initial dropped keypress (#11263)Ryan2020-12-231-3/+2
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2020-12-211-1/+1
|\|
| * Fix small typo in V-USB configuration descriptor (#11253)Ryan2020-12-211-1/+1
| |
* | Merge remote-tracking branch 'upstream/master' into developfauxpark2020-12-184-141/+141
|\|
| * Run cformat and dos2unix manually (#11235)Ryan2020-12-174-141/+141
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2020-12-162-3/+3
|\|
| * Normalise include statements in keyboard code (#11185)Ryan2020-12-162-3/+3
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2020-12-118-11/+11
|\|
| * Normalise include statements in core code (#11153)Ryan2020-12-118-11/+11
| | | | | | | | | | * Normalise include statements in core code * Missed one
* | gcc 10 compatibility for Drop alt (#9485)Jesper Jensen2020-12-062-2/+5
|/ | | | | | | | | | | | | | | | | | | | | | * Split dmac_desc declaration and definition According to the official documentation[1] gcc 10 is more strict about correct extern usage. I've had to move the definition of dmac_desc and dmac_desc_wb from i2c_master.h to the corresponding .c file. This could be an issue if anyone includes the i2c_master.h file without liking with the object file. [1]: https://gcc.gnu.org/gcc-10/porting_to.html * Remove the keymap_config definition from keymaps The keymap_config def was conflicting with the one found in tmk_core/common/magic.c. Declaring it extern in magic.c breaks a bunch of keyboard that rely on that declaration (like the ergodox). Instead I've removed the one found in the keymap.c of the massdrop alt. The same change will have to be made to other keyboards.