summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Initial migration of suspend callbacks (#16067)Joel Challis2022-02-056-116/+61
| | | | | * Initial migration of suspend logic * Add header
* ChibiOS timer fixes (#16017)Sergey Vlasov2022-02-051-23/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * chibios/timer: Move the 16-bit timer handling into a separate function Extract the code which effectively makes a 32-bit tick counter from a possibly 16-bit ChibiOS system timer into a separate function. Does not really change the behavior of the timer API, but makes the actions done in `timer_clear()` and `timer_read32()` more obvious. * chibios/timer: Rename some variable to better reflect their role * chibios/timer: Fix 32-bit tick counter overflow handling The QMK timer API implementation for ChibiOS used a 32-bit tick counter (obtained from the ChibiOS system timer) and then converted the value to milliseconds to produce the timer value for QMK. However, the frequency of the ChibiOS timer is above 1000 Hz in most cases (values of 10000 Hz or even 100000 Hz are typically used), and therefore the 32-bit tick counter was overflowing and wrapping around much earlier than expected (after about 5 days for 10000 Hz, or about 12 hours for 100000 Hz). When this wraparound happened, the QMK timer value was jumping back to zero, which broke various code dealing with timers (e.g., deferred executors). Just making the tick counter 64-bit to avoid the overflow is not a good solution, because the ChibiOS code which performs the conversion from ticks to milliseconds may encounter overflows when handling a 64-bit value. Adjusting just the value converted to milliseconds to account for lost 2**32 ticks is also not possible, because 2**32 ticks may not correspond to an integer number of milliseconds. Therefore the tick counter overflow is handled as follows: - A reasonably large number of ticks (the highest multiple of the ChibiOS timer frequency that fits into uint32_t) is subtracted from the tick counter, so that its value is again brought below 2**32. The subtracted value is chosen so that it would correspond to an integer number of seconds, therefore it could be converted to milliseconds without any loss of precision. - The equivalent number of milliseconds is then added to the converted QMK timer value, so that the QMK timer continues to count milliseconds as it was before the tick counter overflow. * chibios/timer: Add a virtual timer to make 16-bit timer updates more reliable The code which extends the 16-bit ChibiOS system timer to a 32-bit tick counter requires that it is called at least once for every overflow of the system timer (otherwise the tick counter can skip one or more overflow periods). Normally this requirement is satisfied just from various parts of QMK code reading the current timer value; however, in some rare circumstances the QMK code may be blocked waiting for some event, and when this situation is combined with having a rather high timer frequency, this may result in improper timekeeping. Enhance the timer reliability by adding a ChibiOS virtual timer which invokes a callback every half of the timer overflow period. The virtual timer callback can be invoked even when the normal QMK code is blocked; the only requirement is that the timer interrupts are enabled, and the ChibiOS kernel is not locked for an excessive time (but the timer update will eventually work correctly if the virtual timer handling is not delayed by more than a half of the timer overflow period). Keeping a virtual timer always active also works around a ChibiOS bug that can manifest with a 16-bit system timer and a relatively high timer frequency: when all active virtual timers have delays longer than the timer overflow period, the handling of virtual timers stops completely. In QMK this bug can result in a `wait_ms()` call with a delay larger than the timer overflow period just hanging indefinitely. However, when the timer update code adds a virtual timer with a shorter delay, all other virtual timers are also handled properly.
* Update outputselect to use platform connected state API (#16185)Joel Challis2022-02-041-11/+2
|
* Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-044-76/+97
|\
| * MTBKeys MTB60 Hotswap Layout Macro Refactor (#16194)James Young2022-02-044-76/+97
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-0438-0/+2011
|\|
| * [Keyboard] Add Keyboards GL516s (#14950)Salicylic-acid32022-02-0438-0/+2011
| | | | | | | | Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-044-13/+16
|\|
| * Mokey xox70hot: rename LAYOUT to LAYOUT_tkl_nofrow_ansi_tsangan (#16193)James Young2022-02-034-13/+16
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-041-1/+1
|\|
| * Point out that deferred execution needs to be enabled in rules.mk (#16196)Nick Brassel2022-02-041-1/+1
| |
* | Ensure `version.h` is recreated each build. (#16188)Nick Brassel2022-02-042-6/+8
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-031-0/+1
|\|
| * Fix axis inversion (#16179)Richard2022-02-031-0/+1
| |
* | Create a build error if no bootloader is specified. (#16181)Nick Brassel2022-02-033-3/+10
| | | | | | | | | | | | | | | | | | * Create a build error if no bootloader is specified. * Update builddefs/bootloader.mk Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-025-313/+449
|\|
| * Fix a couple of mismatched info.json layout names (#16164)Ryan2022-02-025-313/+449
| | | | | | | | | | | | | | * Fix a couple of mismatched info.json layout names * Fix layouts * Clean up layouts
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-020-0/+0
|\|
| * Fixup line endings for kt60-M.Nick Brassel2022-02-031-17/+17
| |
* | Format code according to conventions (#16169)QMK Bot2022-02-021-17/+17
| |
* | Fixup builds so that teensy EEPROM knows which MCU it's targeting. (#16168)Nick Brassel2022-02-021-0/+3
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-0211-0/+331
|\|
| * [Keyboard] Add keyten kt60-M (#16150)Ivan Gromov2022-02-0111-0/+331
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-023-52/+106
|\|
| * [Keymap] Add MacOS layer (#16151)Andre Brait2022-02-013-52/+106
| | | | | | Co-authored-by: Drashna Jaelre <drashna@live.com>
* | Fix issues with Python Tests (#16162)Drashna Jaelre2022-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | * Reformat python due to yapf changes * Fix pytest keymap list test * revert formatting * Use contra, because, well https://www.reddit.com/r/MechanicalKeyboards/comments/8riofq/did_i_kill_my_contra/
* | Remove old .gitignore entry. Add more macOS junk exclusions. (#16167)Nick Brassel2022-02-021-1/+1
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-0211-186/+373
|\|
| * [Keyboard] Added keymaps for SPRH and update encoder (#16098)joedinkle2022-02-0111-186/+373
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-024-1/+94
|\|
| * `qmk doctor`: display qmk_firmware version tag (#16155)Ryan2022-02-012-1/+14
| |
| * [Keyboard] Add YMDK sp64 VIA support (#16152)Adrian Fleiszer2022-02-012-0/+80
| |
* | Fixup multibuild filegen (#16166)Nick Brassel2022-02-022-2/+8
| | | | | | | | | | * Add env variable support to multibuild. * Generate version.h in build-specific location.
* | Don't make EEPROM size assumptions with dynamic keymaps. (#16054)Nick Brassel2022-02-0217-153/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't make EEPROM size assumptions with dynamic keymaps. * Add support for checking against emulated flash, error out if someone attempts to build a board without specifying EEPROM size. * Reorder defines so that MCU is considered last. * Refactor EEPROM definitions for simplicity. * Fix max sizing of kabedon/kabedon980. * Fix max sizing of mechlovin/olly/jf. * Fix unit tests. * Review comments, add messages with values during build failures.
* | [Keyboard] move woodkeys.click keyboards to /woodkeys (#16113)peepeetee2022-01-3191-10/+10
| |
* | [Keyboard] move @drhigsby 's boards into /drhigsby (#16041)peepeetee2022-01-3151-11/+11
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-011-0/+49
|\|
| * [Keyboard] enable rgb modes for jkb65 (#16159)Drashna Jaelre2022-01-311-0/+49
| |
* | [Keyboard] move @vuhopkep 's keebs into /hnahkb (#16102)peepeetee2022-01-3124-6/+6
| |
* | [Keyboard] fix missed .noci in reviung move (#16107)peepeetee2022-01-312-0/+0
| |
* | [Keyboard] move @tominabox1 's keebs into /tominabox1 (#16109)peepeetee2022-01-3175-7/+7
| |
* | [Keyboard] move niu_mini to /kbdfans (#16112)peepeetee2022-01-3150-2/+2
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-015-16/+55
|\|
| * [Keyboard] R2 version of jadookb/jkb65 (#16129)WiZ.GG2022-01-315-16/+55
| | | | | | | | Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
* | [Keyboard] move @omkbd 's boards to /omkbd (#16116)peepeetee2022-01-31161-51/+51
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-011-3/+3
|\|
| * [Keyboard] ReadMe corrections for crkbd (#16149)Ben Allen2022-01-311-3/+3
| |
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-013-35/+3
|\|
| * [Keyboard] Typo correction in ferris sweep readme (#16148)Albert Y2022-01-311-1/+1
| |
| * [Keyboard] Simplify handedness for cradio (#16147)Albert Y2022-01-312-34/+2
| |