Rename file to bpm.inc
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
.MACRO SET_BPM target_high, target_low
|
||||
ldi r20, \target_high
|
||||
ldi r19, \target_low
|
||||
.endm
|
||||
+1
-1
@@ -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:
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user