Lagere Macros in eigene Datei aus

This commit is contained in:
2025-05-31 23:06:44 +02:00
parent a4b3a1f2ad
commit 74be66bfea
2 changed files with 14 additions and 14 deletions

View File

@@ -16,19 +16,7 @@
.org 0x0020
rjmp overflow_handler
;========
; Macros
;========
.macro left_to_right
in active_led, PORTD
rol active_led
brcc PC+2
ldi active_led, 0b00000001
out PORTD, active_led
.endmacro
;========
.include "./macros.inc"
init:
;--
@@ -65,7 +53,7 @@ overflow_handler:
cpi overflows, 246 ; bei ~980 Überläufe/Sekunde entsprechen 245 Überläufe ca. 250ms
brne overflow_handler_exit ; early Return wenn Schwellenwert noch nicht erreicht
clr overflows ; Überlaufzähler kontrolliert zurücksetzen
left_to_right
left_to_right active_led
overflow_handler_exit:
reti