mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
style
This commit is contained in:
parent
bb051df683
commit
895410aec0
13 changed files with 714 additions and 714 deletions
|
@ -18,32 +18,32 @@
|
|||
// Structure for packed wiegand messages
|
||||
// Always align lowest value (last transmitted) bit to ordinal position 0 (lowest valued bit bottom)
|
||||
typedef struct {
|
||||
uint8_t Length; // Number of encoded bits in wiegand message (excluding headers and preamble)
|
||||
uint32_t Top; // Bits in x<<64 positions
|
||||
uint32_t Mid; // Bits in x<<32 positions
|
||||
uint32_t Bot; // Lowest ordinal positions
|
||||
uint8_t Length; // Number of encoded bits in wiegand message (excluding headers and preamble)
|
||||
uint32_t Top; // Bits in x<<64 positions
|
||||
uint32_t Mid; // Bits in x<<32 positions
|
||||
uint32_t Bot; // Lowest ordinal positions
|
||||
} wiegand_message_t;
|
||||
|
||||
// Structure for unpacked wiegand card, like HID prox
|
||||
typedef struct {
|
||||
uint32_t FacilityCode;
|
||||
uint64_t CardNumber;
|
||||
uint32_t IssueLevel;
|
||||
uint32_t OEM;
|
||||
bool ParityValid; // Only valid for responses
|
||||
uint32_t FacilityCode;
|
||||
uint64_t CardNumber;
|
||||
uint32_t IssueLevel;
|
||||
uint32_t OEM;
|
||||
bool ParityValid; // Only valid for responses
|
||||
} wiegand_card_t;
|
||||
|
||||
bool get_bit_by_position(wiegand_message_t* data, uint8_t pos);
|
||||
bool set_bit_by_position(wiegand_message_t* data, bool value, uint8_t pos);
|
||||
bool get_bit_by_position(wiegand_message_t *data, uint8_t pos);
|
||||
bool set_bit_by_position(wiegand_message_t *data, bool value, uint8_t pos);
|
||||
|
||||
uint64_t get_linear_field(wiegand_message_t* data, uint8_t firstBit, uint8_t length);
|
||||
bool set_linear_field(wiegand_message_t* data, uint64_t value, uint8_t firstBit, uint8_t length);
|
||||
uint64_t get_linear_field(wiegand_message_t *data, uint8_t firstBit, uint8_t length);
|
||||
bool set_linear_field(wiegand_message_t *data, uint64_t value, uint8_t firstBit, uint8_t length);
|
||||
|
||||
uint64_t get_nonlinear_field(wiegand_message_t* data, uint8_t numBits, uint8_t* bits);
|
||||
bool set_nonlinear_field(wiegand_message_t* data, uint64_t value, uint8_t numBits, uint8_t* bits);
|
||||
uint64_t get_nonlinear_field(wiegand_message_t *data, uint8_t numBits, uint8_t *bits);
|
||||
bool set_nonlinear_field(wiegand_message_t *data, uint64_t value, uint8_t numBits, uint8_t *bits);
|
||||
|
||||
wiegand_message_t initialize_message_object(uint32_t top, uint32_t mid, uint32_t bot);
|
||||
|
||||
bool add_HID_header(wiegand_message_t* data);
|
||||
bool add_HID_header(wiegand_message_t *data);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue