summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBluebie <a@creativepony.com>2013-08-30 02:08:16 +1000
committerBluebie <a@creativepony.com>2013-08-30 02:08:16 +1000
commitbedfbdda7da712b8795d66d5c65cce18650f3d76 (patch)
treefb69ac160e37ee531a3bda95047fc21e31716b60
parentb96d1ac736d22caf7df908f3fe611adf32ee4db8 (diff)
downloadmicronucleus-bedfbdda7da712b8795d66d5c65cce18650f3d76.tar.gz
micronucleus-bedfbdda7da712b8795d66d5c65cce18650f3d76.tar.bz2
micronucleus-bedfbdda7da712b8795d66d5c65cce18650f3d76.zip
Update micronucleus_lib.c:
Result not always 64 - bad assumption that page size is always 64
-rw-r--r--commandline/library/micronucleus_lib.c5
1 files 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 <ihsan@kehribar.me>
@@ -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