mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
chg: parameter adjustments
This commit is contained in:
parent
fd854a9308
commit
0c827e755f
2 changed files with 7 additions and 6 deletions
|
@ -72,22 +72,22 @@ char* Iso15693sprintUID(char *target, uint8_t *uid) {
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t iclass_crc16(char *data_p, unsigned short length) {
|
uint16_t iclass_crc16(uint8_t *d, uint16_t n) {
|
||||||
unsigned char i;
|
|
||||||
unsigned int data;
|
unsigned int data;
|
||||||
uint16_t crc = 0xffff;
|
uint16_t crc = 0xffff;
|
||||||
|
|
||||||
if (length == 0)
|
if (n == 0)
|
||||||
return (~crc);
|
return (~crc);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
for (i=0, data = (unsigned int)0xff & *data_p++; i < 8; i++, data >>= 1) {
|
for (uint8_t i=0, data = *d++; i < 8; i++, data >>= 1) {
|
||||||
if ((crc & 0x0001) ^ (data & 0x0001))
|
if ((crc & 0x0001) ^ (data & 0x0001))
|
||||||
crc = (crc >> 1) ^ POLY;
|
crc = (crc >> 1) ^ POLY;
|
||||||
else
|
else
|
||||||
crc >>= 1;
|
crc >>= 1;
|
||||||
}
|
}
|
||||||
} while (--length);
|
} while (--n);
|
||||||
|
|
||||||
crc = ~crc;
|
crc = ~crc;
|
||||||
data = crc;
|
data = crc;
|
||||||
|
|
|
@ -78,7 +78,8 @@ uint16_t Iso15693Crc(uint8_t *v, int n);
|
||||||
int Iso15693AddCrc(uint8_t *req, int n);
|
int Iso15693AddCrc(uint8_t *req, int n);
|
||||||
bool Iso15693CheckCrc(uint8_t *d, int n);
|
bool Iso15693CheckCrc(uint8_t *d, int n);
|
||||||
char* Iso15693sprintUID(char *target,uint8_t *uid);
|
char* Iso15693sprintUID(char *target,uint8_t *uid);
|
||||||
unsigned short iclass_crc16(char *data_p, unsigned short length);
|
|
||||||
|
uint16_t iclass_crc16(uint8_t *d, uint16_t n);
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Map a sequence of octets (~layer 2 command) into the set of bits to feed
|
// Map a sequence of octets (~layer 2 command) into the set of bits to feed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue