| Age | Commit message (Collapse) | Author |
|
|
|
This removes mpz_as_int, since that was a terrible function (it
implemented saturating conversion).
Use mpz_as_int_checked and mpz_as_uint_checked. These now work
correctly (they previously had wrong overflow checking, eg
print(chr(10000000000000)) on 32-bit machine would incorrectly convert
this large number to a small int).
|
|
Addresses issue #724.
|
|
For accel to start-up reliably, need to wait 30ms between on/off, and
30ms for it to enter active mode. With this fix the accel can be read
immediately after initialising it.
Addresses issue #763.
|
|
Before, pyb.stdin/pyb.stdout allowed some kind of access to the USB VCP
device, but it was basic access.
This patch adds a proper USB_VCP class and object with much more control
over the USB VCP device. Create an object with pyb.USB_VCP(), then use
this object as if it were a UART object. It has send, recv, read,
write, and other methods. send and recv allow a timeout to be specified.
Addresses issue 774.
|
|
This allows to create str's with a smaller length than initially asked
for.
|
|
Lexer is now 8-bit clean inside strings.
|
|
Add support for storing args during an exception raised by an irq.
|
|
|
|
Many OSes/CPUs have affinity to put "user" data into lower half of address
space. Take advantage of that and remap such addresses into full small int
range (including negative part).
If address is from upper half, long int will be used. Previously, small
int was returned for lower quarter of address space, and upper quarter. For
2 middle quarters, long int was used, which is clearly worse schedule than
the above.
|
|
|
|
The user code should call micropython.alloc_emergency_exception_buf(size)
where size is the size of the buffer used to print the argument
passed to the exception.
With the test code from #732, and a call to
micropython.alloc_emergenncy_exception_buf(100) the following error is
now printed:
```python
>>> import heartbeat_irq
Uncaught exception in Timer(4) interrupt handler
Traceback (most recent call last):
File "0://heartbeat_irq.py", line 14, in heartbeat_cb
NameError: name 'led' is not defined
```
|
|
Add GNUmakefile to the .gitignore file.
|
|
Addresses issue #765.
|
|
|
|
|
|
|
|
Allow DFU_UTIL to be overridden from the environment.
|
|
Enable 16-bit memory addresses for i2c.mem_read and i2c_mem_write
|
|
Deal with reading a buffer less than what was allocated.
|
|
|
|
bits, default value is 8
to maintain compatibility with existing code.
|
|
With this fix, file_long_read now passes.
|
|
|
|
Currently broken for unicode input streams.
|
|
|
|
|
|
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.
|
|
Fixes printing bugs introduced by
cb66f41ebc4980f4e6b7543bece19e3b9daac25c.
|
|
And not system printf(), like it was before. For this, move pfenv_printf()
from stmhal port to py/.
|
|
Add fsync for windows, i.e. _commit. See dce8876
|
|
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.
|
|
|
|
|
|
|
|
|
|
Addresses issue #753.
|
|
Add teensy core files and use same toolchain as stmhal
|
|
Fix teensy to build on latest tree.
|
|
|
|
|
|
|
|
|
|
Put #include of mpconfig.h before misc.h
Replace uses of ARRAY_SIZE with MP_ARRAY_SIZE
|
|
|
|
|
|
This method apparently should be part of stream interface.
|
|
This script uses expected test results as generated by run-tests --write-exp,
and requires only standard unix shell funtionality (no bash). It is useful
to run testsuite on embedded systems, where there's no CPython and Bash.
|
|
emitnative in particular requires nlr_* to be real functions, so doesn't
compile with MICROPY_NLR_SETJMP=1.
|