Paul Sokolovsky
5b9e7e29f6
unix: Enable websocket module.
2016-08-06 15:15:53 +03:00
Paul Sokolovsky
a931c4eeec
extmod/modwebsocket: Add readline method.
...
This goes bit against websocket nature (message-based communication),
as it ignores boundaries bertween messages, but may be very practical
to do simple things with websockets.
2016-08-06 15:13:26 +03:00
Paul Sokolovsky
3d19adf9b3
examples/network: Split recv- and read-based HTTP servers.
...
Name recv() based a "simplistic", as it can't work robustly in every
environment. All this is to let people concentreate on proper, read()-
based one (and to turn recv() based into a "negative showcase",
explaining what are the pitfalls of such approach).
2016-08-06 01:59:51 +03:00
Paul Sokolovsky
d79342d33e
extmod/modbtree: open(): Add option kwargs.
...
Namely: flags, cachesize, pagesize, minkeypage.
2016-08-06 00:10:22 +03:00
Paul Sokolovsky
ed500e4987
extmod/modwebrepl: Make GET_FILE operation non-blocking.
...
In the sense that while GET_FILE transfers its data, REPL still works.
This is done by requiring client to send 1-byte block before WebREPL
server transfers next block of data.
2016-08-05 22:57:50 +03:00
Paul Sokolovsky
c16612ee87
extmod/modwebrepl: Factor out "GET" iteration to write_file_chunk().
2016-08-05 22:53:10 +03:00
Paul Sokolovsky
7fb31479bf
py/mkrules.mk: Allow to add more items for "clean" target using CLEAN_EXTRA.
2016-08-04 23:46:08 +03:00
David Siorpaes
b67eb20ed0
stmhal: Fix I2C mappings for STM32F429DISC board.
2016-08-04 22:51:53 +10:00
Paul Sokolovsky
4a27ad040e
esp8266/scripts/port_diag.py: Include esp.check_fw() call.
2016-08-04 00:43:58 +03:00
Paul Sokolovsky
e33d2383d1
esp8266/modesp: Add check_fw() function to check integrity of the firmware.
...
Requires firmware generated by the latest makeimg.py (which stores size
and md5 of the firmware together with the firmware itself).
2016-08-04 00:29:19 +03:00
Paul Sokolovsky
bf47b71b78
esp8266/makeimg.py: Append md5 hash to the generated binary.
...
md5 is calculated over the entire file, except first 4 bytes, which contain
flash parameters and may be changed by flashing tool or MicroPython flash
auto-config.
2016-08-04 00:21:05 +03:00
Paul Sokolovsky
a621333a4c
esp8266/makeimg.py: Store firmware size as last 4 bytes of padding area.
2016-08-04 00:19:09 +03:00
Radomir Dopieralski
efb8aa0ef6
logo/1bit-logo A black & white version of the logo
...
This version of the logo may be useful for displaying on small
devices to show that they use MicroPython.
2016-08-02 14:59:55 +03:00
Mike Causer
ce166e6b68
docs: Spelling mistakes
2016-08-02 11:17:46 +03:00
Paul Sokolovsky
3eb532e974
extmod/modbtree: Implement __contains__ operation.
2016-08-02 00:24:59 +03:00
Damien George
8766bc02dc
cc3200, teensy: Remove broken malloc/free/realloc macro helpers.
...
These macros are broken and are anyway unused on these two ports. If they
are ever needed in the future then their implementation can be taken from
either stmhal (working macros in mpconfigport.h) or esp8266 (functions).
2016-08-02 01:12:45 +10:00
Mike Causer
b4564841b6
docs: Add DHT to ESP8266 Quick Ref and Tutorial
2016-08-01 14:39:57 +03:00
Paul Sokolovsky
0e4cae5212
esp8266: Make APA102 driver inclusion configurable.
2016-08-01 00:03:55 +03:00
Paul Sokolovsky
88d3cd582e
esp8266/eagle.rom.addr.v6.ld: Add Enable_QMode symbol from SDK 2.0.0.
2016-08-01 00:01:49 +03:00
Paul Sokolovsky
bc3912980a
tests/machine1: Revamp to work with unix port (which has "umachine").
2016-07-31 04:30:48 +03:00
Paul Sokolovsky
eb0e3bab1e
tests/machine_mem.py: Too non-portable, rework as an example for unix port.
2016-07-31 04:22:09 +03:00
Paul Sokolovsky
4d22ade102
esp8266: Enable btree module.
2016-07-31 02:39:59 +03:00
Paul Sokolovsky
64ad838fde
esp8266/esp_mphal: Implement libc's errno.
...
Using __errno() function, and redirect it to use mp_stream_errno from
stream module. This is pre-requisite for integrating with 3rd-party libs,
like BerkeleyDB.
2016-07-31 02:30:05 +03:00
Paul Sokolovsky
617bda27e9
tests/extmod/btree1: Tests against in-memory DB (using io.BytesIO).
2016-07-31 02:29:05 +03:00
Paul Sokolovsky
aac9e8cfa3
unix/Makefile: And note why btree module is disabled for coverage build.
2016-07-31 02:27:13 +03:00
Paul Sokolovsky
99061d1dcb
extmod/modbtree: Switch to accepting stream object instead of filename.
...
Requires "embedded" BerkeleyDB BTree implementation.
2016-07-31 00:40:35 +03:00
Paul Sokolovsky
0dfe849413
py/py.mk: Extra switches to build "embedded" BerkeleyDB BTree lib.
2016-07-31 00:39:09 +03:00
Paul Sokolovsky
2ec943284a
lib/berkeley-db-1.xx: Switch to "embedded" branch.
...
It allows to access files via a virtual method tables and thus can integrate
with MicroPython's stream objects.
2016-07-31 00:36:38 +03:00
Dave Hylands
460bceca39
stmhal: Make SPI NSS pin definition optional.
...
Some boards (like the GHI Electronics G30 Dev Board) don't use
NSS at all and rather just use GPIO chip selects.
2016-07-30 22:08:20 +03:00
Matt Brejza
afd4909a0f
stmhal: fixing malloc when used with external libraries
2016-07-30 21:24:35 +03:00
stijn
37b143ce9e
mpy-cross: Fix mingw and msys2 compilation
...
When compiling with msys2's gcc there's no need to apply the binary fmode
so adjust the Makefile to reflect that.
When compiling with mingw we need to include malloc.h since there is no
alloca.h, and the 64bit detection in mpconfigport.h needs some adjustment.
2016-07-30 21:15:45 +03:00
Paul Sokolovsky
61e77a4e88
py/mpconfig.h: Add MICROPY_STREAMS_POSIX_API setting.
...
To filter out even prototypes of mp_stream_posix_*() functions, which
require POSIX types like ssize_t & off_t, which may be not available in
some ports.
2016-07-30 20:05:56 +03:00
Paul Sokolovsky
58d9d85a56
lib/abort_.c: Add prototype to make coverage build happy.
2016-07-30 17:52:06 +03:00
Paul Sokolovsky
ba2c503541
esp8266/mpconfigport.h: Include sys/types.h for POSIX types definitions.
...
As required for related functions in stream.h.
2016-07-30 17:46:36 +03:00
Paul Sokolovsky
50fea19416
esp8266/axtls_helpers: Remove abort_(), now in lib/embed/.
2016-07-30 00:36:28 +03:00
Paul Sokolovsky
c8b80e4740
lib/embed/abort_: Implementation of abort_() function raising uPy exception.
...
Helpful when porting existing C libraries to MicroPython. abort()ing in
embedded environment isn't a good idea, so when compiling such library,
-Dabort=abort_ option can be given to redirect standard abort() to this
"safe" version.
2016-07-30 00:35:50 +03:00
Paul Sokolovsky
4f1b0292db
py/stream: Add adapter methods with POSIX-compatible signatures.
...
Previoussly such read() and write() methods were used by modussl_axtls,
move to py/stream for reuse.
2016-07-30 00:25:06 +03:00
Paul Sokolovsky
abd5a57ea1
tests/io/bytesio_ext: Test for .seek()/.flush() on BytesIO.
2016-07-29 23:00:25 +03:00
Paul Sokolovsky
3990b1715d
py/objstringio: Implement MP_STREAM_SEEK ioctl and add seek() method.
2016-07-28 01:53:44 +03:00
Paul Sokolovsky
f039ac5bd7
py/objstringio: Add MP_STREAM_FLUSH ioctl and flush() method.
...
No-op for this object.
2016-07-28 01:14:32 +03:00
Paul Sokolovsky
64da62ec2e
unix/file: Use generic stream flush() method.
2016-07-28 00:28:27 +03:00
daniel-k
aa4ada943a
esp8266/modpybuart: Fix UART parity setting.
...
The configuration bits for the UART register were wrong and the parity
couldn't be enabled, because the exist_parity member hasn't been updated. I
took this ESP8266 register description (http://esp8266.ru/esp8266-uart-reg/ )
as reference.
Verification has been done with a logic analyzer.
2016-07-27 21:05:45 +03:00
Paul Sokolovsky
01816068c8
unix/file: fdfile_ioctl(): Fix argument to check_fd_is_open().
2016-07-27 02:50:11 +03:00
Paul Sokolovsky
a60b0263ba
py/stream: Implement generic flush() method, in terms of C-level ioctl.
2016-07-27 00:39:10 +03:00
Paul Sokolovsky
ade36806c8
unix/file: ioctl(): Check that file is open before operations.
2016-07-27 00:30:09 +03:00
Paul Sokolovsky
8fac939889
unix/file: Implement MP_STREAM_FLUSH ioctl.
2016-07-27 00:24:09 +03:00
Paul Sokolovsky
6ead9f6f3d
tests/run-tests: Make "regex'ed .exp" facility available to device tests.
...
Required to pass bytes_compare3.py (opptional warnings) on devices.
2016-07-26 23:08:33 +03:00
Paul Sokolovsky
f2f761c0c3
py/stream: Stream module works with errno's, so should include mperrno.h.
2016-07-26 15:05:15 +03:00
Paul Sokolovsky
243f8988be
unix/mpconfigport.h: Include stdio.h by default.
...
This allows to use printf() in a any source file with unix port, for quick
debugging.
2016-07-26 02:51:25 +03:00
Paul Sokolovsky
d1771bbae0
tests/unicode_subscr.py: Detailed test for subscripting unicode strings.
2016-07-25 19:28:19 +03:00