Simplify tap_code16_delay (#25595)
* Replaced for-loop with single wait_ms(delay) call * Improve code consistency with tap_code_delay
This commit is contained in:
parent
9455c6adec
commit
248d7c1d6d
1 changed files with 1 additions and 3 deletions
|
|
@ -157,9 +157,7 @@ __attribute__((weak)) void unregister_code16(uint16_t code) {
|
||||||
*/
|
*/
|
||||||
__attribute__((weak)) void tap_code16_delay(uint16_t code, uint16_t delay) {
|
__attribute__((weak)) void tap_code16_delay(uint16_t code, uint16_t delay) {
|
||||||
register_code16(code);
|
register_code16(code);
|
||||||
for (uint16_t i = delay; i > 0; i--) {
|
wait_ms(delay);
|
||||||
wait_ms(1);
|
|
||||||
}
|
|
||||||
unregister_code16(code);
|
unregister_code16(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue