From bedfbdda7da712b8795d66d5c65cce18650f3d76 Mon Sep 17 00:00:00 2001 From: Bluebie Date: Fri, 30 Aug 2013 02:08:16 +1000 Subject: Update micronucleus_lib.c: Result not always 64 - bad assumption that page size is always 64 --- commandline/library/micronucleus_lib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commandline/library/micronucleus_lib.c b/commandline/library/micronucleus_lib.c index 4317af5..6bbf04c 100644 --- a/commandline/library/micronucleus_lib.c +++ b/commandline/library/micronucleus_lib.c @@ -1,3 +1,4 @@ + /* Created: September 2012 by ihsan Kehribar @@ -148,8 +149,8 @@ int micronucleus_writeFlash(micronucleus* deviceHandle, unsigned int program_siz // give microcontroller enough time to write this page and come back online delay(deviceHandle->write_sleep); - - if (res != 64) return -1; + + if (res != page_length) return -1; } // call progress update callback with completion status -- cgit v1.2.3