Paul Sokolovsky
a4a439caa3
examples/button_reaction: Update for time_pulse_us() no longer raising exc.
2017-02-05 18:01:42 +03:00
Paul Sokolovsky
d5e9ab6e61
extmod/machine_pulse: Make time_pulse_us() not throw exceptions.
...
machine.time_pulse_us() is intended to provide very fine timing, including
while working with signal bursts, where each transition is tracked in row.
Throwing and handling an exception may take too much time and "signal loss".
So instead, in case of a timeout, just return negative value. Cases of
timeout while waiting for initial signal stabilization, and during actual
timing, are recognized.
The documentation is updated accordingly, and rewritten somewhat to clarify
the function behavior.
2017-02-05 14:20:17 +03:00
Damien George
bd04ed3e8a
py/objcomplex: Fix typo in ternary expression.
...
This typo actually did the correct thing, but it was very obscure (came
about from think in terms of Python's "x if cond else y" expression).
2017-02-04 00:23:56 +11:00
marc hoffman
91eb0153d3
esp8266/uart: Add support for polling uart device.
2017-02-03 17:15:43 +11:00
Damien George
90ab191b65
py/objstr: Convert some instances of mp_uint_t to size_t.
2017-02-03 13:04:56 +11:00
Damien George
50a9dd59f5
docs: For LCD160CR driver and tutorial, add link to positioning image.
2017-02-03 12:48:54 +11:00
Damien George
904732cdc9
stmhal/mpconfigport.h: Enable MICROPY_PY_BUILTINS_POW3 option.
2017-02-03 12:39:33 +11:00
Damien George
d812eb3435
qemu-arm/mpconfigport.h: Enable MICROPY_PY_BUILTINS_POW3 option.
2017-02-03 12:39:09 +11:00
Damien George
a19b5a01ce
py/mpconfig.h: Move PY_BUILTINS_POW3 config option to diff part of file.
...
With so many config options it's good to (at least try to) keep them
grouped into logical sections.
2017-02-03 12:35:48 +11:00
Damien George
84fb292cd5
tests/basics/string_format_modulo: Add more tests for dict formatting.
2017-02-03 12:17:43 +11:00
Damien George
7317e34383
py/objstr: Give correct behaviour when passing a dict to %-formatting.
...
This patch fixes two main things:
- dicts can be printed directly using '%s' % dict
- %-formatting should not crash when passed a non-dict to, eg, '%(foo)s'
2017-02-03 12:13:44 +11:00
Paul Sokolovsky
87882e1708
tests: Split tests for 2- and 3-arg pow().
2017-02-02 23:34:52 +03:00
Nicko van Someren
df0117c8ae
py: Added optimised support for 3-argument calls to builtin.pow()
...
Updated modbuiltin.c to add conditional support for 3-arg calls to
pow() using MICROPY_PY_BUILTINS_POW3 config parameter. Added support in
objint_mpz.c for for optimised implementation.
2017-02-02 22:23:10 +03:00
Damien George
2486c4ff46
py/objset: Fix inplace binary ops so frozensets are not modified.
2017-02-03 00:27:56 +11:00
Damien George
8a39e18f5f
tests/float: Add tests for zero to a negative power.
2017-02-03 00:04:13 +11:00
Damien George
3ed0e5e5d4
py/objcomplex: Correctly handle case of 0j to power of something.
...
0j to the power of negative now raises ZeroDivisionError, and 0j to the
power of positive returns 0.
2017-02-03 00:01:45 +11:00
Damien George
4b8ec5256d
py/objfloat: Raise ZeroDivisionError for 0 to negative power.
2017-02-03 00:01:37 +11:00
Damien George
05c70fdfba
tests/basics/set_binop: Add tests for inplace set operations.
2017-02-02 23:36:53 +11:00
Damien George
30cf503e97
py/objset: Make inplace binary operators actually modify the set.
2017-02-02 23:33:49 +11:00
Paul Sokolovsky
b32880bd51
tests/heapalloc_bytesio: Test for BytesIO with preallocates space.
2017-02-02 00:38:38 +03:00
Paul Sokolovsky
50d3a9df67
py/objstringio: Allow to specify initial capacity by passing numeric argument.
...
E.g. uio.BytesIO(100) will allocate buffer with 100 bytes of space.
2017-02-02 00:33:43 +03:00
Dave Hylands
aee74a1dae
unix: Make stack be non-executable
...
This PR is to address issue #2812 .
2017-02-01 23:03:10 +03:00
Paul Sokolovsky
00bd145398
zephyr/README: Describe many gotchas of networked builds.
2017-02-01 21:28:11 +03:00
Damien George
28185bb81b
tests/thread: Fix stack size test so tests run reliably on baremetal.
2017-02-01 17:21:35 +11:00
Andrew Gatt
9d3c0d423e
lib/oofatfs/ffconf.h: Add MICROPY_FATFS_NORTC option.
2017-01-31 19:54:20 +11:00