Create tap tempo ISR branching logic

This commit is contained in:
2026-01-09 13:48:26 +01:00
parent 447865df4e
commit 5357bcfaaf
+20
View File
@@ -2,3 +2,23 @@
ldi r20, \target_high
ldi r19, \target_low
.endm
ticks_to_bpm:
ret
tap_tempo_isr:
; Timer not started yet (first button press after expiration)
lds r16, timer0_overflow_count
cp r16, r0
breq start_timer
; Timer started
; wait for next press
; better to update at each press, unless expiration
rcall ticks_to_bpm
reti
start_timer:
rcall timer0_start
reti