qmk-keychron-q3-colemak-dh/tmk_core/common/chibios
Simon Arlott 0a1bf7f6aa
Support using a timer for wait_us() on ChibiOS-based boards (#12211)
* Support using a timer for wait_us() on ChibiOS-based boards (#12198)

There are spare GPT timers that can be used to get a more accurate
wait_ms() time. This is required for the matrix scan unselect delay (30µs)
to be shorter than the system tick rate of 100µs.

This is limited to the maximum GPT duration of 65535 so values above that
will automatically use the previous implementation based on the system
tick.

Using a specific timer means it can't be shared by another thread at the
same time so when wait_us() is called from anything other than the main
thread it will use the system tick implementation too.

* Update tmk_core/common/chibios/wait.c

* Update tmk_core/common/chibios/wait.c

Co-authored-by: Joel Challis <git@zvecr.com>
2021-08-20 00:31:23 +01:00
..
_timer.h Avoid 8-bit timer overflows in debounce algorithms (#12240) 2021-06-09 17:23:21 +10:00
_wait.c Support using a timer for wait_us() on ChibiOS-based boards (#12211) 2021-08-20 00:31:23 +01:00
_wait.h Support using a timer for wait_us() on ChibiOS-based boards (#12211) 2021-08-20 00:31:23 +01:00
atomic_util.h Split gpio and atomic to platform (#11792) 2021-02-14 11:51:06 +11:00
bootloader.c core: chibios: bootloader: use integer pointers as volatile (#13450) 2021-07-06 00:24:48 +01:00
chibios_config.h Allow configuration of USB_VBUS_PIN on chibios (#13342) 2021-06-26 11:48:48 +01:00
eeprom_stm32.c Add customisable EEPROM driver selection (#7274) 2020-01-24 12:45:58 +11:00
eeprom_stm32.h Change include guards in tmk_core/ and drivers/ to pragma once (#11240) 2020-12-26 15:56:11 +11:00
eeprom_teensy.c Fix for gcc10 teensy_lc eeprom build warning (#12587) 2021-04-20 10:51:55 -07:00
flash_stm32.c flash_stm32: don't unlock flash if already unlocked (#13841) 2021-08-02 14:27:57 +10:00
flash_stm32.h Change include guards in tmk_core/ and drivers/ to pragma once (#11240) 2020-12-26 15:56:11 +11:00
gpio.h Add readPort() and some API to 'tmk_core/common/*/gpio.h' (#12754) 2021-06-07 18:23:21 +09:00
pin_defs.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
platform_deps.h Avoid name conflicts with usb_hid Arduino code (#13870) 2021-08-06 15:53:38 +10:00
platform.c Begin to carve out platform/protocol API - Single main loop (#13843) 2021-08-18 00:11:07 +01:00
sleep_led.c 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
suspend.c 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
syscall-fallbacks.c Fixup declaration for _kill, add other missing syscalls, populate errno. (#11608) 2021-01-19 14:23:03 +00:00
timer.c Normalise include statements in core code (#11153) 2020-12-11 13:45:24 +11:00
wait.c Support using a timer for wait_us() on ChibiOS-based boards (#12211) 2021-08-20 00:31:23 +01:00