mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
rename and read parameters via struct
This commit is contained in:
parent
a88cc901d9
commit
7c2379ac9f
3 changed files with 9 additions and 5 deletions
|
@ -1393,9 +1393,13 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CMD_HF_TEXKOM_SIMULATE: {
|
case CMD_HF_TEXKOM_SIMULATE: {
|
||||||
uint32_t timeout = 0;
|
struct p {
|
||||||
memcpy(&timeout, &packet->data.asBytes[9], 4);
|
uint8_t data[8];
|
||||||
HfWriteTkm(packet->data.asBytes, packet->data.asBytes[8], timeout);
|
uint8_t modulation;
|
||||||
|
uint32_t timeout;
|
||||||
|
} PACKED;
|
||||||
|
struct p *payload = (struct p *) packet->data.asBytes;
|
||||||
|
HfSimulateTkm(payload->data, payload->modulation, payload->timeout);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ static uint32_t HfEncodeTkm(const uint8_t *uid, uint8_t modulation, uint8_t *dat
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
int HfWriteTkm(uint8_t *uid, uint8_t modulation, uint32_t timeout) {
|
int HfSimulateTkm(uint8_t *uid, uint8_t modulation, uint32_t timeout) {
|
||||||
// free eventually allocated BigBuf memory
|
// free eventually allocated BigBuf memory
|
||||||
BigBuf_free_keep_EM();
|
BigBuf_free_keep_EM();
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,6 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
int HfReadADC(uint32_t samplesCount, bool ledcontrol);
|
int HfReadADC(uint32_t samplesCount, bool ledcontrol);
|
||||||
int HfWriteTkm(uint8_t *uid, uint8_t modulation, uint32_t timeout);
|
int HfSimulateTkm(uint8_t *uid, uint8_t modulation, uint32_t timeout);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue