summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcpldcpu <cpldcpu@gmail.com>2014-07-27 05:26:12 +0200
committercpldcpu <cpldcpu@gmail.com>2014-07-27 05:26:21 +0200
commit0aacdaacd3f72668e78f2e3c957ca6d3166d1d01 (patch)
tree5c6375df31c935d9b0a5e37feee00276984c3b5f
parentdf94369d5291f8842d36938f7b2bb2c926cf0740 (diff)
downloadmicronucleus-0aacdaacd3f72668e78f2e3c957ca6d3166d1d01.tar.gz
micronucleus-0aacdaacd3f72668e78f2e3c957ca6d3166d1d01.tar.bz2
micronucleus-0aacdaacd3f72668e78f2e3c957ca6d3166d1d01.zip
commandline: fixed assert
devicereply can be 6 bytes in latest version.
-rw-r--r--commandline/library/micronucleus_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commandline/library/micronucleus_lib.c b/commandline/library/micronucleus_lib.c
index f7b51d5..e2f6791 100644
--- a/commandline/library/micronucleus_lib.c
+++ b/commandline/library/micronucleus_lib.c
@@ -66,7 +66,7 @@ micronucleus* micronucleus_connect(int fast_mode) {
// get nucleus info
unsigned char buffer[6];
int res = usb_control_msg(nucleus->device, USB_ENDPOINT_IN| USB_TYPE_VENDOR | USB_RECIP_DEVICE, 0, 0, 0, (char *)buffer, 6, MICRONUCLEUS_USB_TIMEOUT);
- assert(res >= 4);
+ assert(res >= 6);
nucleus->flash_size = (buffer[0]<<8) + buffer[1];
nucleus->page_size = buffer[2];