]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/iso15693.c
Fix QT CXXFLAGS/LDFLAGS
[proxmark3-svn] / armsrc / iso15693.c
index a80e6c6a06cb8d7ef0d17cfafbc9c6bcb8a472ac..723d297d11a7059288a2d1e524322f0128f21c14 100644 (file)
@@ -478,12 +478,12 @@ static void TransmitTo15693Tag(const BYTE *cmd, int len, int *samples, int *wait
        if(*wait < 10) { *wait = 10; }\r
 \r
 //    for(c = 0; c < *wait;) {\r
        if(*wait < 10) { *wait = 10; }\r
 \r
 //    for(c = 0; c < *wait;) {\r
-//        if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
-//            SSC_TRANSMIT_HOLDING = 0x00;             // For exact timing!\r
+//        if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+//            AT91C_BASE_SSC->SSC_THR = 0x00;          // For exact timing!\r
 //            c++;\r
 //        }\r
 //            c++;\r
 //        }\r
-//        if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
-//            volatile DWORD r = SSC_RECEIVE_HOLDING;\r
+//        if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
+//            volatile DWORD r = AT91C_BASE_SSC->SSC_RHR;\r
 //            (void)r;\r
 //        }\r
 //        WDT_HIT();\r
 //            (void)r;\r
 //        }\r
 //        WDT_HIT();\r
@@ -491,15 +491,15 @@ static void TransmitTo15693Tag(const BYTE *cmd, int len, int *samples, int *wait
 \r
     c = 0;\r
     for(;;) {\r
 \r
     c = 0;\r
     for(;;) {\r
-        if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
-            SSC_TRANSMIT_HOLDING = cmd[c];\r
+        if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+            AT91C_BASE_SSC->SSC_THR = cmd[c];\r
             c++;\r
             if(c >= len) {\r
                 break;\r
             }\r
         }\r
             c++;\r
             if(c >= len) {\r
                 break;\r
             }\r
         }\r
-        if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
-            volatile DWORD r = SSC_RECEIVE_HOLDING;\r
+        if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
+            volatile DWORD r = AT91C_BASE_SSC->SSC_RHR;\r
             (void)r;\r
         }\r
         WDT_HIT();\r
             (void)r;\r
         }\r
         WDT_HIT();\r
@@ -520,15 +520,15 @@ static void TransmitTo15693Reader(const BYTE *cmd, int len, int *samples, int *w
 \r
     c = 0;\r
     for(;;) {\r
 \r
     c = 0;\r
     for(;;) {\r
-        if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
-            SSC_TRANSMIT_HOLDING = cmd[c];\r
+        if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+            AT91C_BASE_SSC->SSC_THR = cmd[c];\r
             c++;\r
             if(c >= len) {\r
                 break;\r
             }\r
         }\r
             c++;\r
             if(c >= len) {\r
                 break;\r
             }\r
         }\r
-        if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
-            volatile DWORD r = SSC_RECEIVE_HOLDING;\r
+        if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
+            volatile DWORD r = AT91C_BASE_SSC->SSC_RHR;\r
             (void)r;\r
         }\r
         WDT_HIT();\r
             (void)r;\r
         }\r
         WDT_HIT();\r
@@ -550,12 +550,12 @@ static int GetIso15693AnswerFromTag(BYTE *receivedResponse, int maxLen, int *sam
        c = 0;\r
        getNext = FALSE;\r
        for(;;) {\r
        c = 0;\r
        getNext = FALSE;\r
        for(;;) {\r
-               if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
-                       SSC_TRANSMIT_HOLDING = 0x43;\r
+               if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+                       AT91C_BASE_SSC->SSC_THR = 0x43;\r
                }\r
                }\r
-               if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
+               if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
                        SBYTE b;\r
                        SBYTE b;\r
-                       b = (SBYTE)SSC_RECEIVE_HOLDING;\r
+                       b = (SBYTE)AT91C_BASE_SSC->SSC_RHR;\r
 \r
                        // The samples are correlations against I and Q versions of the\r
                        // tone that the tag AM-modulates, so every other sample is I,\r
 \r
                        // The samples are correlations against I and Q versions of the\r
                        // tone that the tag AM-modulates, so every other sample is I,\r
@@ -697,12 +697,12 @@ static int GetIso15693AnswerFromSniff(BYTE *receivedResponse, int maxLen, int *s
        c = 0;\r
        getNext = FALSE;\r
        for(;;) {\r
        c = 0;\r
        getNext = FALSE;\r
        for(;;) {\r
-               if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
-                       SSC_TRANSMIT_HOLDING = 0x43;\r
+               if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+                       AT91C_BASE_SSC->SSC_THR = 0x43;\r
                }\r
                }\r
-               if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
+               if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
                        SBYTE b;\r
                        SBYTE b;\r
-                       b = (SBYTE)SSC_RECEIVE_HOLDING;\r
+                       b = (SBYTE)AT91C_BASE_SSC->SSC_RHR;\r
 \r
                        // The samples are correlations against I and Q versions of the\r
                        // tone that the tag AM-modulates, so every other sample is I,\r
 \r
                        // The samples are correlations against I and Q versions of the\r
                        // tone that the tag AM-modulates, so every other sample is I,\r
@@ -855,15 +855,15 @@ void AcquireRawAdcSamplesIso15693(void)
 \r
        c = 0;\r
        for(;;) {\r
 \r
        c = 0;\r
        for(;;) {\r
-               if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
-                       SSC_TRANSMIT_HOLDING = ToSend[c];\r
+               if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+                       AT91C_BASE_SSC->SSC_THR = ToSend[c];\r
                        c++;\r
                        if(c == ToSendMax+3) {\r
                                break;\r
                        }\r
                }\r
                        c++;\r
                        if(c == ToSendMax+3) {\r
                                break;\r
                        }\r
                }\r
-               if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
-                       volatile DWORD r = SSC_RECEIVE_HOLDING;\r
+               if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
+                       volatile DWORD r = AT91C_BASE_SSC->SSC_RHR;\r
                        (void)r;\r
                }\r
                WDT_HIT();\r
                        (void)r;\r
                }\r
                WDT_HIT();\r
@@ -874,12 +874,12 @@ void AcquireRawAdcSamplesIso15693(void)
        c = 0;\r
        getNext = FALSE;\r
        for(;;) {\r
        c = 0;\r
        getNext = FALSE;\r
        for(;;) {\r
-               if(SSC_STATUS & (SSC_STATUS_TX_READY)) {\r
-                       SSC_TRANSMIT_HOLDING = 0x43;\r
+               if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {\r
+                       AT91C_BASE_SSC->SSC_THR = 0x43;\r
                }\r
                }\r
-               if(SSC_STATUS & (SSC_STATUS_RX_READY)) {\r
+               if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {\r
                        SBYTE b;\r
                        SBYTE b;\r
-                       b = (SBYTE)SSC_RECEIVE_HOLDING;\r
+                       b = (SBYTE)AT91C_BASE_SSC->SSC_RHR;\r
 \r
                        // The samples are correlations against I and Q versions of the\r
                        // tone that the tag AM-modulates, so every other sample is I,\r
 \r
                        // The samples are correlations against I and Q versions of the\r
                        // tone that the tag AM-modulates, so every other sample is I,\r
Impressum, Datenschutz