summaryrefslogtreecommitdiffstatshomepage
path: root/extmod
Commit message (Collapse)AuthorAge
* extmod/vfs_fat: Add file and directory checks for remove and rmdir.Alex March2016-10-11
|
* extmod/machine_i2c: Use writes not reads in i2c.scan().Radomir Dopieralski2016-10-11
| | | | | | | As per discussion in #2449, using write requests instead of read requests for I2C.scan() seems to support a larger number of devices, especially ones that are write-only. Even a read-only I2C device has to implement writes in order to be able to receive the address of the register to read.
* extmod/uzlib: Update to upstream v2.1.Paul Sokolovsky2016-10-11
| | | | | | | | Adds check that LZ offsets fall into the sliding dictionary used. This catches a case when uzlib.DecompIO with a smaller dictionary is used to decompress data which was compressed with a larger dictionary. Previously, this would lead to producing invalid data or crash, now an exception will be thrown.
* extmod/vfs_fat_file: Use MP_Exxx errno constants.Damien George2016-10-07
|
* extmod: Use mp_raise_OSError helper function.Damien George2016-10-07
|
* extmod/modlwip: Use mp_raise_OSError helper function.Damien George2016-10-07
| | | | Reduces esp8266 code size by about 230 bytes.
* extmod/vfs_fat: Use mp_raise_OSError helper function.Damien George2016-10-07
|
* extmod/machine_spi: Add optional support for fast software SPI.Damien George2016-10-04
| | | | | | If a port defines MICROPY_PY_MACHINE_SPI_MIN_DELAY then it can use a faster software SPI loop that does not make calls to the delay_us function.
* extmod/machine_spi: Use delay_half, not baudrate, for internal timing.Damien George2016-10-04
| | | | | | | The delay_half parameter must be specified by the port to set up the timing of the software SPI. This allows the port to adjust the timing value to better suit its timing characteristics, as well as provide a more accurate printing of the baudrate.
* extmod/machine_spi: Factor out software SPI code from esp8266 to extmod.Damien George2016-10-03
|
* 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.