Age | Commit message (Collapse) | Author |
|
* Add fast_timer_t that is 16-bit or 32-bit based on architecture
A 16-bit timer will overflow sooner but be faster to compare on AVR.
* Avoid 8-bit timer overflows in debounce algorithms
Count down remaining elapsed time instead of trying to do 8-bit timer
comparisons.
Add a "none" implementation that is automatically used if DEBOUNCE is
0 otherwise it will break the _pk/_pr count down.
* Avoid unnecessary polling of the entire matrix in sym_eager_pk
The matrix only needs to be updated when a debounce timer expires.
* Avoid unnecessary polling of the entire matrix in sym_eager_pr
The matrix only needs to be updated when a debounce timer expires.
The use of the "needed_update" variable is trying to do what
"matrix_need_update" was added to fix but didn't work because it only
applied when all keys finished debouncing.
* Fix sym_defer_g timing inconsistency compared to other debounce algorithms
DEBOUNCE=5 should process the key after 5ms, not 6ms
* Add debounce tests
|
|
* add readPort() and some API to 'tmk_core/common/*/gpio.h'
The following macros have been added to gpio.h.
* readPort(port)
* setPortBitInput(port, bit)
* setPortBitInputHigh(port, bit)
* setPortBitOutput(port, bit)
* writePortBitLow(port, bit)
* writePortBitHigh(port, bit)
* add data type 'port_data_t' into gpio.h
* rename qmk_pin to pin
|
|
bullseye) (#12951)
Debian bullseye (testing at the moment, but seems close to release) has
avr-libc 1:2.0.0+Atmel3.6.2-1.1 with some changes taken from the
Atmel-distributed toolchain. In particular, the <avr/io.h> header for
ATmega32A (avr/iom32a.h) now defines the FLASHEND constant as `0x7FFFU`,
and that `U` suffix breaks the firmware size check code, because the
shell arithmetic expansion that is used to calculate `MAX_SIZE` does not
support those C-specific suffixes.
As a workaround, add `-D__ASSEMBLER__` to the C preprocessor invocation
that is used to expand those macros; in this case avr/iom32a.h defines
`FLASHEND` without the `U` suffix, and everything works as it did before
with older avr-libc versions.
The exact same code is present in two places; they are both changed,
even though the code in `tmk_core/avr.mk` is actually never used for
ATmega32A (and the header for ATmega32U4 does not add that `U` suffix to
`FLASHEND` for some reason).
|
|
|
|
Co-authored-by: Ryan <fauxpark@gmail.com>
|
|
|
|
|
|
|
|
Co-authored-by: Ryan <fauxpark@gmail.com>
|
|
|
|
|
|
This converts the array that the Swap Hands feature uses to use PROGMEM,
and to read from that array, as such. Since this array never changes at
runtime, there is no reason to keep it in memory. Especially for AVR
boards, as memory is a precious resource.
|
|
|
|
|
|
|
|
When the USB device is connected, FreeBSD creates not one, but three
device nodes in /dev, e.g.: /dev/ttyU0, /dev/ttyU0.init, and
/dev/ttyU0.lock.
As a result, this leads to the USB variable containing 3 paths
(and therefore, whitespace) and messages like this one:
Device /dev/ttyU0
/dev/ttyU0.init
/dev/ttyU0.lock has appeared; assuming it is the controller.
This changes fixes the use of the -z flag of "[" (see test(1)). Also, it
removes undesired paths from the USB variable, leaving only
one path there (i.e., "/dev/ttyU0").
|
|
Co-authored-by: QMK Bot <hello@qmk.fm>
|
|
|
|
Co-authored-by: QMK Bot <hello@qmk.fm>
|
|
emulation initialisation) occurs to make it non-target-specific. (#12671)
|
|
(#12600)
* Add support for jumping to tinyuf2 bootloader. Adds blackpill UF2 example.
* Update flashing.md
* Update chconf.h
* Update config.h
* Update halconf.h
* Update mcuconf.h
|
|
|
|
Co-authored-by: QMK Bot <hello@qmk.fm>
|
|
|
|
* 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
|
|
|
|
|
|
Co-authored-by: Ryan <fauxpark@gmail.com>
|
|
|
|
|
|
Co-authored-by: QMK Bot <hello@qmk.fm>
|
|
|
|
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
|
|
* First stab at enabling builds of UF2-format binaries.
* Add description on producing a UF2 file.
|
|
|
|
|
|
This is in preparation for https://github.com/qmk/qmk_firmware/pull/10171
|
|
|
|
|
|
Co-authored-by: QMK Bot <hello@qmk.fm>
|
|
|
|
TAPPING_TERM_PER_KEY are defined (#12125)
Co-authored-by: checyr <32964049+checyr@users.noreply.github.com>
|
|
|
|
* Fix USER_PRINT on avr/atsam
* Update tmk_core/common/arm_atsam/_print.h
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
|
|
|
|
|
|
|
|
Co-authored-by: QMK Bot <hello@qmk.fm>
|
|
|
|
|