mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
data psk demod minor fixes, pyramid demod add CS
also adjusted autocorrelate and added a printout for lf search u
This commit is contained in:
parent
1302428367
commit
73d04bb417
6 changed files with 104 additions and 50 deletions
15
common/crc.c
15
common/crc.c
|
@ -5,8 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Generic CRC calculation code.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "crc.h"
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
void crc_init(crc_t *crc, int order, uint32_t polynom, uint32_t initial_value, uint32_t final_xor)
|
||||
{
|
||||
|
@ -40,3 +41,15 @@ uint32_t crc_finish(crc_t *crc)
|
|||
{
|
||||
return ( crc->state ^ crc->final_xor ) & crc->mask;
|
||||
}
|
||||
|
||||
uint32_t CRC8Maxim(uint8_t *buff, size_t size )
|
||||
{
|
||||
crc_t crc;
|
||||
crc_init(&crc, 9, 0x8c, 0x00, 0x00);
|
||||
crc_clear(&crc);
|
||||
|
||||
for (size_t i=0; i < size; ++i){
|
||||
crc_update(&crc, buff[i], 8);
|
||||
}
|
||||
return crc_finish(&crc);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue