qmk_firmware/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
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
eeprom_stm32.h
eeprom_teensy.c
flash_stm32.c flash_stm32: don't unlock flash if already unlocked (#13841) 2021-08-02 14:27:57 +10:00
flash_stm32.h
gpio.h
pin_defs.h
platform.c Begin to carve out platform/protocol API - Single main loop (#13843) 2021-08-18 00:11:07 +01:00
platform_deps.h Avoid name conflicts with usb_hid Arduino code (#13870) 2021-08-06 15:53:38 +10:00
sleep_led.c
suspend.c
syscall-fallbacks.c
timer.c
wait.c Support using a timer for wait_us() on ChibiOS-based boards (#12211) 2021-08-20 00:31:23 +01:00