fix: do not ignore "USBASP_FUNC_SETISPSCK"
authorStephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Sat, 25 Aug 2012 12:43:17 +0000 (14:43 +0200)
committerStephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Sat, 25 Aug 2012 13:09:03 +0000 (13:09 +0000)
Some usbasp supporting software runs into trouble (or at least
raises error-reports), complaining not be able to set the right
isp-speed.
Because esp. windows-software seems to be a little bit sensitive.
this patch enables USBaspLoader to ignore this cmd. properly.

Signed-off-by: Stephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
firmware/main.c

index c4b0b95..fd5dd48 100644 (file)
@@ -217,7 +217,7 @@ static uchar    replyBuffer[4];
         }
         replyBuffer[3] = rval;
         len = 4;
-    }else if(rq->bRequest == USBASP_FUNC_ENABLEPROG){
+    }else if((rq->bRequest == USBASP_FUNC_ENABLEPROG) || (rq->bRequest == USBASP_FUNC_SETISPSCK)){
         /* replyBuffer[0] = 0; is never touched and thus always 0 which means success */
         len = 1;
     }else if(rq->bRequest >= USBASP_FUNC_READFLASH && rq->bRequest <= USBASP_FUNC_SETLONGADDRESS){