Damien George
1f7cec944e
esp8266/scripts/onewire.py: Simplify and improve 1-wire driver.
...
Changes are:
- added OneWireError exception and used where errors can occur
- renamed read/write functions to use same names as C _onewire funcs
- read_bytes is now read, write_bytes is now write
- add ability to read/write DS18B20 scratch pad
- rename start_measure to convert_temp (since that's what it does)
- rename get_temp to read_temp (consistency with other read names)
- removed test function
2016-04-28 13:33:55 +01:00
Damien George
38358a096d
esp8266: Move onewire.py, neopixel.py drivers from tests/ to scripts/.
2016-04-28 12:36:45 +01:00
Damien George
37d5aa1377
docs: Make the short port names in the port/version sidebar lowercase.
...
To make it neater and simpler.
2016-04-28 12:34:59 +01:00
Damien George
a6aa35af09
esp8266: Move pyb.info() function to esp module and remove pyb module.
...
All functionality of the pyb module is available in other modules, like
time, machine and os. The only outstanding function, info(), is
(temporarily) moved to the esp module and the pyb module is removed.
2016-04-28 12:23:55 +01:00
Paul Sokolovsky
3c2e40b008
tests/run-tests: Add gen_yield_from_stopped to skipped for --emit=native.
...
Just as the rest of generator tests, which aren't yet supoorted for
native.
2016-04-28 10:24:27 +03:00
Paul Sokolovsky
0ea2108f1c
tests: Add testcase for yielding from a stopped generator.
2016-04-28 02:08:51 +03:00
Paul Sokolovsky
eff85bb1dc
py/vm: "yield from" didn't handle MP_OBJ_STOP_ITERATION optimization.
...
E.g. crashed when yielding from already stopped generators.
2016-04-28 02:08:43 +03:00
Paul Sokolovsky
d54290f6e2
extmod/modussl: Throw Python exceptions in case of errors.
2016-04-28 00:49:54 +03:00
Paul Sokolovsky
0785040593
esp8266/Makefile: Enable "ussl" module.
...
axTLS should be built first using "make axtls".
2016-04-28 00:48:38 +03:00
Paul Sokolovsky
941ddfe559
esp8266/Makefile: Support linking with axTLS built from source.
2016-04-28 00:48:38 +03:00
Damien George
8ed3a9eb9c
esp8266/tests/onewire.py: Don't run test on import.
2016-04-27 22:32:39 +01:00
Paul Sokolovsky
6d8156ae28
docs/network: esp8266: Describe wlan.config() method.
2016-04-28 00:11:55 +03:00
Paul Sokolovsky
06deec9d35
docs/network: esp8266: Add wlan.ifconfig() method.
2016-04-28 00:10:29 +03:00
Paul Sokolovsky
50ef851bee
lib/timeutils/timeutils: Typo fix in comment.
2016-04-27 18:52:57 +03:00
Paul Sokolovsky
1b45670c69
docs/ubinascii: Clean up grammar.
2016-04-27 15:47:33 +03:00
Paul Sokolovsky
df4e1d1279
docs/library: Consistently use admonitions for CPython differences.
2016-04-27 15:43:48 +03:00
Paul Sokolovsky
31300b5144
docs/utime: Describe sleep() peculiarities in MicroPython.
...
Not all ports accept floating-point value.
2016-04-27 15:28:46 +03:00
Paul Sokolovsky
c564169c8f
docs/utime: Describe time() peculiarities in MicroPython.
2016-04-27 15:23:11 +03:00
Paul Sokolovsky
dc2c8f0b1a
esp8266/axtls_helpers: Helper/wrapper functions for axTLS.
2016-04-27 14:54:36 +03:00
Damien George
556e5dfd35
docs/library/utime: Add more time functions for unix and esp8266 ports.
2016-04-27 12:30:59 +01:00
Damien George
e0f7e001e8
docs: Fix uos and utime heading underlines to be the correct length.
...
Otherwise Sphinx gives a warning.
2016-04-27 12:11:27 +01:00
Paul Sokolovsky
648333d2d5
esp8266/Makefile: Override abort() when building axtls.
...
abort() is a special function known to compiler as no-return.
2016-04-27 13:41:59 +03:00
Paul Sokolovsky
480c212009
extmod/modwebsocket: Handle CLOSE control frame.
...
This fixes situation when clients hangs waiting for disconnect and does
so only on timeout.
2016-04-27 12:49:30 +03:00
Paul Sokolovsky
351ec6d4ab
docs/library: "os" module is actually "uos".
2016-04-27 01:55:06 +03:00
Paul Sokolovsky
f3f5e975e4
docs/Makefile: Default BUILDDIR based on MICROPY_PORT.
...
It doesn't make sense to duplicate both on command line, and MICROPY_PORT
is effectively mandatory to build docs.
2016-04-27 01:50:05 +03:00
Paul Sokolovsky
0df2ee0126
docs/library/index: Order sections from the most to least standard modules.
2016-04-27 01:38:59 +03:00
Paul Sokolovsky
492bf12499
docs/library/index: Make single section for "micro-ified" modules.
...
Even the modules whose names don't start with "u" prefix are micro-ified
anyway, i.e. provide only subset of CPython's functionality (and sometimes
extensions to it). So, it doesn't make much sense to devide them by
criteria of having/not having "u" prefix.
2016-04-27 01:38:59 +03:00
Paul Sokolovsky
678f3a1e05
docs: Module "time" is actually "utime".
2016-04-27 01:38:59 +03:00
Paul Sokolovsky
a119983328
docs/library/index: esp8266 has the same set of stdlibs as pyboard/unix.
2016-04-27 01:17:28 +03:00
Paul Sokolovsky
88ed518390
docs/library/index: Move WiPy "micro-libraries" under corresponding heading.
2016-04-27 01:14:16 +03:00
Paul Sokolovsky
8b8c32c09b
docs/library: Group MicroPython-specific modules under separate heading.
2016-04-27 01:11:24 +03:00
Paul Sokolovsky
6afd651f1e
esp8266/esp8266.ld: Put axTLS to FlashROM.
2016-04-27 00:45:09 +03:00
Paul Sokolovsky
6149ce01f8
esp8266/Makefile: Add target to build axTLS.
2016-04-27 00:35:13 +03:00
Paul Sokolovsky
1c6d91d968
extmod/modlwip: Add print_pcbs() debug function.
...
This requires lwIP built with LWIP_DEBUG (or it will be no-op).
2016-04-26 16:30:13 +03:00
Damien George
45ac5a85d5
extmod/modlwip: Workaround esp8266 sendto issue where 1 is returned.
2016-04-26 13:19:08 +01:00
Damien George
a63542387d
extmod, stmhal: Fix typo of macro that detects if float is enabled.
2016-04-26 12:47:24 +01:00
Paul Sokolovsky
90b2cfe644
esp8266/scripts/webrepl: Add "ws://" to "daemon started at" message.
...
To remind people it's not HTTP.
2016-04-26 12:47:24 +03:00
Paul Sokolovsky
51cee4495e
py/mkrules.mk: Typo fixes in comments.
2016-04-26 12:39:28 +03:00
Damien George
07615d9f7e
tests/extmod: Move split-on-empty-match tests to a separate test file.
...
And provide an expected-output file because these tests have a different
behaviour under CPython.
2016-04-26 10:19:04 +01:00
Damien George
23df4b08fb
py/emitnative: Use MP_OBJ_NEW_SMALL_INT instead of manual bit shifting.
2016-04-26 10:02:32 +01:00
Damien George
2bddfd4922
py/obj.h: When constructing a small-int cast to mp_uint_t for bit-shift.
...
The C standard says that left-shifting a signed value (on the LHS of the
operator) is undefined. So we cast to an unsigned integer before the
shift. gcc does not issue a warning about this, but clang does.
2016-04-26 09:51:37 +01:00
Paul Sokolovsky
237c519ac4
esp8266/scripts/flashbdev: Use all available Flash for filesystem.
...
All Flash sans firmware at the beginning and 16K SDK param block at the
end is used for filesystem (and that's calculated depending on the Flash
size).
2016-04-26 01:36:32 +03:00
Paul Sokolovsky
650df97c06
docs/network: esp8266: scan(): Add note that bssid is bytes object.
2016-04-26 01:09:11 +03:00
Paul Sokolovsky
ef2ffc0e4e
esp8266/scripts/webrepl: Print client address for incoming connections.
2016-04-26 01:00:28 +03:00
Paul Sokolovsky
c888831410
esp8266/scripts/webrepl: Print connection address.
...
Based on active network interfaces.
2016-04-26 00:59:30 +03:00
stijn
29c8c8aecb
windows/msvc: Rewrite qstr auto-generation.
...
Builds have been broken since reworking autogeneration in c618f91
and
related, this gets fixed here by applying similar qstr generation logic
for the msvc builds: c files are only preprocessed when changed (or not
yet preprocessed) and the concatenated output is fed into makeqstrdefs.py.
To speed up this process, the concatenated output is already filtered to
contain only lines which makeqstrdefs really needs: this makes the qstr
generation stage about twice as fast (checked on different machines).
2016-04-25 22:34:24 +01:00
stijn
9264d42e2a
py/makeqstrdefs.py: Windows compatibility.
...
- msvc preprocessor output contains full paths with backslashes so the
':' and '\' characters needs to be erased from the paths as well
- use a regex for extraction of filenames from preprocessor output so it
can handle both gcc and msvc preprocessor output, and spaces in paths
(also thanks to a PR from @travnicekivo for part of that regex)
- os.rename will fail on windows if the destination file already exists,
so simply attempt to delete that file first
2016-04-25 22:34:22 +01:00
stijn
b2b771ca02
py/makeqstrdefs.py: Remove unused function/variable/import.
2016-04-25 22:34:20 +01:00
Paul Sokolovsky
7a012f4793
extmod/modlwip: Protect recv/accept Python callback against exceptions.
...
Using usual call_function_*_protected() helper, to avoid NLR jump crashes.
2016-04-25 21:27:55 +03:00
Paul Sokolovsky
bababce6de
py/runtime_utils: Fix nanbox build.
2016-04-25 20:03:14 +03:00