Paul Sokolovsky
f12146cbf6
extmod/vfs_fat: Add chdir() method.
...
Ported from stmhal.
2016-05-29 18:17:00 +03:00
Damien George
602305b211
esp8266/uart: Properly initialise UART0 RXD pin in uart_config.
...
Tested and seems to work. See #1995 .
2016-05-29 10:30:27 +01:00
Damien George
6707fc94ae
esp8266/modnetwork: Allow to press ctrl-C while scan() is running.
...
Ctrl-C will raise a KeyboardInterrupt and stop the scan (although it will
continue to run in the background, it won't report anything). If
interrupted, and another scan() is started before the old one completes
in the background, then the second scan will fail with an OSError.
2016-05-29 09:53:04 +01:00
Damien George
84381fa0fc
esp8266/modnetwork: Protect scan() callback against memory errors.
...
scan() allocates memory so may cause an exception to be raised.
2016-05-29 09:52:07 +01:00
Damien George
55df14f1a4
esp8266/modnetwork: scan() is only supported by STA when it's enabled.
2016-05-29 00:35:24 +01:00
Damien George
715ee9d925
py/modstruct: Allow to have "0s" in struct format.
2016-05-28 23:27:38 +01:00
Paul Sokolovsky
282d81a40e
README: "quick build": Use "make axtls" after all.
...
"make deplibs" also builds libffi, and that requires GNU autotools. As
we use host libffi by default, skip requiring users to build it for now.
2016-05-28 21:08:09 +03:00
Paul Sokolovsky
4889b6ff9b
unix/Makefile: "make axtls": Automatically fetch submodules if missing.
...
Try to emulate "you can build without reading instructions" behavior as far
as possible.
2016-05-28 21:03:48 +03:00
Paul Sokolovsky
e66b3042d6
README: Add "make deplibs" to quick build section.
2016-05-28 20:41:39 +03:00
Paul Sokolovsky
6055d411a9
unix/mpconfigport.mk: Document MICROPY_STANDALONE make-level option.
...
Avoid using system libraries, use copies bundled with MicroPython as
submodules (currently affects only libffi, other dependencies either
already used as bundled-only (axtls), or can't be bundled (so far),
like libjni).
2016-05-28 20:38:14 +03:00
Paul Sokolovsky
cbe544a76d
tools: Upgrade upip to 0.7.
...
SSL certificate warning, switch to uerrno, and better usage message.
2016-05-28 02:57:53 +03:00
Paul Sokolovsky
2ec0ee082a
py/moduerrno: Add ECONNREFUSED, one of frequent networking errors.
2016-05-28 00:17:19 +03:00
Robert HH
7c004e794c
extmod/vfs_fat*: Replace text error messages by POSIX error numbers.
...
These changes are in line with similar changes in other modules, and
with standard Python interface.
2016-05-27 23:57:01 +03:00
Paul Sokolovsky
751e3b7a82
extmod/virtpin: Initial implementation of open-ended C-level Pin interface.
...
Using usual method of virtual method tables. Single virtual method,
ioctl, is defined currently for all operations. This universal and
extensible vtable-based method is also defined as a default MPHAL
GPIO implementation, but a specific port may override it with its
own implementation (e.g. close-ended, but very efficient, e.g. avoiding
virtual method dispatch).
2016-05-27 01:08:43 +03:00
Paul Sokolovsky
74e6c0337d
esp8266/Makefile: Document "disable" value for UART_OS.
2016-05-27 00:44:05 +03:00
Damien George
7ebfe09fbd
esp8266: Add dht.py script for high-level control of DHT11/DHT22 sensor.
...
TODO: should go in a more port-neutral place, like drivers/dht, but at the
moment in relies on specific esp module.
2016-05-26 17:13:03 +01:00
Damien George
45f3416816
esp8266: Enable DHT C-level driver.
...
Exposed as esp.dht_readinto. Probably should go somewhere less
port-specific.
2016-05-26 17:11:43 +01:00
Damien George
48a7ef0576
drivers: Add C-level function to read DHT11 and DHT22 devices.
...
Uses mp_hal_pin API.
2016-05-26 17:10:06 +01:00
Damien George
4b37e775ea
extmod/machine_i2c: Redo mp_hal_pin macros to use open_drain and od_low.
...
mp_hal_pin_config_od is renamed mp_hal_pin_open_drain, and mp_hal_pin_low
is mp_hal_pin_od_low.
2016-05-26 17:06:40 +01:00
Damien George
a3dc2c6031
docs/machine: Make disable_irq and enable_irq docs available for all.
2016-05-26 15:47:47 +01:00
Damien George
9a368ae831
esp8266/modmachine: Add disable_irq and enable_irq functions.
2016-05-26 15:47:47 +01:00
Damien George
849eb835f0
esp8266/ets_alt_task: Don't run ets_loop_iter if irqs are disabled.
...
ets_loop_iter processes pending tasks, and tasks are considered lower
priority than interrupts, so tasks shouldn't be processed if interrupts
are disabled.
2016-05-26 15:47:47 +01:00
Damien George
99b14593a6
esp8266/xtirq: Add xtirq.h for controlling xtensa irqs.
2016-05-26 15:47:47 +01:00
Damien George
7e809b4baf
esp8266/modpybspi: Configure pins when initialising an SPI object.
2016-05-26 15:42:44 +01:00
Damien George
68e222afdc
esp8266: Add mp_hal_pin_input() and mp_hal_pin_output() functions.
2016-05-26 15:42:27 +01:00
Paul Sokolovsky
20aa9c8511
.travis.yml: Install gcc-arm-none-eabi with --force-yes for now.
...
There appears to be issue signature problem with the PPA package we use,
so workaround it this way for now. Warning: with broken signature, there's
always a possibility that PPA was hacked and ships trojaned binaries.
2016-05-26 13:06:22 +03:00
Paul Sokolovsky
f5d63bcd23
unix: Enable "ussl" module.
...
ussl was in testing mode for 8 months, and now enabled in other ports
(e.g. esp8266), so time for unix port to catch up.
2016-05-26 02:12:11 +03:00
Paul Sokolovsky
2ea019f3d3
extmod/modussl: Coverage build fixes.
2016-05-26 02:11:24 +03:00
Paul Sokolovsky
37f9761801
unix/Makefile: nanbox build is not compatible with modussl, disable.
2016-05-26 02:11:17 +03:00
Paul Sokolovsky
9d04fec5d9
extmod/modussl: Make more compatible with non-default obj representations.
...
Still not compatible with nanboxing.
2016-05-26 02:10:35 +03:00
Paul Sokolovsky
c76acd8c23
py/moduerrno: Add EEXIST, EISDIR.
...
Useful to check file/dir operations result, in particular used by upip.
2016-05-25 01:23:57 +03:00
Paul Sokolovsky
2b05b60bbc
esp8266/esp_mphal: mp_uos_dupterm_deactivate() may raise exception.
...
So, keep call to it protected via NLR still.
2016-05-24 15:04:59 +03:00
Paul Sokolovsky
4681b86850
esp8266/esp_mphal: Handle Ctrl+C from dupterm (e.g. WebREPL).
2016-05-24 01:37:56 +03:00
Paul Sokolovsky
116eeee6db
esp8266/esp_mphal: Fix NLR buffer leak in call_dupterm_read().
2016-05-24 01:30:28 +03:00
Paul Sokolovsky
bc2ba6b2e3
esp8266/scripts/port_diag: Dump network interface IP settings.
2016-05-24 01:27:16 +03:00
mad474
eaecc4c02e
docs/esp8266/general: Grammar fixes.
2016-05-23 23:33:23 +03:00
Antonin ENFRUN
ca41dc2750
py/objnamedtuple: Allow passing field names as a tuple.
...
So the documentation's example works. Besides, a tuple can be more
memory efficient.
2016-05-23 21:08:07 +01:00
Damien George
2133924e46
unix: Support frozen packages.
...
To use, put your directory structure with .py files in frozen/ and then:
make FROZEN_MPY_DIR=frozen
2016-05-23 15:19:53 +01:00
Damien George
202d5acd06
py/makeqstrdata.py: Allow to have double-quote characters in qstrs.
...
When rendering the qstr for a C header file, the double-quate character
must be escaped.
2016-05-23 15:18:55 +01:00
Damien George
3e03d1b87e
stmhal: Support frozen packages using .mpy files.
...
See issue #1814 .
2016-05-23 13:29:56 +01:00
Damien George
25a42fb6ef
tools/mpy-tool.py: Don't strip directories from the frozen source name.
...
Directories are now supported by the frozen import system (to implement
frozen packages) so we should keep them.
2016-05-23 13:29:03 +01:00
Damien George
74fb4e795b
mpy-cross: Add -s option to specify the embedded source filename.
...
.mpy files contain the name of the source file that they were compiled
from. This patch adds a way to change this name to an arbitrary string,
specified on the command line with the -s option. The default is to use
the full name of the input filename.
This new -s option is useful to strip off a leading directory name so
that mpy-tool.py can freeze packages.
2016-05-23 13:25:54 +01:00
Damien George
9b4c013823
tools/mpy-tool.py: Include .py extension in frozen filename.
...
So that it can be correctly stat'd when looking for frozen files.
2016-05-23 12:46:02 +01:00
Damien George
274952a117
py: Allow to stat and import frozen mpy files using new frozen "VFS".
...
Freezing mpy files using mpy-tool.py now works again.
2016-05-23 12:42:23 +01:00
Paul Sokolovsky
3e33aeb0db
docs: esp8266: Include ussl module in the docs.
2016-05-22 23:57:26 +03:00
Paul Sokolovsky
bca4c9e465
docs/ussl: Add basic description of axTLS-based modussl.
...
In particular, disclose the fact that server certificates are not
validated.
2016-05-22 23:56:22 +03:00
Paul Sokolovsky
cb7693bab4
esp8266/main: Update _boot module loading for recent frozen modules refactors.
2016-05-22 04:09:15 +03:00
Paul Sokolovsky
9c2217a165
esp8266: Enable collections.OrderedDict.
2016-05-22 02:57:33 +03:00
Paul Sokolovsky
9dde6062cc
py/objstr: Fix mix-signed comparison in str.center().
2016-05-22 02:22:14 +03:00
Dave Hylands
6a60fb3cf4
py/objstr*: Properly ifdef str.center().
2016-05-22 01:54:41 +03:00