projects
/
proxmark3-svn
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Clean up line endings, switch everything to LF instead of CRLF
[proxmark3-svn]
/
common
/
crc16.c
1
#include
"crc16.h"
2
3
unsigned short
update_crc16
(
unsigned short
crc
,
unsigned char
c
)
4
{
5
unsigned short
i
,
v
,
tcrc
=
0
;
6
7
v
= (
crc
^
c
) &
0xff
;
8
for
(
i
=
0
;
i
<
8
;
i
++) {
9
tcrc
= ( (
tcrc
^
v
) &
1
) ? (
tcrc
>>
1
) ^
0x8408
:
tcrc
>>
1
;
10
v
>>=
1
;
11
}
12
13
return
((
crc
>>
8
) ^
tcrc
)&
0xffff
;
14
}
Impressum
,
Datenschutz