Inline with macros to save on jump clock cycles
This commit is contained in:
+2
-3
@@ -1,7 +1,7 @@
|
||||
; Registers:
|
||||
; r16: timer0 start and stop operations
|
||||
|
||||
start_blink:
|
||||
.MACRO START_BLINK
|
||||
ldi r16, (1 << OCF0A) ; Write Output Compare Flag 0 A to 1
|
||||
out TIFR, r16 ; Clear Timer0 interrupt flag register
|
||||
|
||||
@@ -12,8 +12,7 @@ start_blink:
|
||||
out TCCR0B, r16 ; Enable clock source
|
||||
|
||||
sbi PORTB, PB0 ; Set LED on
|
||||
|
||||
ret
|
||||
.endm
|
||||
|
||||
stop_blink:
|
||||
cbi PORTB, PB0 ; Set LED off
|
||||
|
||||
Reference in New Issue
Block a user