chg: made DropField function a compiler macro instead.

This commit is contained in:
iceman1001 2018-02-06 22:32:08 +01:00
parent 2820ba5580
commit 6371dfc5b6
3 changed files with 9 additions and 12 deletions

View file

@ -662,12 +662,6 @@ int CmdHF14ASniff(const char *Cmd) {
return 0;
}
void DropField() {
UsbCommand c = {CMD_READER_ISO_14443a, {0, 0, 0}};
clearCommandBuffer();
SendCommand(&c);
}
int ExchangeAPDU14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen) {
uint16_t cmdc = 0;

View file

@ -50,10 +50,7 @@ extern int CmdHF14ACmdRaw(const char *Cmd);
extern int CmdHF14ACUIDs(const char *Cmd);
extern char* getTagInfo(uint8_t uid);
extern void DropField();
extern int ExchangeAPDU14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen);
extern int ExchangeAPDU14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen);
extern int usage_hf_14a_sim(void);
extern int usage_hf_14a_sniff(void);

View file

@ -139,9 +139,15 @@
#endif
#if defined(__linux__) || (__APPLE__)
# define BLUE_MSG(s) "\e[34m(s)\e[0m"
# define BLUE_MSG(s) "\e[34m" #s "\e[0m"
#else
# define BLUE_MSG(s) "(s)"
# define BLUE_MSG(s) #s
#endif
#ifndef DropField
#define DropField() { \
UsbCommand c = {CMD_READER_ISO_14443a, {0,0,0}}; clearCommandBuffer(); SendCommand(&c); \
}
#endif
extern int ukbhit(void);