Damien George
6d24dc23b8
py/emitglue: Move typedef of mp_raw_code_t from .c to .h file.
...
It's needed by frozen bytecode.
2016-04-13 16:05:43 +01:00
Damien George
c2a519bab9
tests: Skip async tests for native emitter.
2016-04-13 15:56:42 +01:00
Damien George
7f7e247545
tests: Add .exp files for async tests, so they can run with Python 3.4.
2016-04-13 15:56:15 +01:00
Damien George
6eb17c31a9
ports: Disable async/await on bare-arm, minimal, pic16bit, cc3200.
...
It costs 1188 bytes of code on Thumb 2 archs.
2016-04-13 15:31:30 +01:00
Damien George
c33df193bf
tests: Add 6 tests for async await/for/with.
2016-04-13 15:27:06 +01:00
Damien George
eacbd7aeba
py: Fix constant folding and inline-asm to work with new async grammar.
2016-04-13 15:26:39 +01:00
pohmelie
81ebba7e02
py: add async/await/async for/async with syntax
...
They are sugar for marking function as generator, "yield from"
and pep492 python "semantically equivalents" respectively.
@dpgeorge was the original author of this patch, but @pohmelie made
changes to implement `async for` and `async with`.
2016-04-13 15:26:38 +01:00
Paul Sokolovsky
959ed931a4
esp8266/esp_mphal: call_dupterm_read(): Fix order of deactivating on EOF.
...
First deactivate, then print diagnostic message.
2016-04-13 16:35:50 +03:00
Paul Sokolovsky
19e3c9d53a
esp8266/esp_mphal: Don't swallow exceptions in dupterm's read()/write().
...
The idea is that if dupterm object can handle exceptions, it will handle
them itself. Otherwise, object state can be compromised and it's better
to terminate dupterm session. For example, disconnected socket will keep
throwing exceptions and dump messages about that.
2016-04-13 16:34:17 +03:00
Paul Sokolovsky
54ea253f56
extmod/moduos_dupterm: Don't swallow exceptions in dupterm's read()/write().
...
The idea is that if dupterm object can handle exceptions, it will handle
them itself. Otherwise, object state can be compromised and it's better
to terminate dupterm session. For example, disconnected socket will keep
throwing exceptions and dump messages about that.
2016-04-13 16:34:11 +03:00
Paul Sokolovsky
47442d9f52
lib/utils/printf: Rework overriding printer of DEBUG_printf().
...
By default it uses mp_plat_print, but a port may override it to another
value with MICROPY_DEBUG_PRINTER_DEST.
2016-04-13 11:53:12 +03:00
Peter Hinch
22cbcd55f0
stmhal: Properly handle RTS/CTS flow control for buf/unbuf transfers.
...
Fixes issues #1912 and #1913 . UART documentation is also updated.
2016-04-13 08:42:32 +01:00
Damien George
3177ef544f
esp8266: In callback helpers, pop nlr_buf on successful call.
...
nlr_pop must be called if no exception was raised.
Also, return value of these callback helpers is made void because ther
is (currently) no use for it.
2016-04-13 00:01:28 +01:00
Paul Sokolovsky
b67d098841
py/modbuiltins: __repl_print__: Add comment about setting "_" special var.
2016-04-13 00:59:41 +03:00
Damien George
eec8a94f04
extmod/machine_i2c: Implement I2C memory reading/writing.
2016-04-12 15:52:17 +01:00
Damien George
9314b2df4f
extmod/machine_i2c: Fix I2C reading by sending ack/nack at end of byte.
2016-04-12 15:46:13 +01:00
Damien George
73bc0c24ab
drivers: Add SSD1306 OLED driver, with I2C and SPI interfaces.
2016-04-12 14:06:54 +01:00
Damien George
e813ea1070
esp8266: Enable framebuf module.
2016-04-12 14:06:54 +01:00
Damien George
a525493e40
esp8266: Switch from using custom I2C driver to generic extmod one.
2016-04-12 14:06:54 +01:00
Damien George
ac63ca7bc5
esp8266: Implement basic C-level pin HAL.
2016-04-12 14:06:54 +01:00
Damien George
1a65ff1b72
esp8266: Protect modpyb.h header file from multiple inclusions.
...
Also include py/obj.h so the header is self contained.
2016-04-12 14:06:54 +01:00
Damien George
67a327cb9b
stmhal: Enable framebuf module.
2016-04-12 14:06:54 +01:00
Damien George
e4f963a351
stmhal: Use new generic I2C object in machine module.
2016-04-12 14:06:54 +01:00
Damien George
69a1aaf654
stmhal: Implement basic C-level pin HAL.
2016-04-12 14:06:54 +01:00
Damien George
d083712224
extmod: Add generic machine.I2C class, with bit-bang I2C.
...
Should work on any machine that provides the correct pin functions.
2016-04-12 14:06:54 +01:00