diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-08-04 14:21:38 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-08-08 00:27:28 -0400 |
commit | e9d2ec7c41c60ab74fe2850fb0787af7bb3361f4 (patch) | |
tree | 9a8b42da640ccaf52228c05c1f8c89b60666cc99 /src | |
parent | 78982ebb51b0895b3178a85edcb1543939dc13b4 (diff) | |
download | kutter-e9d2ec7c41c60ab74fe2850fb0787af7bb3361f4.tar.gz kutter-e9d2ec7c41c60ab74fe2850fb0787af7bb3361f4.tar.xz kutter-e9d2ec7c41c60ab74fe2850fb0787af7bb3361f4.zip |
avr: Tune the low-level timer entry and exit heuristics
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/avr/timer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/avr/timer.c b/src/avr/timer.c index 1b281ec9..17f3e913 100644 --- a/src/avr/timer.c +++ b/src/avr/timer.c @@ -156,8 +156,10 @@ static struct timer wrap_timer = { #define TIMER_IDLE_REPEAT_TICKS 8000 #define TIMER_REPEAT_TICKS 3000 -#define TIMER_MIN_TRY_TICKS 60 // 40 ticks to exit irq; 20 ticks of progress -#define TIMER_DEFER_REPEAT_TICKS 200 +#define TIMER_MIN_ENTRY_TICKS 44 +#define TIMER_MIN_EXIT_TICKS 47 +#define TIMER_MIN_TRY_TICKS (TIMER_MIN_ENTRY_TICKS + TIMER_MIN_EXIT_TICKS) +#define TIMER_DEFER_REPEAT_TICKS 256 // Hardware timer IRQ handler - dispatch software timers ISR(TIMER1_COMPA_vect) |