Change ticks to bpm calc to a macro

This commit is contained in:
2026-01-09 14:39:05 +01:00
parent 5357bcfaaf
commit aebf167ab5
+5 -8
View File
@@ -3,8 +3,9 @@
ldi r19, \target_low
.endm
ticks_to_bpm:
ret
.MACRO TICKS_TO_BPM:
reti
.endm
tap_tempo_isr:
; Timer not started yet (first button press after expiration)
@@ -12,12 +13,8 @@ tap_tempo_isr:
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
; Timer already started
TICKS_TO_BPM
start_timer:
rcall timer0_start