mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
common: fix mix of spaces & tabs
This commit is contained in:
parent
9502b54aa0
commit
23f1a253a7
32 changed files with 4323 additions and 4323 deletions
40
common/crc.h
40
common/crc.h
|
@ -9,19 +9,19 @@
|
|||
#ifndef __CRC_H
|
||||
#define __CRC_H
|
||||
|
||||
#include "common.h" //stdint, stddef, stdbool
|
||||
#include "util.h" // reflect, bswap_16
|
||||
#include "common.h" //stdint, stddef, stdbool
|
||||
#include "util.h" // reflect, bswap_16
|
||||
|
||||
typedef struct crc {
|
||||
uint32_t state;
|
||||
int order;
|
||||
uint32_t polynom;
|
||||
uint32_t initial_value;
|
||||
uint32_t final_xor;
|
||||
uint32_t mask;
|
||||
int topbit;
|
||||
bool refin; /* Parameter: Reflect input bytes? */
|
||||
bool refout; /* Parameter: Reflect output CRC? */
|
||||
uint32_t state;
|
||||
int order;
|
||||
uint32_t polynom;
|
||||
uint32_t initial_value;
|
||||
uint32_t final_xor;
|
||||
uint32_t mask;
|
||||
int topbit;
|
||||
bool refin; /* Parameter: Reflect input bytes? */
|
||||
bool refout; /* Parameter: Reflect output CRC? */
|
||||
} crc_t;
|
||||
|
||||
/* Initialize a crc structure. order is the order of the polynom, e.g. 32 for a CRC-32
|
||||
|
@ -64,14 +64,14 @@ uint32_t CRC8Legic(uint8_t *buff, size_t size);
|
|||
|
||||
/* Static initialization of a crc structure */
|
||||
#define CRC_INITIALIZER(_order, _polynom, _initial_value, _final_xor) { \
|
||||
.state = ((_initial_value) & ((1L<<(_order))-1)), \
|
||||
.order = (_order), \
|
||||
.polynom = (_polynom), \
|
||||
.initial_value = (_initial_value), \
|
||||
.final_xor = (_final_xor), \
|
||||
.mask = ((1L<<(_order))-1) \
|
||||
.refin = false, \
|
||||
.refout = false \
|
||||
}
|
||||
.state = ((_initial_value) & ((1L<<(_order))-1)), \
|
||||
.order = (_order), \
|
||||
.polynom = (_polynom), \
|
||||
.initial_value = (_initial_value), \
|
||||
.final_xor = (_final_xor), \
|
||||
.mask = ((1L<<(_order))-1) \
|
||||
.refin = false, \
|
||||
.refout = false \
|
||||
}
|
||||
|
||||
#endif /* __CRC_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue