\r
uint8_t receivedAnswer[MAX_MIFARE_FRAME_SIZE];\r
uint8_t receivedAnswerPar[MAX_MIFARE_PARITY_SIZE];\r
+ \r
+ LED_A_ON();\r
+ LED_B_OFF();\r
+ LED_C_OFF();\r
+// FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);\r
+// SpinDelay(100);\r
+ iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN);\r
+\r
+ clear_trace();\r
+ set_tracing(true); \r
\r
ReaderTransmitBitsPar(wupC1,7,0, NULL);\r
if(ReaderReceive(receivedAnswer, receivedAnswerPar) && (receivedAnswer[0] == 0x0a)) {\r
\r
// From iceman1001: removed the if, since some magic tags misbehavies and send an answer to it.\r
mifare_classic_halt(NULL, 0);\r
-\r
+ \r
+ LED_B_ON();\r
cmd_send(CMD_ACK,isOK,0,0,0,0);\r
+ LED_B_OFF();\r
+\r
+ FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);\r
+ LEDsoff(); \r
}\r
\r
//\r
\r
int mfCIdentify()\r
{\r
- UsbCommand c = {CMD_READER_ISO_14443a, {ISO14A_CONNECT | ISO14A_NO_DISCONNECT, 0, 0}};\r
- SendCommand(&c);\r
+ UsbCommand c;\r
+// UsbCommand c = {CMD_READER_ISO_14443a, {ISO14A_CONNECT | ISO14A_NO_DISCONNECT, 0, 0}};\r
+// SendCommand(&c);\r
\r
- UsbCommand resp;\r
- WaitForResponse(CMD_ACK,&resp);\r
+ UsbCommand resp;\r
+// WaitForResponse(CMD_ACK,&resp);\r
\r
// iso14a_card_select_t card;\r
// memcpy(&card, (iso14a_card_select_t *)resp.d.asBytes, sizeof(iso14a_card_select_t));\r
}\r
\r
// disconnect\r
- c.cmd = CMD_READER_ISO_14443a;\r
- c.arg[0] = 0;\r
- c.arg[1] = 0;\r
- c.arg[2] = 0;\r
- SendCommand(&c);\r
+// c.cmd = CMD_READER_ISO_14443a;\r
+// c.arg[0] = 0;\r
+// c.arg[1] = 0;\r
+// c.arg[2] = 0;\r
+// SendCommand(&c);\r
\r
return (int) isGeneration;\r
}\r