mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
Use struct for parameter passing in CMD_HF_ISO14443A_SET_THRESHOLDS
This commit is contained in:
parent
225bb420c6
commit
c1b23a761c
2 changed files with 19 additions and 7 deletions
|
@ -1561,9 +1561,15 @@ static void PacketReceived(PacketCommandNG *packet) {
|
|||
break;
|
||||
}
|
||||
case CMD_HF_ISO14443A_SET_THRESHOLDS: {
|
||||
struct p {
|
||||
uint8_t threshold;
|
||||
uint8_t threshold_high;
|
||||
uint8_t legic_threshold;
|
||||
} PACKED;
|
||||
struct p *payload = (struct p *) packet->data.asBytes;
|
||||
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
|
||||
FpgaSendCommand(FPGA_CMD_SET_EDGE_DETECT_THRESHOLD, (packet->data.asBytes[0] & 0x3f) | ((packet->data.asBytes[1] & 0x3f) << 6));
|
||||
LegicRfSetThreshold((uint32_t)packet->data.asBytes[2]);
|
||||
FpgaSendCommand(FPGA_CMD_SET_EDGE_DETECT_THRESHOLD, (payload->threshold & 0x3f) | ((payload->threshold_high & 0x3f) << 6));
|
||||
LegicRfSetThreshold((uint32_t)payload->legic_threshold);
|
||||
break;
|
||||
}
|
||||
case CMD_HF_ISO14443A_SNIFF: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue