mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -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;
|
||||
}
|
||||
case CMD_HF_TEXKOM_SIMULATE: {
|
||||
uint32_t timeout = 0;
|
||||
memcpy(&timeout, &packet->data.asBytes[9], 4);
|
||||
HfWriteTkm(packet->data.asBytes, packet->data.asBytes[8], timeout);
|
||||
struct p {
|
||||
uint8_t data[8];
|
||||
uint8_t modulation;
|
||||
uint32_t timeout;
|
||||
} PACKED;
|
||||
struct p *payload = (struct p *) packet->data.asBytes;
|
||||
HfSimulateTkm(payload->data, payload->modulation, payload->timeout);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ static uint32_t HfEncodeTkm(const uint8_t *uid, uint8_t modulation, uint8_t *dat
|
|||
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
|
||||
BigBuf_free_keep_EM();
|
||||
|
||||
|
|
|
@ -22,6 +22,6 @@
|
|||
#include "common.h"
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue