repo.or.cz
/
ruwai.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Set the POS interval to 240 seconds (255 would be the maximum.
[ruwai.git]
/
software
/
c++
/
ruwaicom
/
src
/
rw_protocol.cpp
blob
3281bbdbe53a1269ed548a0398be840afea20417
1
2
#include <rw_protocol.h>
3
4
void
update_fletcher16_checksum
(
uint8_t
*
data
,
uint8_t
length
,
uint8_t
&
ck0
,
uint8_t
&
ck1
)
5
{
6
for
(
uint8_t
k
=
0
;
k
<
length
;
k
++)
7
{
8
ck0
=
ck0
+ *
data
;
9
ck1
=
ck1
+
ck0
;
10
data
++;
11
}
12
}
13