qmk_firmware/tmk_core/common
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
..
arm_atsam Begin to carve out platform/protocol API - Single main loop (#13843) 2021-08-18 00:11:07 +01:00
avr Begin to carve out platform/protocol API - Single main loop (#13843) 2021-08-18 00:11:07 +01:00
chibios Support using a timer for wait_us() on ChibiOS-based boards (#12211) 2021-08-20 00:31:23 +01:00
test Begin to carve out platform/protocol API - Single main loop (#13843) 2021-08-18 00:11:07 +01:00
atomic_util.h Split gpio and atomic to platform (#11792) 2021-02-14 11:51:06 +11:00
bootloader.h Change include guards in tmk_core/ and drivers/ to pragma once (#11240) 2020-12-26 15:56:11 +11:00
eeprom.h Change include guards in tmk_core/ and drivers/ to pragma once (#11240) 2020-12-26 15:56:11 +11:00
gpio.h Split gpio and atomic to platform (#11792) 2021-02-14 11:51:06 +11:00
host_driver.h Digitizer HID interface : absolute coordinates for mouse cursor (#12851) 2021-08-18 04:52:44 +10:00
host.c Digitizer HID interface : absolute coordinates for mouse cursor (#12851) 2021-08-18 04:52:44 +10:00
host.h New and improved lock LED callbacks (#7215) 2019-11-06 00:42:16 +00:00
pin_defs.h Split gpio and atomic to platform (#11792) 2021-02-14 11:51:06 +11:00
progmem.h __flash? (#13799) 2021-07-31 14:35:30 +01:00
raw_hid.h Change include guards in tmk_core/ and drivers/ to pragma once (#11240) 2020-12-26 15:56:11 +11:00
report.c format code according to conventions [skip ci] 2020-03-13 18:44:56 +00:00
report.h Digitizer HID interface : absolute coordinates for mouse cursor (#12851) 2021-08-18 04:52:44 +10:00
sleep_led.h Change include guards in tmk_core/ and drivers/ to pragma once (#11240) 2020-12-26 15:56:11 +11:00
suspend.h Set default for USB_SUSPEND_WAKEUP_DELAY to 0/disabled (#12081) 2021-03-02 14:31:23 +00:00
sync_timer.c Add sync_timer support over serial_link (i.e. Ergodox Infinity) (#12845) 2021-06-19 19:18:00 -07:00
sync_timer.h Add sync_timer support over serial_link (i.e. Ergodox Infinity) (#12845) 2021-06-19 19:18:00 -07:00
timer.h Merge remote-tracking branch 'upstream/master' into develop 2021-07-25 12:17:15 +10:00
usb_util.c Avoid LTO conficts on arm_atsam (#13676) 2021-07-24 12:13:06 +01:00
usb_util.h Avoid LTO conficts on arm_atsam (#13676) 2021-07-24 12:13:06 +01:00
virtser.h Change include guards in tmk_core/ and drivers/ to pragma once (#11240) 2020-12-26 15:56:11 +11:00
wait.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00