diff options
author | Damien George <damien.p.george@gmail.com> | 2014-12-20 18:09:04 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-12-20 18:09:04 +0000 |
commit | 4fd7c1a2ac0e45910e9afe7d1ea751cecd425189 (patch) | |
tree | 7cf7d0422dde661e78eec37c2eff50396f53cd2f /tools | |
parent | 2870d85a114a3110bfefa35494227d788c4b6df5 (diff) | |
download | micropython-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')
-rwxr-xr-x | tools/pyboard.py | 4 |
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') |