]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlf.c
CHG: trying to unify the crc algos in one place.
[proxmark3-svn] / client / cmdlf.c
index 0453effe11126c5fb9cd3131897c43d1cfae3819..7ca24a0adce116a65376cf2e3cdbf3487aec1de5 100644 (file)
@@ -123,12 +123,11 @@ int usage_lf_find(void){
 
 /* send a LF command before reading */
 int CmdLFCommandRead(const char *Cmd) {
-//     static char dummy[3] = {0x20,0x00,0x00};
+
        bool errors = FALSE;
        bool useHighFreq = FALSE;
        uint16_t one = 0, zero = 0;
        uint8_t cmdp = 0;
-       int strLength = 0;
        UsbCommand c = {CMD_MOD_THEN_ACQUIRE_RAW_ADC_SAMPLES_125K, {0,0,0}};
        
        while(param_getchar(Cmd, cmdp) != 0x00) {
@@ -136,7 +135,6 @@ int CmdLFCommandRead(const char *Cmd) {
                case 'h':
                        return usage_lf_cmdread();
                case 'H':
-                       //dummy[1]='h';
                        useHighFreq = TRUE;
                        cmdp++;
                        break;
@@ -144,7 +142,7 @@ int CmdLFCommandRead(const char *Cmd) {
                        cmdp++;
                        break;
                case 'c':
-                       strLength = param_getstr(Cmd, cmdp+1, (char *)&c.d.asBytes);
+                       param_getstr(Cmd, cmdp+1, (char *)&c.d.asBytes);
                        cmdp+=2;
                        break;
                case 'd':
@@ -173,7 +171,7 @@ int CmdLFCommandRead(const char *Cmd) {
        if (errors) return usage_lf_cmdread();
        
        // zero and one lengths
-       c.arg[1] = zero << 16 | one;
+       c.arg[1] = (uint32_t)(zero << 16 | one);
        
        // add frequency 125 or 134
        c.arg[2] = useHighFreq;
Impressum, Datenschutz