summaryrefslogtreecommitdiffstatshomepage
path: root/extmod
Commit message (Collapse)AuthorAge
* extmod/machine_spi: Simplify SPI xfer function to only take one buf len.Damien George2016-10-03
| | | | | | | | There is no need to take src_len and dest_len arguments. The case of reading-only with a single output byte (originally src_len=1, dest_len>1) is now handled by using the output buffer as the input buffer, and using memset to fill the output byte into this buffer. This simplifies the implementations of the spi_transfer protocol function.
* extmod/machine_i2c: Add support for the addrsize parameter in mem xfers.Radomir Dopieralski2016-09-28
| | | | | | | | | | | | | | | | | The memory read/write I2C functions now take an optional keyword-only parameter that specifies the number of bits in the memory address. Only mem-addrs that are a multiple of 8-bits are supported (otherwise the behaviour is undefined). Due to the integer type used for the address, for values larger than 32 bits, only 32 bits of address will be sent, and the rest will be padded with 0s. Right now no exception is raised when that happens. For values smaller than 8, no address is sent. Also no exception then. Tested with a VL6180 sensor, which has 16-bit register addresses. Due to code refactoring, this patch reduces stmhal and esp8266 builds by about 50 bytes.
* extmod/vfs_fat: Add fat_vfs_statvfs(), reused from stmhal.Alex March2016-09-27
|
* extmod/uzlib/: Update uzlib to v2.0.3.Paul Sokolovsky2016-09-24
| | | | Fixes for more pedantic warnings.
* extmod/moduzlib: DecompIO: Add support for gzip-formatted streams.Paul Sokolovsky2016-09-24
| | | | | This uses extension introduced in CPython 3.5: if wbits (dictionary size code) has value 16 + 8..15, it means that gzip-formatted stream expected.
* extmod/uzlib: Add tinfgzip.c (gzip header parsing) from upstream.Paul Sokolovsky2016-09-24
|
* extmod/modussl_mbedtls: Add server_hostname param for wrap_socket().Paul Sokolovsky2016-09-23
| | | | | In CPython, module-level .wrap_socket() function actually doesn't accept (or document) this param, only SSLContext.wrap_socket() has.
* extmod/machine_i2c: Add clock stretching support.Radomir Dopieralski2016-09-22
| | | | | | | | | | | | | | When the clock is too fast for the i2c slave, it can temporarily hold down the scl line to signal to the master that it needs to wait. The master should check the scl line when it is releasing it after transmitting data, and wait for it to be released. This change has been tested with a logic analyzer and an i2c slace implemented on an atmega328p using its twi peripheral, clocked at 8Mhz. Without the change, the i2c communication works up to aboy 150kHz frequency, and above that results in the slave stuck in an unresponsive state. With this change, communication has been tested to work up to 400kHz.
* extmod/modussl_mbedtls: Use 2-component include paths.Paul Sokolovsky2016-09-22
| | | | | This is required to use mbedTLS versions from various sources, e.g. mainline vs embedded into Zephyr RTOS.
* extmod/modussl_mbedtls: Implement key= and cert= args to wrap_socket().Paul Sokolovsky2016-09-22
| | | | | Unlike standard keyfile= and certfile=, these accept byte buffer objects (to not depend on FS implementation).
* extmod/modubinascii: Fix crc32() function on 32-bit platforms.Pavol Rusnak2016-09-21
|
* extmod/uctypes: Allow full 32-bit address range.Stefan Agner2016-09-21
| | | | | Use mp_obj_int_get_truncated to allow the full 32-bit address range as first parameter.
* extmod/modussl_mbedtls: Initial implementation of mbedTLS ussl module.Paul Sokolovsky2016-09-21
|
* all: Remove 'name' member from mp_obj_module_t struct.Damien George2016-09-22
| | | | One can instead lookup __name__ in the modules dict to get the value.
* extmod/framebuf: Add the xstep!=0 case to scroll() method.Radomir Dopieralski2016-09-05
| | | | | | | Adds horizontal scrolling. Right now, I'm just leaving the margins created by the scrolling as they were -- so they will repeat the edge of the framebuf. This is fast, and the user can always fill the margins themselves.
* extmod/moduzlib: Support wbits arg to DecompIO.Paul Sokolovsky2016-09-04
|
* extmod/modframebuf: Include font from stmhal directory explicitly.Damien George2016-09-04
| | | | | So that users of framebuf don't need to have stmhal directory in their path. (Eventually the font can be moved elsewhere.)
* extmod/moduzlib: Use mperrno.h for error constants.Paul Sokolovsky2016-09-03
|
* extmod/moduzlib: Implement zlib stream decompressor class, DecompIO.Paul Sokolovsky2016-09-03
|
* extmod/modframebuf: Fix fill and scroll when height not divisible by 8.Radomir Dopieralski2016-09-02
| | | | | | | There was a bug in `framebuf1_fill` function, that makes it leave a few lines unfilled at the bottom if the height is not divisible by 8. A similar bug is fixed in the scroll method.
* extmod: Add machine_spi with generic SPI C-protocol and helper methods.Damien George2016-09-01
| | | | | | | The idea is that all ports can use these helper methods and only need to provide initialisation of the SPI bus, as well as a single transfer function. The coding pattern follows the stream protocol and helper methods.
* extmod/modframebuf: Fix pixel accessor to return a 1-bit result.Damien George2016-08-27
|
* esp8266/modous: Add os.umount method to unmount a filesystem.Radomir Dopieralski2016-08-26
| | | | | | | | This is an object-oriented approach, where uos is only a proxy for the methods on the vfs object. Some internals had to be exposed (the STATIC keyword removed) for this to work. Fixes #2338.
* extmod/modubinascii: Make crc32() support configurable.Paul Sokolovsky2016-08-24
| | | | Disable by default, enable in unix port.
* extmod/modubinascii: implement binascii.crc32Pavol Rusnak2016-08-24
|
* extmod/modbtree: do CHECK_ERROR after __bt_seq()Krzysztof Blazewicz2016-08-24
| | | | | | | In `btree_seq()`, when `__bt_seq()` gets called with invalid `flags` argument it will return `RET_ERROR` and it won't initialize `val`. If field `data` of uninitialized `val` is passed to `mp_obj_new_bytes()` it causes a segfault.
* extmod/uzlib/: Update uzlib to v2.0.2.Paul Sokolovsky2016-08-17
| | | | Consistently use stdint types. Fixes stmhal build.
* extmod/uzlib/: Update uzlib to v2.0.1.Paul Sokolovsky2016-08-17
| | | | Fixes for pedantic compiler warnings.
* extmod/moduzlib: Refactor to new stream-compatible uzlib 2.0 API.Paul Sokolovsky2016-08-17
|
* extmod/uzlib/: Update uzlib to v2.0.Paul Sokolovsky2016-08-17
| | | | New API supporting stream decompression.
* extmod/modwebrepl: set_password(): Raise exception for too long password.Paul Sokolovsky2016-08-16
|
* extmod/modwebrepl: Add GET_VER operation to query MicroPython version.Paul Sokolovsky2016-08-07
|
* extmod/modwebsocket: Use mp_rom_map_elem_t and friends.Paul Sokolovsky2016-08-06
|
* extmod/modwebsocket: Make compatible with non-default object models.Paul Sokolovsky2016-08-06
|
* extmod/modwebsocket: Add readline method.Paul Sokolovsky2016-08-06
| | | | | | 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.
* extmod/modbtree: open(): Add option kwargs.Paul Sokolovsky2016-08-06
| | | | Namely: flags, cachesize, pagesize, minkeypage.
* extmod/modwebrepl: Make GET_FILE operation non-blocking.Paul Sokolovsky2016-08-05
| | | | | | 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.
* extmod/modwebrepl: Factor out "GET" iteration to write_file_chunk().Paul Sokolovsky2016-08-05
|
* extmod/modbtree: Implement __contains__ operation.Paul Sokolovsky2016-08-02
|
* extmod/modbtree: Switch to accepting stream object instead of filename.Paul Sokolovsky2016-07-31
| | | | Requires "embedded" BerkeleyDB BTree implementation.
* py/stream: Add adapter methods with POSIX-compatible signatures.Paul Sokolovsky2016-07-30
| | | | | Previoussly such read() and write() methods were used by modussl_axtls, move to py/stream for reuse.
* extmod/modbtree: Check __bt_open() return value for error.Paul Sokolovsky2016-07-24
|
* extmod/modwebrepl: Use mp_stream_close() method.Paul Sokolovsky2016-07-23
|
* extmod/modussl_axtls: Use mp_stream_close() method.Paul Sokolovsky2016-07-23
|
* extmod/vfs_fat: Implement rmdir() method.Paul Sokolovsky2016-07-16
| | | | | Shares the code with remove() method due to the same underlying f_unlink() FatFs operation.
* extmod/modussl_axtls: Add dummy setblocking() method.Paul Sokolovsky2016-07-15
| | | | Accepts only value of True.
* extmod/modussl_axtls: Further changes to allow alternative SSL modules.Paul Sokolovsky2016-07-13
| | | | | Make variable MICROPY_SSL_AXTLS=1 should be defined to activate modussl_axtls and link with -laxtls.
* extmod/modussl: Rename to modussl_axtls.c, to allow impl using other SSL libs.Paul Sokolovsky2016-07-13
|
* extmod/moduos_dupterm: Reuse dupterm_arr_obj for write operations.Paul Sokolovsky2016-07-07
| | | | | Instead of allocating new array object header again and again, causing memory fragmentation.
* extmod/moduos_dupterm: Reserve buffer bytearray object for dupterm.Paul Sokolovsky2016-07-04
| | | | | Allocating it for each read/write operation is a memory fragmentation hazard.