Paul Sokolovsky
4ecb700fe3
streams: Treat non-error output size as unsigned.
2014-07-23 00:25:46 +03:00
Paul Sokolovsky
e1b1abc1e8
stream: Revert to checking for the correct error value.
2014-07-23 00:23:44 +03:00
Damien George
de993f4573
Merge pull request #766 from dhylands/allow-dfu-override
...
Allow DFU_UTIL to be overridden from the environment.
2014-07-22 11:02:59 +01:00
Damien George
7cfae9693b
Merge pull request #746 from blmorris/master
...
Enable 16-bit memory addresses for i2c.mem_read and i2c_mem_write
2014-07-22 11:01:42 +01:00
Damien George
3e0bce3587
Merge pull request #767 from dhylands/fix-short-read
...
Deal with reading a buffer less than what was allocated.
2014-07-22 11:01:24 +01:00
blmorris
7a03b5f56a
remove Myriad2 board config files from master
2014-07-21 23:12:07 -04:00
blmorris
86f0b31bcf
Change boolean 'use_16bit_addr' to int 'addr_size', can be either 8 or 16 bits, default value is 8
...
to maintain compatibility with existing code.
2014-07-21 22:45:04 -04:00
Dave Hylands
1d8816c36b
Deal with reading a buffer less than what was allocated.
...
With this fix, file_long_read now passes.
2014-07-21 19:10:10 -07:00
Dave Hylands
a2e7a1315d
Allow DFU_UTIL to be overridden from the environment.
2014-07-21 16:28:07 -07:00
Paul Sokolovsky
512465bc66
tests: Add testcase for read by length past EOF.
...
Currently broken for unicode input streams.
2014-07-22 00:11:37 +03:00
blmorris
721d6240c9
Merge https://github.com/blmorris/micropython into Myriad2
2014-07-21 12:50:10 -04:00
blmorris
4038f513ea
Merge https://github.com/micropython/micropython
2014-07-21 12:47:57 -04:00
Damien George
951ed9d02f
stmhal: Fix REPL printing by cooking output sent to stdout_obj.
...
Recent changes to builtin print meant that print was printing to the
mp_sys_stdout_obj, which was sending data raw to the USB CDC device.
The data should be cooked so that \n turns into \r\n.
2014-07-20 13:57:43 +01:00
Damien George
1163cb9cb5
stmhal: Change calls to pfenv_printf to pfenv_vprintf.
...
Fixes printing bugs introduced by
cb66f41ebc .
2014-07-20 13:10:18 +01:00
Paul Sokolovsky
cb66f41ebc
py: Make print() accept "file" argument, and actually print to stream.
...
And not system printf(), like it was before. For this, move pfenv_printf()
from stmhal port to py/.
2014-07-19 21:27:22 +03:00
Damien George
04c9fec7d1
Merge pull request #757 from stinos/windows-fsync
...
Add fsync for windows, i.e. _commit. See dce8876
2014-07-19 18:40:49 +01:00
Damien George
2c0701101b
Merge pull request #759 from micropython/unicode-read-chars
...
py: Add stream reading of n unicode chars; unicode support by default.
2014-07-19 18:38:28 +01:00
Damien George
1694bc733d
py: Add stream reading of n unicode chars; unicode support by default.
...
With unicode enabled, this patch allows reading a fixed number of
characters from text-mode streams; eg file.read(5) will read 5 unicode
chars, which can made of more than 5 bytes.
For an ASCII stream (ie no chars > 127) it only needs to do 1 read. If
there are lots of non-ASCII chars in a stream, then it needs multiple
reads of the underlying object.
Adds a new test for this case. Enables unicode support by default on
unix and stmhal ports.
2014-07-19 18:34:04 +01:00
Damien George
02bc882c3d
stmhal: Add file.flush and os.stat.
2014-07-19 16:39:13 +01:00
blmorris
0f4ee2e44a
Merge https://github.com/micropython/micropython
2014-07-18 16:06:22 -04:00
Damien George
5467186b0e
py: Remove unnecessary argument in bytearray print.
2014-07-17 21:56:32 +01:00
Paul Sokolovsky
e3737b858a
formatfloat.c: Typo fix in comment.
2014-07-17 20:45:58 +03:00
Damien George
a4022c92f0
py, inline asm: Change "and" op name to "and_" to avoid keyword clash.
...
Addresses issue #753 .
2014-07-17 12:37:56 +01:00
Damien George
a50494ab68
Merge pull request #755 from dhylands/teensy-core
...
Add teensy core files and use same toolchain as stmhal
2014-07-17 12:30:44 +01:00
Damien George
db56ad2915
Merge pull request #754 from dhylands/fix-teensy
...
Fix teensy to build on latest tree.
2014-07-17 12:26:35 +01:00