Damien George
821dc27eec
stmhal/boards: Enable DAC for NUCLEO_F767ZI board.
2017-05-30 18:31:55 +10:00
Paul Sokolovsky
272a5d95e0
docs/esp8266: Consistently replace Pin.high/low methods with .on/off.
2017-05-30 07:36:25 +03:00
Paul Sokolovsky
d5b8825d5f
docs/machine.Pin: Add on() and off() methods.
2017-05-29 20:56:13 +03:00
Paul Sokolovsky
3496d9e4bd
docs/machine.Pin: Remove out_value() method.
...
This method isn't implemented in any port. It seemed to have originated
in cc3200 port, but actually never was implemented there either. In
general case, it's impossible to implement this method (for example, for
a perfect GPO, which has only output latch without any feedback look
into a CPU).
2017-05-29 20:51:30 +03:00
Ville Skyttä
ca16c38210
various: Spelling fixes
2017-05-29 11:36:05 +03:00
Damien George
e5e49bedcb
qemu-arm/Makefile: Adjust object-file lists to get correct dependencies.
...
With this change both the "run" and "test" targets can be built with -j
passed to make.
2017-05-26 22:51:14 +10:00
Damien George
825460a093
docs: Bump version to 1.9.
2017-05-26 19:07:37 +10:00
Damien George
d77862279e
unix/Makefile: Don't add frozen bytecode to minimal build.
2017-05-26 18:12:30 +10:00
Paul Sokolovsky
011684bd4f
zephyr/modusocket: Use DEBUG_PRINT macro name as other modules do.
...
Indeed, just "DEBUG" is too generic.
2017-05-26 10:20:25 +03:00
Damien George
22fdb91571
esp8266/mpconfigport.h: Remove duplicate link to lwip module.
...
It's already included in the core when MICROPY_PY_LWIP is defined.
2017-05-26 17:06:31 +10:00
Damien George
eea584860d
esp8266/modules: Mount filesystem at root when creating for first time.
2017-05-26 17:05:58 +10:00
Tom Collins
e26fb3ad73
py/objstringio: Catch mp_uint_t overflow of stream position in write().
2017-05-26 13:40:08 +10:00
Damien George
ed6d2547df
mpy-cross/Makefile: Guard "override undefine" by test for make feature.
...
make v3.81 doesn't have "undefine" so we can't use it with that version.
2017-05-26 13:16:55 +10:00
Damien George
85f7b0b468
py/mkrules.mk: Fix auto-qstr generation when "make -B" is used.
...
For make v3.81, using "make -B" can set $? to empty and in this case the
auto-qstr generation needs to pass all args (ie $^) to cpp. The previous
fix for this (which was removed in 23a693ec2d
)
used if statements in the shell command, which gave very long lines that
didn't work on certain systems (eg cygwin).
The fix in this patch is to use an $if(...) expression, which will evaluate
to $? (only newer prerequisites) if it's non empty, otherwise it will use
$^ (all prerequisites).
2017-05-26 13:12:42 +10:00
Damien George
8b13cd7e19
tests/basics: Add more tests for unwind jumps from within a try-finally.
...
These tests excercise cases that are fixed by the previous two commits.
2017-05-25 20:48:16 +10:00
Damien George
8f064e469d
py/emitbc: Fix bug with BC emitter computing Python stack size.
...
Previous to this patch the mp_emit_bc_adjust_stack_size function would
adjust the current stack size but would not increase the maximum stack size
if the current size went above it. This meant that certain Python code
(eg a try-finally block with no statements inside it) would not have enough
Python stack allocated to it.
This patch fixes the problem by always checking if the current stack size
goes above the maximum, and adjusting the latter if it does.
2017-05-25 20:42:30 +10:00
Damien George
04d05db27e
py/vm: Fix bug with unwind jump popping the iterator from a for loop.
...
This patch fixes a regression introduced by
088740ecc4
2017-05-25 20:39:08 +10:00
Damien George
68e71eacb8
py/vm: Fix bug with stackless mode and unwinding of exceptions.
...
This patch fixes a regression introduced by
71a3d6ec3b
Previous to this patch the n_state variable was referring to that computed
at the very start of the mp_execute_bytecode function. This patch fixes it
so that n_state is recomputed when the code_state changes.
2017-05-25 20:35:57 +10:00
Paul Sokolovsky
982e676902
zephyr/modusocket: getaddrinfo: Raise OSError on resolution timeout, etc.
2017-05-24 19:55:14 +03:00
Paul Sokolovsky
1c9ee49756
drivers: Replace deprecated Pin.high()/low() methods with .__call__(1/0).
2017-05-21 17:44:58 +03:00
Paul Sokolovsky
bcf31a3908
esp8266, stmhal, zephyr: Rename machine.Pin high/low methods to on/off.
...
For consistent Pin/Signal class hierarchy. With it, Signal is a proper
(while still ducktyped) subclass of a Pin, and any (direct) usage of Pin
can be replace with Signal.
As stmhal's class is reused both as machine.Pin and legacy pyb.Pin,
high/low methods actually retained there.
2017-05-21 17:44:58 +03:00
Paul Sokolovsky
299c0a3925
CODECONVENTIONS: Typo fix.
2017-05-21 15:58:03 +03:00
Paul Sokolovsky
3ebd67fc09
library/machine.Pin: Remove .id() method and .board class attr.
...
Both aren't part of generic Hardware API: It's impossible to implement
.id() method in a generic case (e.g., when Pin is instantiated by the
underlying OS/RTOS). .board attribute is an obvious space hog which
instead can be implemented on Python level if needed.
2017-05-21 15:50:16 +03:00
Paul Sokolovsky
19e065294d
cc3200/mods/pybpin: Remove toggle() method.
...
It's not part of MicroPython HW API and can be easily implemented on Python
level in case of need.
Saved 56 bytes of binary.
2017-05-21 15:39:27 +03:00
Damien George
338f0849d9
py/mkenv.mk: Use $(TOP) instead of ".." to reference tools, mpy-cross.
2017-05-19 15:53:55 +10:00
Damien George
436d97b3f9
docs/library/machine.UART: Update and improve uart.any() docs.
2017-05-19 15:48:22 +10:00
Damien George
aca898eeb0
esp8266/machine_uart: Add uart.any() method.
...
Returns 0 or 1, corresponding to no or at least 1 char waiting.
2017-05-19 15:48:22 +10:00
Damien George
218a876f97
tests/basics/builtin_range: Add tests for negative slicing of range.
2017-05-18 17:32:42 +10:00
Damien George
03659c51ca
py/objrange: Fix slicing of range when step of slice is negative.
2017-05-18 17:32:42 +10:00
Damien George
e1b0f2a16f
tests/basics/list_slice_3arg: Add more tests for negative slicing.
2017-05-18 17:32:42 +10:00
Damien George
eb4c37f7a4
py/sequence: Fix boundary errors when slicing with a negative step.
2017-05-18 17:32:42 +10:00
Damien George
d007351b33
docs/library/micropython: Document the newer micropython functions.
2017-05-18 00:25:09 +10:00
Damien George
55dd83a7ba
drivers/display/lcd160cr_test: Allow test to take orientation parameter.
2017-05-17 19:54:38 +10:00
Damien George
f351c6db5e
drivers/display/lcd160cr: Fix get_line method and enhance screen_dump.
...
The docs are updated and describe the new behaviour of these methods.
2017-05-17 19:53:13 +10:00
Damien George
e4a53570d0
docs: Change single occurrence of "Micropython" to "MicroPython".
2017-05-17 12:38:33 +10:00
Paul Sokolovsky
0af974b777
examples/hwapi/soft_pwm2_uasyncio: Update for call_later_ms().
...
Following finalized naming in uasyncio.
2017-05-17 00:44:00 +03:00
Paul Sokolovsky
0912334f54
zephyr/modusocket: getaddrinfo: Use RAISE_ERRNO for proper error decoding.
2017-05-17 00:21:22 +03:00
Paul Sokolovsky
5f648ff60e
zephyr/main: Check default netif before applying operations to it.
...
If no network driver is enabled (e.g., it doesn't exist for a particular
board), it will be NULL.
2017-05-17 00:17:53 +03:00
Paul Sokolovsky
aa9ce283c2
zephyr/modusocket: Get rid of cur_pkt object member.
...
Instead, just peek a packet at the head of the queue and work with it.
2017-05-16 13:46:54 +03:00
Paul Sokolovsky
a3008e447c
zephyr/modusocket: First step to switch to alternative FIFO processing.
...
Here we wait for non-empty FIFO, and then directly access/drop its head
element.
2017-05-16 13:43:06 +03:00
Damien George
88c51c3592
tools/mpy-tool.py: Fix regression with freezing floats in obj repr C.
...
Regression was introduced by ec534609f6
2017-05-16 18:53:02 +10:00
Damien George
a004554dc1
stmhal/modmachine: Remove TODO comment that is now implemented.
2017-05-16 17:44:14 +10:00
Damien George
37bd3b4f4c
stmhal/modmachine: Add machine.UART class, linking to pyb.UART.
...
pyb.UART has a superset of machine.UART functionality so can be used to
provide compatibility with other ports that also implement machine.UART.
2017-05-16 17:40:22 +10:00
puuu
4b235800a4
esp8266/modnetwork: In connect, fix potential buffer overflows.
2017-05-16 17:30:45 +10:00
Tom Collins
162a0f942b
tests/io/bytesio_ext: Test read() after seek() past end of BytesIO object.
2017-05-15 23:58:06 +03:00
Tom Collins
53461deb04
py/objstringio: Fix StringIO reads at or beyond EOF.
...
Existing code failed if seek() went past EOF (which is acceptable when writing).
2017-05-15 23:58:04 +03:00
Paul Sokolovsky
d5713c8618
docs/library/index: Add important summary of the intro section as warning.
...
To make them harder to miss.
2017-05-15 00:26:44 +03:00
Paul Sokolovsky
0ba136fbe9
docs/machine.Signal: Add initial draft description of Signal class.
2017-05-14 23:12:06 +03:00
Paul Sokolovsky
c19f07bd52
docs/machine.Pin: There's no toggle() method in MicroPython hardware API.
...
May be a port-specific method, not portable, not part of the official
specification.
2017-05-14 22:52:16 +03:00
Tom Collins
f06d0839bd
py/modsys: update conditionals for code referencing sys.stdout
...
Working on a build with PY_IO enabled (for PY_UJSON support) but PY_SYS_STDFILES disabled (no filesystem). There are multiple references to mp_sys_stdout_obj that should only be enabled if both PY_IO and PY_SYS_STDFILES are enabled.
2017-05-14 18:24:50 +03:00