]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/appmain.c
fix a compilation issue on linux (include termcap lib)
[proxmark3-svn] / armsrc / appmain.c
index bb733feff6cf8b5094a5e6cb29d339370b78bd6b..18b8d64a6b10e1e32fd25c4d71d51d5c492b0121 100644 (file)
@@ -4,10 +4,14 @@
 // Jonathan Westhues, Mar 2006\r
 // Edits by Gerhard de Koning Gans, Sep 2007 (##)\r
 //-----------------------------------------------------------------------------\r
+\r
+\r
 #include <proxmark3.h>\r
 #include "apps.h"\r
+#ifdef WITH_LCD\r
 #include "fonts.h"\r
 #include "LCD.h"\r
+#endif\r
 \r
 // The large multi-purpose buffer, typically used to hold A/D samples,\r
 // maybe pre-processed in some way.\r
@@ -611,6 +615,10 @@ void UsbPacketReceived(BYTE *packet, int len)
                case CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443:\r
                        AcquireRawAdcSamplesIso14443(c->ext1);\r
                        break;\r
+
+               case CMD_READ_SRI512_TAG:
+                       ReadSRI512Iso14443(c->ext1);
+                       break;
 \r
                case CMD_READER_ISO_14443a:\r
                        ReaderIso14443a(c->ext1);\r
@@ -649,10 +657,9 @@ void UsbPacketReceived(BYTE *packet, int len)
                        break;\r
 \r
                case CMD_FPGA_MAJOR_MODE_OFF:           // ## FPGA Control\r
-                       LED_C_ON();\r
                        FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);\r
                        SpinDelay(200);\r
-                       LED_C_OFF();\r
+                       LED_D_OFF(); // LED D indicates field ON or OFF\r
                        break;\r
 \r
                case CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K:\r
@@ -678,11 +685,11 @@ void UsbPacketReceived(BYTE *packet, int len)
                        SimulateTagLowFrequency(c->ext1);\r
                        LED_A_OFF();\r
                        break;\r
-\r
+#ifdef WITH_LCD\r
                case CMD_LCD_RESET:\r
                        LCDReset();\r
                        break;\r
-\r
+#endif\r
                case CMD_SWEEP_LF:\r
                        SweepLFrange();\r
                        break;\r
@@ -690,13 +697,14 @@ void UsbPacketReceived(BYTE *packet, int len)
                case CMD_SET_LF_DIVISOR:\r
                        FpgaSendCommand(FPGA_CMD_SET_DIVISOR, c->ext1);\r
                        break;\r
-\r
+#ifdef WITH_LCD\r
                case CMD_LCD:\r
                        LCDSend(c->ext1);\r
                        break;\r
-\r
+#endif\r
         case CMD_SETUP_WRITE:\r
                case CMD_FINISH_WRITE:\r
+               case CMD_HARDWARE_RESET:\r
                        USB_D_PLUS_PULLUP_OFF();\r
                        SpinDelay(1000);\r
                        SpinDelay(1000);\r
@@ -706,6 +714,7 @@ void UsbPacketReceived(BYTE *packet, int len)
                        }\r
                        break;\r
 \r
+\r
                default:\r
                        DbpString("unknown command");\r
                        break;\r
@@ -741,6 +750,8 @@ void AppMain(void)
        // Load the FPGA image, which we have stored in our flash.\r
        FpgaDownloadAndGo();\r
 \r
+#ifdef WITH_LCD\r
+\r
        LCDInit();\r
 \r
        // test text on different colored backgrounds\r
@@ -763,6 +774,8 @@ void AppMain(void)
        LCDFill(0, 1+8*14, 132, 8, CYAN);\r
        LCDFill(0, 1+8*15, 132, 8, MAGENTA);\r
 \r
+#endif\r
+\r
        for(;;) {\r
                UsbPoll(FALSE);\r
                WDT_HIT();\r
Impressum, Datenschutz