Skip to content

Commit 3bd820c

Browse files
committed
cleanup
1 parent d8e9e52 commit 3bd820c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/t0_ovfl_isr.S

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,17 @@ GLABEL TIMER0_OVF_vect
3535
push ZH
3636
ldi ZH, hi8(t0_fract)
3737
ld r16, Z
38-
//subi r16, lo8(-(FRACT_INC)) ; add millis fraction
39-
//cpi r16, FRACT_MAX ; C set when fract < FRACT_MAX
4038
subi r16, lo8(FRACT_INC) ; subtract millis fraction
4139
brcc _no_underflow
4240
subi r16, lo8(-FRACT_MAX) ; add FRACT_MAX, clears Carry
43-
rjmp 2f
41+
rjmp 1f
4442
_no_underflow:
4543
sec ; invert Carry
46-
2:
44+
1:
4745
st Z+, r16
4846
; add one more to millis LSB when fractional counter underflows
4947
ld r16, Z
5048
sbci r16, lo8(-(MILLIS_INC + 1)) ; r16 += MILLIS_INC + NOT Carry
51-
;adc r16, r1 ; r16 += Carry
52-
;sbci r16, lo8(-(MILLIS_INC)) ; r16 += MILLIS_INC
5349
rjmp _save
5450
_add1: ; handle most significant bytes
5551
ld r16, Z

0 commit comments

Comments
 (0)