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 ldi r19, \target_low
.endm .endm
ticks_to_bpm: .MACRO TICKS_TO_BPM:
ret reti
.endm
tap_tempo_isr: tap_tempo_isr:
; Timer not started yet (first button press after expiration) ; Timer not started yet (first button press after expiration)
@@ -12,12 +13,8 @@ tap_tempo_isr:
cp r16, r0 cp r16, r0
breq start_timer breq start_timer
; Timer started ; Timer already started
; wait for next press TICKS_TO_BPM
; better to update at each press, unless expiration
rcall ticks_to_bpm
reti
start_timer: start_timer:
rcall timer0_start rcall timer0_start