Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to arm_atsam wait and timer routines
Microsecond (us) delays are now handled by a busy wait loop according to MCU frequency. This replaces the system counter method which had an overhead of around 12us. TC5 device and supporting routines removed as it was the old us delay counter. wait_ms is now properly a macro to CLK_delay_ms. wait_us is now properly a macro to CLK_delay_us. Removed CLK_get_us as it has no use. All calls to CLK_get_ms() have been replaced by timer_read64() with corrected typing. All calls to CLK_delay_ms() have been replaced by wait_ms(). All calls to CLK_delay_us() have been replaced by wait_us() and timings verified or updated as needed after review on scope. Corrected typing of variables using 64bit ms timer readings if needed.
- Loading branch information
Showing with 61 additions and 133 deletions.
- +3 −9 keyboards/massdrop/alt/matrix.c
- +3 −9 keyboards/massdrop/ctrl/matrix.c
- +2 −18 tmk_core/common/arm_atsam/timer.c
- +4 −0 tmk_core/common/wait.h
- +2 −0 tmk_core/protocol/arm_atsam/arm_atsam_protocol.h
- +21 −69 tmk_core/protocol/arm_atsam/clks.c
- +2 −3 tmk_core/protocol/arm_atsam/clks.h
- +2 −2 tmk_core/protocol/arm_atsam/i2c_master.c
- +2 −2 tmk_core/protocol/arm_atsam/led_matrix.c
- +9 −9 tmk_core/protocol/arm_atsam/main_arm_atsam.c
- +4 −4 tmk_core/protocol/arm_atsam/usb/udi_cdc.c
- +7 −8 tmk_core/protocol/arm_atsam/usb/usb2422.c
Oops, something went wrong.