Change ticks to bpm calc to a macro
This commit is contained in:
+5
-8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user