mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-14 02:26:59 -07:00
More CRLF -> LF cleanup
This commit is contained in:
parent
c062856a74
commit
fdcc61d318
3 changed files with 540 additions and 540 deletions
|
@ -1,14 +1,14 @@
|
|||
#include "crc16.h"
|
||||
|
||||
unsigned short update_crc16( unsigned short crc, unsigned char c )
|
||||
{
|
||||
unsigned short i, v, tcrc = 0;
|
||||
|
||||
v = (crc ^ c) & 0xff;
|
||||
for (i = 0; i < 8; i++) {
|
||||
tcrc = ( (tcrc ^ v) & 1 ) ? ( tcrc >> 1 ) ^ 0x8408 : tcrc >> 1;
|
||||
v >>= 1;
|
||||
}
|
||||
|
||||
return ((crc >> 8) ^ tcrc)&0xffff;
|
||||
}
|
||||
#include "crc16.h"
|
||||
|
||||
unsigned short update_crc16( unsigned short crc, unsigned char c )
|
||||
{
|
||||
unsigned short i, v, tcrc = 0;
|
||||
|
||||
v = (crc ^ c) & 0xff;
|
||||
for (i = 0; i < 8; i++) {
|
||||
tcrc = ( (tcrc ^ v) & 1 ) ? ( tcrc >> 1 ) ^ 0x8408 : tcrc >> 1;
|
||||
v >>= 1;
|
||||
}
|
||||
|
||||
return ((crc >> 8) ^ tcrc)&0xffff;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue