summaryrefslogtreecommitdiffstatshomepage
path: root/tools/pyboard.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-12-20 18:09:04 +0000
committerDamien George <damien.p.george@gmail.com>2014-12-20 18:09:04 +0000
commit4fd7c1a2ac0e45910e9afe7d1ea751cecd425189 (patch)
tree7cf7d0422dde661e78eec37c2eff50396f53cd2f /tools/pyboard.py
parent2870d85a114a3110bfefa35494227d788c4b6df5 (diff)
downloadmicropython-4fd7c1a2ac0e45910e9afe7d1ea751cecd425189.tar.gz
micropython-4fd7c1a2ac0e45910e9afe7d1ea751cecd425189.zip
tools, pyboard.py: Write data to pyboard in chunks of 256 bytes.
This speeds up writes significantly.
Diffstat (limited to 'tools/pyboard.py')
-rwxr-xr-xtools/pyboard.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/pyboard.py b/tools/pyboard.py
index 036f6056cd..77f397b6e5 100755
--- a/tools/pyboard.py
+++ b/tools/pyboard.py
@@ -104,8 +104,8 @@ class Pyboard:
command_bytes = bytes(command, encoding='ascii')
# write command
- for i in range(0, len(command_bytes), 32):
- self.serial.write(command_bytes[i:min(i+32, len(command_bytes))])
+ for i in range(0, len(command_bytes), 256):
+ self.serial.write(command_bytes[i:min(i + 256, len(command_bytes))])
time.sleep(0.01)
self.serial.write(b'\x04')