Rename file to bpm.inc

This commit is contained in:
2026-01-09 12:29:42 +01:00
parent 6d533bfac8
commit 0028500ffe
3 changed files with 5 additions and 19 deletions
+4
View File
@@ -0,0 +1,4 @@
.MACRO SET_BPM target_high, target_low
ldi r20, \target_high
ldi r19, \target_low
.endm
+1 -1
View File
@@ -27,7 +27,7 @@ timer0_overflow_count:
#include <avr/io.h>
#include "timer.inc"
#include "tap-tempo.inc"
#include "bpm.inc"
;#include "midi.inc"
main:
-18
View File
@@ -1,18 +0,0 @@
; Registers:
; r16: timer0 start and stop operations
.MACRO START_TAPTEMPO_COUNTER
ldi r16, (1 << OCF0A) ; Load Output Compare Flag 0 A to 1
out TIFR, r16 ; Clear Timer0 interrupt flag register
clr r16 ; Cleanup register
out TCNT0, r16 ; Reset Counter to 0
ldi r16, (1 << CS02) | (1 << CS00) ; Load prescaler value (00000101 = prescaler 1024)
out TCCR0B, r16 ; Enable clock source
.endm
.MACRO SET_BPM target_high, target_low
ldi r20, \target_high
ldi r19, \target_low
.endm