We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1345650 commit 745aadcCopy full SHA for 745aadc
src/delay.S
@@ -9,6 +9,7 @@
9
#define start r0
10
#define remain r20
11
#define current r21
12
+; todo: implement fractional T0CNT_PER_MS for precision with non 2^n F_CPU
13
; delay for r26:r24 (u24) ms
14
GLABEL delay_impl
15
in start, TCNT0
@@ -19,6 +20,7 @@ _wait1ms: ; check TCNT0 until 1ms has passed
19
20
add start, current ; advance start
21
sub remain, current
22
brcc _wait1ms
23
+ ; sub remain_fract, T0MS_FRACT
24
subi remain, lo8(-(T0CNT_PER_MS)) ; add 1ms
25
; decrement ms argument
26
sbiw r24, 1
0 commit comments