From b3d7d19579866771677d5a0f1f515934ed479faa Mon Sep 17 00:00:00 2001 From: Erick Ahmed Date: Wed, 31 Dec 2025 22:43:33 +0100 Subject: [PATCH] Tail jump from ISR to stop_blink - Saves 7 clock cycles per call vs. previous implementation --- src/clockinator.S | 3 +-- src/led.inc | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/clockinator.S b/src/clockinator.S index 7dd31d5..e7a1309 100644 --- a/src/clockinator.S +++ b/src/clockinator.S @@ -22,8 +22,7 @@ ; useful for the tap tempo stuff isr_stop_blink: - rcall stop_blink ; Turn off PB0 when TCNT0=OCF0A - reti ; Exit interrupt + rjmp stop_blink ; Turn off PB0 when TCNT0=OCF0A main: ; To compile on AtTiny25/45 comment out the SPH part diff --git a/src/led.inc b/src/led.inc index 421ecbd..766523e 100644 --- a/src/led.inc +++ b/src/led.inc @@ -24,4 +24,4 @@ stop_blink: ldi r16, (1 << OCF0A) out TIFR, r16 ; Clear timer0 interrupt flag register - ret + reti