Commit Graph

5998 Commits

Author SHA1 Message Date
Paul Sokolovsky
e589cddcd4 docs/esp: Remove getaddrinfo(), now in socket module as expected. 2016-03-25 16:39:18 +02:00
Paul Sokolovsky
6e6488530e docs: More standard modules for esp8266. 2016-03-25 16:33:05 +02:00
Paul Sokolovsky
4b5606bc09 docs/network: esp8266: Update docs on WLAN constructor. 2016-03-25 16:30:06 +02:00
Paul Sokolovsky
ee6fcc6f91 docs: Add standard modules list for esp8266. 2016-03-25 15:17:55 +02:00
Paul Sokolovsky
96a644076d docs/topindex.html: Refer to "pyb" module only for pyboard. 2016-03-25 15:12:26 +02:00
Paul Sokolovsky
8f1854ad2d extmod/modlwip: Add SOL_SOCKET and SO_REUSEADDR constants for setsockopt(). 2016-03-25 15:06:12 +02:00
Paul Sokolovsky
ac671546d1 esp8266/README: Remove outdated reference to initial port heap size. 2016-03-25 15:02:23 +02:00
Paul Sokolovsky
88f60de914 tests: Add test for io.BufferedWriter. 2016-03-25 15:01:19 +02:00
Paul Sokolovsky
2c81b9be28 py/modio: io.BufferedWriter: Describe flushing policy. 2016-03-25 14:59:30 +02:00
Paul Sokolovsky
063e6e7d0a py/modio: Implement io.BufferedWriter.flush(). 2016-03-25 14:33:38 +02:00
Paul Sokolovsky
5d93dfbc2c py/modio: Initial implementation of io.BufferedWriter class.
Just .write() method implemented currently.
2016-03-25 01:10:49 +02:00
Paul Sokolovsky
3dbd2ee926 extmod/modwebsocket: Implement read support. 2016-03-25 00:51:51 +02:00
Paul Sokolovsky
4a02a8f74d py/stream: Fix object vs ptr usecase in mp_stream_writeall(). 2016-03-24 19:43:08 +02:00
Paul Sokolovsky
24342dd65e extmod/modwebsocket: Start module for WebSocket helper functions.
Currently, only write support is implemented (of limited buffer size).
2016-03-24 19:16:00 +02:00
Paul Sokolovsky
d4c8e626f2 py/stream: Add mp_stream_writeall() helper function.
Spools entire output buffer to a blocking stream (chunk by chunk if
needed).
2016-03-24 19:09:00 +02:00
Damien George
a5d48b1162 esp8266: Add tests/onewire.py as a driver and test code for ds18b20 dev. 2016-03-24 17:35:26 +02:00
Damien George
78d0dde562 esp8266: Add onewire helper functions as C module.
Includes functions to read and write bits and bytes.
2016-03-24 17:33:42 +02:00
Damien George
0cdbd356fd esp8266: Implement bit-bang I2C read, and add i2c.readfrom method.
I2C reading tested with TSL2561 luminosity sensor.
2016-03-24 11:46:05 +02:00
Damien George
5b9f361824 esp8266: Clean up bit-bang I2C implementation.
Changed from using set_sda_scl function to independent set_sda and
set_scl functions.
2016-03-24 11:37:52 +02:00
Paul Sokolovsky
667d64b430 esp8266/modpybi2c: Add missing include. 2016-03-24 11:21:36 +02:00
Damien George
dd32f02cc3 esp8266: Add basic I2C driver, with init and writeto methods.
Tested and working with SSD1306 I2C display.
2016-03-24 11:17:17 +02:00
Damien George
7059c8c23c esp8266: Expose pin object as a public structure for use as C pin API.
This is an initial attempt at making a simple C pin API for writing
things like I2C drivers in C.
2016-03-24 11:07:41 +02:00
Paul Sokolovsky
a1d072df81 esp8266: Enable auto-indent in REPL. 2016-03-23 16:30:29 +02:00
Paul Sokolovsky
df1f6783f2 esp8266: Add "socket" and "usocket" aliases for lwip module. 2016-03-23 16:25:55 +02:00
Paul Sokolovsky
494aea3e86 esp8266: Enable non-blocking stream support. 2016-03-23 16:15:49 +02:00
Damien George
5bc9398d9d esp8266: Enable more extmod's: uheapq, ure, uzlib. 2016-03-23 14:19:14 +02:00
Damien George
8000d51b68 esp8266: Add module weak link from json to ujson. 2016-03-23 14:16:46 +02:00
Paul Sokolovsky
1a0adf49df esp8266: Enable urandom module. 2016-03-23 13:33:17 +02:00
Damien George
e673714cfe esp8266: Make mp_hal_delay_us work with new event framework. 2016-03-23 13:01:21 +02:00
Paul Sokolovsky
58e2ad42ae esp8266: Update README with the latest features. 2016-03-23 12:08:15 +02:00
Damien George
b894551772 extmod/uctypes: Change param type from void* to byte*. 2016-03-19 22:13:17 +00:00
Damien George
da161fd9f0 extmod/uctypes: Finish support for FLOAT32 and FLOAT64 types. 2016-03-19 21:59:42 +00:00
Damien George
12154b1774 extmod/uctypes: Use mp_binary_get_val helper when extracting value.
It handles more cases than mp_binary_get_int.
2016-03-19 21:41:01 +00:00
Damien George
8d4d6731f5 py/parse: When looking up consts, check they exist before checking type. 2016-03-19 21:36:32 +00:00
Peter Hinch
2b302dad51 docs: Update pyb.UART.any() to mention that it returns character count. 2016-03-17 20:19:36 +00:00
Peter Hinch
6d5a549067 docs: Mention that pyb.SPI constructor accepts "X" and "Y" arguments. 2016-03-17 20:19:08 +00:00
Peter Hinch
b8133c4c0f docs: Update pyb.I2C constructor to reflect changes in Pyboard Lite. 2016-03-17 20:18:36 +00:00
Peter Hinch
4a6cac4643 docs: Update asm tutorial, maximum number of allowed args is now 4. 2016-03-17 20:17:40 +00:00
Damien George
99146ea444 tests/io: Remove "testfile" at end of open_plus test. 2016-03-17 20:09:33 +00:00
Damien George
556a1df6fd esp8266/ets_alt_task: Make FIRST_PRIO=0 to cover all task priorities.
FIRST_PRIO=2 works but using 0 is hopefully safer, and can anyway be
optimised in the future.
2016-03-17 16:28:06 +00:00
Paul Sokolovsky
9d7b871f58 esp8266: Store frozen modules in FlashROM.
Requires special lexer to access their contents.
2016-03-17 23:06:47 +08:00
Damien George
2466cb67f8 docs/esp8266: Update quick reference: i2c.readfrom and neopixel example. 2016-03-16 13:37:39 +00:00
Damien George
3acaa28b52 py: Don't allocate an extra parse node for power exponent.
Previous to this patch, the "**b" in "a**b" had its own parse node with
just one item (the "b").  Now, the "b" is just the last element of the
power parse-node.  This saves (a tiny bit of) RAM when compiling.
2016-03-16 13:04:51 +00:00
Paul Sokolovsky
52e062ef33 py/frozenmod: Allow port to override lexer to use for frozen modules. 2016-03-16 17:42:37 +07:00
Damien George
664f03f466 tests: Add a test for argument passing to inline-asm functions. 2016-03-16 08:24:07 +00:00
Damien George
9a58316de2 py/objfun: Allow inline-asm functions to be called with 4 arguments. 2016-03-16 08:22:26 +00:00
Damien George
be989be861 qemu-arm: Enable builtin override feature, and enable more tests.
Hopefully these tests run reliably on Travis.
2016-03-15 13:45:32 +00:00
Damien George
1ded19d4b3 qemu-arm: Reinitialise uPy heap and runtime at start of each test.
Previous to this patch, all qemu-arm tests were running in the same
session, and global variables could be left over from the previous test.
This patch makes it so that the heap and runtime are reinitialised at
the start of each test.
2016-03-15 13:42:36 +00:00
Damien George
157056ecdf tests: Add new subdir "stress/" specifically for stress tests. 2016-03-15 13:20:18 +00:00
Damien George
ab69ed7dac tests: Split large tests into smaller files, to run with a small heap.
All tests in basics/ directory can now run and pass using 64-bit unix
port with only a 16k heap (./run-tests --heapsize 16k).  Tests in this
directory should remain small so they can be used for ports with a
small heap.
2016-03-15 13:07:41 +00:00