mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
deleted function check_bit_in_byte(...) -> overhead
This commit is contained in:
parent
d38711aea6
commit
26b7c667b7
1 changed files with 8 additions and 15 deletions
|
@ -59,13 +59,6 @@ int usage_lf_em4x50_write_password(void) {
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool check_bit_in_byte(uint8_t pos, uint8_t byte) {
|
|
||||||
|
|
||||||
// return true if bit at position <pos> is "1"
|
|
||||||
|
|
||||||
return (((byte >> pos) & 1) == 1) ? true : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void prepare_result(const uint8_t *byte, int fwr, int lwr, em4x50_word_t *words) {
|
static void prepare_result(const uint8_t *byte, int fwr, int lwr, em4x50_word_t *words) {
|
||||||
|
|
||||||
// restructure received result in "em4x50_word_t" structure and check all
|
// restructure received result in "em4x50_word_t" structure and check all
|
||||||
|
@ -244,8 +237,8 @@ static void print_info_result(PacketResponseNG *resp, const em4x50_data_t *etd,
|
||||||
|
|
||||||
prepare_result(data, 0, 33, words);
|
prepare_result(data, 0, 33, words);
|
||||||
|
|
||||||
bpwc = check_bit_in_byte(7, words[2].byte[2]); // password check
|
bpwc = (bool)(words[2].byte[2] & 128); // password check (bit 7)
|
||||||
braw = check_bit_in_byte(6, words[2].byte[2]); // read after write
|
braw = (bool)(words[2].byte[2] & 64); // read after write (bit 6)
|
||||||
fwr = reflect8(words[2].byte[0]); // first word read
|
fwr = reflect8(words[2].byte[0]); // first word read
|
||||||
lwr = reflect8(words[2].byte[1]); // last word read
|
lwr = reflect8(words[2].byte[1]); // last word read
|
||||||
fwrp = reflect8(words[1].byte[0]); // first word read protected
|
fwrp = reflect8(words[1].byte[0]); // first word read protected
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue