]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
syntax sugar
authoriceman1001 <iceman@iuse.se>
Sat, 21 Jan 2017 10:33:14 +0000 (11:33 +0100)
committericeman1001 <iceman@iuse.se>
Sat, 21 Jan 2017 10:33:14 +0000 (11:33 +0100)
armsrc/iso14443a.c
armsrc/iso14443a.h

index 3daab1994f089be40b7eac21517fe9bcfa0fe49d..81e45960fea652f2e331d9dda035487efcb5d1ec 100644 (file)
@@ -2085,17 +2085,17 @@ void ReaderIso14443a(UsbCommand *c) {
        }
 
        if (param & ISO14A_RAW) {
-               if(param & ISO14A_APPEND_CRC) {
-                       if(param & ISO14A_TOPAZMODE) {
+               if (param & ISO14A_APPEND_CRC) {
+                       if (param & ISO14A_TOPAZMODE)
                                AppendCrc14443b(cmd,len);
-                       } else {
+                       else
                                AppendCrc14443a(cmd,len);
-                       }
+                       
                        len += 2;
                        if (lenbits) lenbits += 16;
                }
-               if(lenbits>0) {                         // want to send a specific number of bits (e.g. short commands)
-                       if(param & ISO14A_TOPAZMODE) {
+               if (lenbits>0) {                                // want to send a specific number of bits (e.g. short commands)
+                       if (param & ISO14A_TOPAZMODE) {
                                int bits_to_send = lenbits;
                                uint16_t i = 0;
                                ReaderTransmitBitsPar(&cmd[i++], MIN(bits_to_send, 7), NULL, NULL);             // first byte is always short (7bits) and no parity
@@ -2109,7 +2109,7 @@ void ReaderIso14443a(UsbCommand *c) {
                                ReaderTransmitBitsPar(cmd, lenbits, par, NULL);                                                 // bytes are 8 bit with odd parity
                        }
                } else {                                        // want to send complete bytes only
-                       if(param & ISO14A_TOPAZMODE) {
+                       if (param & ISO14A_TOPAZMODE) {
                                uint16_t i = 0;
                                ReaderTransmitBitsPar(&cmd[i++], 7, NULL, NULL);                                                // first byte: 7 bits, no paritiy
                                while (i < len) {
index 5fb45b60420603744064a683baebefba6c8f7b78..3dec6122263fd53093b7781772f444451168c0a0 100644 (file)
 #include "BigBuf.h"
 #include "parity.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 typedef struct {
        enum {
                DEMOD_UNSYNCD,
@@ -110,4 +115,10 @@ extern int EmSendCmd(uint8_t *resp, uint16_t respLen);
 int EmSendCmdPar(uint8_t *resp, uint16_t respLen, uint8_t *par);
 bool EmLogTrace(uint8_t *reader_data, uint16_t reader_len, uint32_t reader_StartTime, uint32_t reader_EndTime, uint8_t *reader_Parity,
                                uint8_t *tag_data, uint16_t tag_len, uint32_t tag_StartTime, uint32_t tag_EndTime, uint8_t *tag_Parity);
+
+
+#ifdef __cplusplus
+}
+#endif                         
+
 #endif /* __ISO14443A_H */
Impressum, Datenschutz