Tail jump from ISR to stop_blink
- Saves 7 clock cycles per call vs. previous implementation
This commit is contained in:
+1
-2
@@ -22,8 +22,7 @@
|
|||||||
; useful for the tap tempo stuff
|
; useful for the tap tempo stuff
|
||||||
|
|
||||||
isr_stop_blink:
|
isr_stop_blink:
|
||||||
rcall stop_blink ; Turn off PB0 when TCNT0=OCF0A
|
rjmp stop_blink ; Turn off PB0 when TCNT0=OCF0A
|
||||||
reti ; Exit interrupt
|
|
||||||
|
|
||||||
main:
|
main:
|
||||||
; To compile on AtTiny25/45 comment out the SPH part
|
; To compile on AtTiny25/45 comment out the SPH part
|
||||||
|
|||||||
+1
-1
@@ -24,4 +24,4 @@ stop_blink:
|
|||||||
ldi r16, (1 << OCF0A)
|
ldi r16, (1 << OCF0A)
|
||||||
out TIFR, r16 ; Clear timer0 interrupt flag register
|
out TIFR, r16 ; Clear timer0 interrupt flag register
|
||||||
|
|
||||||
ret
|
reti
|
||||||
|
|||||||
Reference in New Issue
Block a user